From f7a75247efaa62414c7cf9019362b1be61c6641b Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Sun, 4 Nov 2018 23:12:41 +0100 Subject: [PATCH] struct widget_flags is now a public type --- src/fwidget.cpp | 6 +++--- src/include/final/fwidget.h | 37 ++++++++++++++++++------------------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/fwidget.cpp b/src/fwidget.cpp index ea385037..0630b577 100644 --- a/src/fwidget.cpp +++ b/src/fwidget.cpp @@ -1023,7 +1023,7 @@ void FWidget::redraw() setColor (wc.term_fg, wc.term_bg); clearArea (vdesktop); } - else if ( ! visible ) + else if ( ! isVisible() ) return; draw(); @@ -1070,7 +1070,7 @@ void FWidget::resize() //---------------------------------------------------------------------- void FWidget::show() { - if ( ! visible ) + if ( ! isVisible() ) return; if ( ! init_desktop ) @@ -1127,7 +1127,7 @@ void FWidget::show() //---------------------------------------------------------------------- void FWidget::hide() { - if ( visible ) + if ( isVisible() ) { visible = false; shown = false; diff --git a/src/include/final/fwidget.h b/src/include/final/fwidget.h index daa55ec2..c801e59e 100644 --- a/src/include/final/fwidget.h +++ b/src/include/final/fwidget.h @@ -142,7 +142,23 @@ class FWidget : public FVTerm, public FObject typedef void (FWidget::*FMemberCallback)(FWidget*, data_ptr); typedef std::vector Accelerators; - struct widget_flags; // forward declaration + struct widget_flags // Properties of a widget ⚑ + { + uInt32 shadow : 1; + uInt32 trans_shadow : 1; + uInt32 active : 1; + uInt32 focus : 1; + uInt32 scrollable : 1; + uInt32 resizeable : 1; + uInt32 modal : 1; + uInt32 window_widget : 1; + uInt32 dialog_widget : 1; + uInt32 menu_widget : 1; + uInt32 always_on_top : 1; + uInt32 flat : 1; + uInt32 no_underline : 1; + uInt32 : 19; // padding bits + }; // Constructor explicit FWidget (FWidget* = 0, bool = false); @@ -375,24 +391,7 @@ class FWidget : public FVTerm, public FObject virtual void onClose (FCloseEvent*); // Data Members - struct widget_flags // Properties of a widget ⚑ - { - uInt32 shadow : 1; - uInt32 trans_shadow : 1; - uInt32 active : 1; - uInt32 focus : 1; - uInt32 scrollable : 1; - uInt32 resizeable : 1; - uInt32 modal : 1; - uInt32 window_widget : 1; - uInt32 dialog_widget : 1; - uInt32 menu_widget : 1; - uInt32 always_on_top : 1; - uInt32 flat : 1; - uInt32 no_underline : 1; - uInt32 : 19; // padding bits - } flags; - + struct widget_flags flags; static uInt modal_dialogs; static FWidgetColors wc; static widgetList* dialog_list;