00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \----------------------------------------------------------------------/ 00012 00013 File: YDialog.h 00014 00015 Author: Mathias Kettner <kettner@suse.de> 00016 Maintainer: Stefan Hundhammer <sh@suse.de> 00017 00018 /-*/ 00019 00020 00021 #ifndef YDialog_h 00022 #define YDialog_h 00023 00024 #include "YContainerWidget.h" 00025 00026 class YMacroRecorder; 00027 class YShortcutManager; 00028 00029 00034 class YDialog : public YContainerWidget 00035 { 00036 public: 00040 YDialog( const YWidgetOpt & opt ); 00041 00045 virtual ~YDialog(); 00046 00051 virtual char *widgetClass() { return "YDialog"; } 00052 00056 bool isDialog() const; 00057 00062 void setInitialSize(); 00063 00067 bool hasDefaultSize() { return _hasDefaultSize.value(); } 00068 00072 bool hasWarnColor() { return _hasWarnColor.value(); } 00073 00077 bool hasInfoColor() { return _hasInfoColor.value(); } 00078 00082 bool isDecorated() { return _isDecorated.value(); } 00083 00087 bool isCentered() { return _isCentered.value(); } 00088 00092 bool hasSmallDecorations() { return _hasSmallDecorations.value(); } 00093 00101 void checkShortcuts( bool force = false ); 00102 00109 void postponeShortcutCheck() { _shortcutCheckPostponed = true; } 00110 00114 bool shortcutCheckPostponed() const { return _shortcutCheckPostponed; } 00115 00119 YWidgetList widgets() const; 00120 00121 00122 protected: 00123 00128 void fillWidgetList( YWidgetList & widgetList, 00129 const YContainerWidget * parent ) const; 00130 00131 00132 /* 00133 * The dialog options 00134 */ 00135 YBoolOpt _hasDefaultSize; 00136 YBoolOpt _hasWarnColor; 00137 YBoolOpt _hasInfoColor; 00138 YBoolOpt _isDecorated; 00139 YBoolOpt _isCentered; 00140 YBoolOpt _hasSmallDecorations; 00141 00142 bool _shortcutCheckPostponed; 00143 }; 00144 00145 00146 #endif // YDialog_h