diff options
Diffstat (limited to 'src/kernel/ntqstyle.h')
-rw-r--r-- | src/kernel/ntqstyle.h | 71 |
1 files changed, 48 insertions, 23 deletions
diff --git a/src/kernel/ntqstyle.h b/src/kernel/ntqstyle.h index 75a79c79a..a045e21eb 100644 --- a/src/kernel/ntqstyle.h +++ b/src/kernel/ntqstyle.h @@ -63,26 +63,26 @@ class TQStyleOption { public: enum StyleOptionDefault { Default }; - TQStyleOption(StyleOptionDefault=Default) : def(TRUE), tb(NULL), cli(NULL) {} + TQStyleOption(StyleOptionDefault=Default) : def(TRUE), tb(NULL), cli(NULL), tbh(NULL) {} // Note: we don't use default arguments since that is unnecessary // initialization. TQStyleOption(int in1) : - def(FALSE), tb(NULL), i1(in1), cli(NULL) {} + def(FALSE), tb(NULL), i1(in1), cli(NULL), tbh(NULL) {} TQStyleOption(int in1, int in2) : - def(FALSE), tb(NULL), i1(in1), i2(in2), cli(NULL) {} + def(FALSE), tb(NULL), i1(in1), i2(in2), cli(NULL), tbh(NULL) {} TQStyleOption(int in1, int in2, int in3, int in4) : - def(FALSE), tb(NULL), i1(in1), i2(in2), i3(in3), i4(in4), cli(NULL) {} - TQStyleOption(TQMenuItem* m) : def(FALSE), mi(m), tb(NULL), cli(NULL) {} - TQStyleOption(TQMenuItem* m, int in1) : def(FALSE), mi(m), tb(NULL), i1(in1), cli(NULL) {} - TQStyleOption(TQMenuItem* m, int in1, int in2) : def(FALSE), mi(m), tb(NULL), i1(in1), i2(in2), cli(NULL) {} - TQStyleOption(const TQColor& c) : def(FALSE), tb(NULL), cl(&c), cli(NULL) {} - TQStyleOption(TQTab* t) : def(FALSE), tb(t), cli(NULL) {} - TQStyleOption(TQListViewItem* i) : def(FALSE), tb(NULL), li(i), cli(NULL) {} - TQStyleOption(TQCheckListItem* i) : def(FALSE), tb(NULL), cli(i) {} - TQStyleOption(TQt::ArrowType a) : def(FALSE), tb(NULL), i1((int)a), cli(NULL) {} - TQStyleOption(const TQRect& r) : def(FALSE), tb(NULL), i1(r.x()), i2(r.y()), i3(r.width()), i4(r.height()), cli(NULL) {} - TQStyleOption(TQWidget *w) : def(FALSE), tb(NULL), cli(NULL), p1((void*)w) {} + def(FALSE), tb(NULL), i1(in1), i2(in2), i3(in3), i4(in4), cli(NULL), tbh(NULL) {} + TQStyleOption(TQMenuItem* m) : def(FALSE), mi(m), tb(NULL), cli(NULL), tbh(NULL) {} + TQStyleOption(TQMenuItem* m, int in1) : def(FALSE), mi(m), tb(NULL), i1(in1), cli(NULL), tbh(NULL) {} + TQStyleOption(TQMenuItem* m, int in1, int in2) : def(FALSE), mi(m), tb(NULL), i1(in1), i2(in2), cli(NULL), tbh(NULL) {} + TQStyleOption(const TQColor& c) : def(FALSE), tb(NULL), cl(&c), cli(NULL), tbh(NULL) {} + TQStyleOption(TQTab* t) : def(FALSE), tb(t), cli(NULL), tbh(NULL) {} + TQStyleOption(TQListViewItem* i) : def(FALSE), tb(NULL), li(i), cli(NULL), tbh(NULL) {} + TQStyleOption(TQCheckListItem* i) : def(FALSE), tb(NULL), cli(i), tbh(NULL) {} + TQStyleOption(TQt::ArrowType a) : def(FALSE), tb(NULL), i1((int)a), cli(NULL), tbh(NULL) {} + TQStyleOption(const TQRect& r) : def(FALSE), tb(NULL), i1(r.x()), i2(r.y()), i3(r.width()), i4(r.height()), cli(NULL), tbh(NULL) {} + TQStyleOption(TQWidget *w) : def(FALSE), tb(NULL), cli(NULL), p1((void*)w), tbh(NULL) {} bool isDefault() const { return def; } @@ -109,6 +109,9 @@ public: TQRect rect() const { return TQRect( i1, i2, i3, i4 ); } TQWidget* widget() const { return (TQWidget*)p1; } + TQStyleOption(TQTab* t, TQTab* h) : def(FALSE), tb(t), cli(NULL), tbh(h) {} + TQTab* hoverTab() const { return tbh; } + private: // NOTE: none of these components have constructors. bool def; @@ -121,6 +124,7 @@ private: int i5, i6; // reserved TQCheckListItem* cli; void *p1, *p2, *p3, *p4; // reserved + TQTab* tbh; // (padded to 64 bytes on some architectures) }; @@ -129,6 +133,8 @@ class TQStyleHintReturn; // not defined yet typedef TQMap<TQ_UINT32, TQSize> DialogButtonSizeMap; typedef TQMap<TQ_INT32, TQ_INT32> TabIdentifierIndexMap; +class TQStyleControlElementGenericWidgetData; + class TQStyleControlElementPopupMenuData { public: // @@ -142,13 +148,6 @@ class TQStyleControlElementCheckListItemData { int height; }; -class TQStyleControlElementTabBarData { - public: - int tabCount; - TQTabBar::Shape shape; - TabIdentifierIndexMap identIndexMap; -}; - class TQStyleControlElementListViewData { public: bool rootDecorated; @@ -200,7 +199,23 @@ class TQStyleControlElementGenericWidgetData { TQFont font; }; -class TQStyleControlElementData { +class TQStyleControlElementTabBarData { + public: + int tabCount; + int currentTabIndex; + TQTabBar::Shape shape; + TabIdentifierIndexMap identIndexMap; + TQStyleControlElementGenericWidgetData cornerWidgets[4]; + + enum CornerWidgetLocation { + CWL_TopLeft = 0, + CWL_TopRight = 1, + CWL_BottomLeft = 2, + CWL_BottomRight = 3 + }; +}; + +class Q_EXPORT TQStyleControlElementData { public: TQStringList widgetObjectTypes; bool allDataPopulated; @@ -251,6 +266,10 @@ class TQStyleControlElementData { TQ_UINT32 comboBoxLineEditFlags; TQ_UINT32 frameStyle; TQRect sliderRect; + TQPainter* activePainter; + + public: + TQStyleControlElementData(); }; class Q_EXPORT TQStyleWidgetActionRequestData { @@ -260,6 +279,7 @@ class Q_EXPORT TQStyleWidgetActionRequestData { TQStyleWidgetActionRequestData(TQPalette palette, bool informWidgets = FALSE, const char* className = 0); TQStyleWidgetActionRequestData(TQFont font, bool informWidgets = FALSE, const char* className = 0); TQStyleWidgetActionRequestData(TQRect rect); + TQStyleWidgetActionRequestData(TQPaintEvent* paintEvent); ~TQStyleWidgetActionRequestData(); public: bool bool1; @@ -271,6 +291,7 @@ class Q_EXPORT TQStyleWidgetActionRequestData { TQRect rect; const char * cstr; TQString string; + TQPaintEvent * paintEvent; }; typedef TQStyleWidgetActionRequestData TQStyleApplicationActionRequestData; @@ -309,6 +330,7 @@ public: CEF_IsActiveWindow = 0x00200000, CEF_IsTopLevel = 0x00400000, CEF_IsVisible = 0x00800000, + CEF_HasMouse = 0x01000000 }; // New TQStyle API - most of these should probably be pure virtual @@ -1094,7 +1116,10 @@ public: WAR_SetBackgroundMode, WAR_SetBackgroundOrigin, WAR_SetFont, - WAR_RepaintAllAccelerators + WAR_RepaintAllAccelerators, + WAR_SetDefault, + WAR_UnSetDefault, + WAR_SendPaintEvent }; typedef bool (*WidgetActionRequestHook)(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData); |