|
|
@ -146,6 +146,39 @@ public:
|
|
|
|
class TQStyleHintReturn;
|
|
|
|
class TQStyleHintReturn;
|
|
|
|
%End
|
|
|
|
%End
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef TQMap<TQ_UINT32, TQSize> DialogButtonSizeMap;
|
|
|
|
|
|
|
|
typedef TQMap<TQ_INT32, TQ_INT32> TabIdentifierIndexMap;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TQStyleControlElementPopupMenuData;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TQStyleControlElementCheckListItemData;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TQStyleControlElementTabBarData;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TQStyleControlElementListViewData;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TQStyleControlElementSpinWidgetData;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TQStyleControlElementTitleBarData;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TQStyleControlElementDockWidgetData;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TQStyleControlElementGenericWidgetData;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TQStyleControlElementData;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TQStyleWidgetActionRequestData
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
TQStyleWidgetActionRequestData();
|
|
|
|
|
|
|
|
TQStyleWidgetActionRequestData(int, int = 0);
|
|
|
|
|
|
|
|
TQStyleWidgetActionRequestData(TQPalette, bool = FALSE, const char* = 0);
|
|
|
|
|
|
|
|
TQStyleWidgetActionRequestData(TQFont, bool = FALSE, const char* = 0);
|
|
|
|
|
|
|
|
TQStyleWidgetActionRequestData(TQRect);
|
|
|
|
|
|
|
|
~TQStyleWidgetActionRequestData();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef TQStyleWidgetActionRequestData TQStyleApplicationActionRequestData;
|
|
|
|
|
|
|
|
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
|
|
|
|
|
|
|
@ -164,16 +197,51 @@ public:
|
|
|
|
GUIStyle guiStyle() const;
|
|
|
|
GUIStyle guiStyle() const;
|
|
|
|
%End
|
|
|
|
%End
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum ControlElementFlags {
|
|
|
|
|
|
|
|
CEF_None = 0x00000000,
|
|
|
|
|
|
|
|
CEF_IsDefault = 0x00000001,
|
|
|
|
|
|
|
|
CEF_AutoDefault = 0x00000002,
|
|
|
|
|
|
|
|
CEF_IsActive = 0x00000004,
|
|
|
|
|
|
|
|
CEF_IsDown = 0x00000008,
|
|
|
|
|
|
|
|
CEF_IsOn = 0x00000010,
|
|
|
|
|
|
|
|
CEF_IsEnabled = 0x00000020,
|
|
|
|
|
|
|
|
CEF_BiState = 0x00000040,
|
|
|
|
|
|
|
|
CEF_HasFocus = 0x00000080,
|
|
|
|
|
|
|
|
CEF_IsMenuWidget = 0x00000100,
|
|
|
|
|
|
|
|
CEF_IsContainerEmpty = 0x00000200,
|
|
|
|
|
|
|
|
CEF_CenterIndicator = 0x00000400,
|
|
|
|
|
|
|
|
CEF_IndicatorFollowsStyle = 0x00000800,
|
|
|
|
|
|
|
|
CEF_UsesTextLabel = 0x00001000,
|
|
|
|
|
|
|
|
CEF_UsesBigPixmap = 0x00002000,
|
|
|
|
|
|
|
|
CEF_UseGenericParameters = 0x00004000,
|
|
|
|
|
|
|
|
CEF_HasParentWidget = 0x00008000,
|
|
|
|
|
|
|
|
CEF_HasPopupMenu = 0x00010000,
|
|
|
|
|
|
|
|
CEF_IsCheckable = 0x00020000,
|
|
|
|
|
|
|
|
CEF_HasFocusProxy = 0x00040000,
|
|
|
|
|
|
|
|
CEF_IsEditable = 0x00080000,
|
|
|
|
|
|
|
|
CEF_IsFlat = 0x00100000,
|
|
|
|
|
|
|
|
CEF_IsActiveWindow = 0x00200000,
|
|
|
|
|
|
|
|
CEF_IsTopLevel = 0x00400000,
|
|
|
|
|
|
|
|
CEF_IsVisible = 0x00800000
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
virtual void polish(TQWidget *);
|
|
|
|
virtual void polish(TQWidget *);
|
|
|
|
|
|
|
|
virtual void polish(TQStyleControlElementData ceData, ControlElementFlags, void *);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void unPolish(TQWidget *);
|
|
|
|
virtual void unPolish(TQWidget *);
|
|
|
|
|
|
|
|
virtual void unPolish(TQStyleControlElementData ceData, ControlElementFlags, void *);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void polish(TQApplication *);
|
|
|
|
virtual void polish(TQApplication *);
|
|
|
|
|
|
|
|
virtual void applicationPolish(TQStyleControlElementData, ControlElementFlags, void *);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void unPolish(TQApplication *);
|
|
|
|
virtual void unPolish(TQApplication *);
|
|
|
|
|
|
|
|
virtual void applicationUnPolish(TQStyleControlElementData, ControlElementFlags, void *);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void polish(TQPalette &);
|
|
|
|
virtual void polish(TQPalette &);
|
|
|
|
|
|
|
|
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
virtual void polishPopupMenu(TQPopupMenu *) = 0;
|
|
|
|
virtual void polishPopupMenu(TQPopupMenu *) = 0;
|
|
|
|
|
|
|
|
virtual void polishPopupMenu(TQStyleControlElementData, ControlElementFlags, void *) = 0;
|
|
|
|
%End
|
|
|
|
%End
|
|
|
|
|
|
|
|
|
|
|
|
%If (- TQt_3_0_0)
|
|
|
|
%If (- TQt_3_0_0)
|
|
|
@ -843,6 +911,141 @@ public:
|
|
|
|
static TQRect visualRect(const TQRect &,const TQRect &);
|
|
|
|
static TQRect visualRect(const TQRect &,const TQRect &);
|
|
|
|
%End
|
|
|
|
%End
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// New API
|
|
|
|
|
|
|
|
virtual void drawPrimitive( PrimitiveElement,
|
|
|
|
|
|
|
|
TQPainter*,
|
|
|
|
|
|
|
|
TQStyleControlElementData,
|
|
|
|
|
|
|
|
ControlElementFlags,
|
|
|
|
|
|
|
|
const TQRect&,
|
|
|
|
|
|
|
|
const TQColorGroup&,
|
|
|
|
|
|
|
|
SFlags = Style_Default,
|
|
|
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default ) const = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual void drawControl( ControlElement element,
|
|
|
|
|
|
|
|
TQPainter*,
|
|
|
|
|
|
|
|
TQStyleControlElementData,
|
|
|
|
|
|
|
|
ControlElementFlags,
|
|
|
|
|
|
|
|
const TQRect&,
|
|
|
|
|
|
|
|
const TQColorGroup&,
|
|
|
|
|
|
|
|
SFlags how = Style_Default,
|
|
|
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default,
|
|
|
|
|
|
|
|
const TQWidget* = 0 /* compat, will likely go away */ ) const = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual void drawControlMask( ControlElement element,
|
|
|
|
|
|
|
|
TQPainter*,
|
|
|
|
|
|
|
|
TQStyleControlElementData,
|
|
|
|
|
|
|
|
ControlElementFlags,
|
|
|
|
|
|
|
|
const TQRect&,
|
|
|
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default,
|
|
|
|
|
|
|
|
const TQWidget* = 0 /* compat, will likely go away */ ) const = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual TQRect subRect( SubRect, const TQStyleControlElementData, const ControlElementFlags, const TQWidget* ) const = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual void drawComplexControl( ComplexControl,
|
|
|
|
|
|
|
|
TQPainter*,
|
|
|
|
|
|
|
|
TQStyleControlElementData,
|
|
|
|
|
|
|
|
ControlElementFlags,
|
|
|
|
|
|
|
|
const TQRect&,
|
|
|
|
|
|
|
|
const TQColorGroup&,
|
|
|
|
|
|
|
|
SFlags = Style_Default,
|
|
|
|
|
|
|
|
SCFlags = SC_All,
|
|
|
|
|
|
|
|
SCFlags = SC_None,
|
|
|
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default,
|
|
|
|
|
|
|
|
const TQWidget* = 0 ) const = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual void drawComplexControlMask( ComplexControl,
|
|
|
|
|
|
|
|
TQPainter*,
|
|
|
|
|
|
|
|
const TQStyleControlElementData,
|
|
|
|
|
|
|
|
const ControlElementFlags,
|
|
|
|
|
|
|
|
const TQRect&,
|
|
|
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default,
|
|
|
|
|
|
|
|
const TQWidget* = 0 ) const = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual TQRect querySubControlMetrics( ComplexControl,
|
|
|
|
|
|
|
|
TQStyleControlElementData,
|
|
|
|
|
|
|
|
ControlElementFlags,
|
|
|
|
|
|
|
|
SubControl,
|
|
|
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default,
|
|
|
|
|
|
|
|
const TQWidget* = 0 ) const = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual SubControl querySubControl( ComplexControl,
|
|
|
|
|
|
|
|
TQStyleControlElementData,
|
|
|
|
|
|
|
|
ControlElementFlags,
|
|
|
|
|
|
|
|
const TQPoint&,
|
|
|
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default,
|
|
|
|
|
|
|
|
const TQWidget* = 0 ) const = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual int pixelMetric( PixelMetric,
|
|
|
|
|
|
|
|
TQStyleControlElementData,
|
|
|
|
|
|
|
|
ControlElementFlags,
|
|
|
|
|
|
|
|
const TQWidget* = 0 ) const = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual TQSize sizeFromContents( ContentsType,
|
|
|
|
|
|
|
|
TQStyleControlElementData,
|
|
|
|
|
|
|
|
ControlElementFlags,
|
|
|
|
|
|
|
|
const TQSize&,
|
|
|
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default,
|
|
|
|
|
|
|
|
const TQWidget* = 0 ) const = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual int styleHint( StyleHint,
|
|
|
|
|
|
|
|
TQStyleControlElementData,
|
|
|
|
|
|
|
|
ControlElementFlags,
|
|
|
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default,
|
|
|
|
|
|
|
|
TQStyleHintReturn* returnData = 0,
|
|
|
|
|
|
|
|
const TQWidget* = 0
|
|
|
|
|
|
|
|
) const = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual TQPixmap stylePixmap( StylePixmap,
|
|
|
|
|
|
|
|
TQStyleControlElementData,
|
|
|
|
|
|
|
|
ControlElementFlags,
|
|
|
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default,
|
|
|
|
|
|
|
|
const TQWidget* = 0 ) const = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static TQRect visualRect( const TQRect&, const TQStyleControlElementData, const ControlElementFlags );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef TQMap<void*, TQStyle*> ObjectEventSourceToHandlerMap;
|
|
|
|
|
|
|
|
typedef TQMap<void*, TQStyleControlElementData> ObjectEventSourceDataToHandlerMap;
|
|
|
|
|
|
|
|
typedef TQMap<void*, ControlElementFlags> ObjectEventSourceFlagsToHandlerMap;
|
|
|
|
|
|
|
|
typedef bool (*EventHandlerInstallationHook)(TQStyleControlElementData, ControlElementFlags, void*, TQStyle*);
|
|
|
|
|
|
|
|
typedef bool (*EventHandlerRemovalHook)(TQStyleControlElementData, ControlElementFlags, void*, TQStyle*);
|
|
|
|
|
|
|
|
void installObjectEventHandler( TQStyleControlElementData, ControlElementFlags, void*, TQStyle* );
|
|
|
|
|
|
|
|
void removeObjectEventHandler( TQStyleControlElementData, ControlElementFlags, void*, TQStyle* );
|
|
|
|
|
|
|
|
//void setEventHandlerInstallationHook( EventHandlerInstallationHook );
|
|
|
|
|
|
|
|
//void setEventHandlerRemovalHook( EventHandlerRemovalHook hook );
|
|
|
|
|
|
|
|
virtual bool objectEventHandler( TQStyleControlElementData, ControlElementFlags, void*, TQEvent * );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum WidgetActionRequest {
|
|
|
|
|
|
|
|
WAR_Repaint,
|
|
|
|
|
|
|
|
WAR_RepaintRect,
|
|
|
|
|
|
|
|
WAR_EnableMouseTracking,
|
|
|
|
|
|
|
|
WAR_DisableMouseTracking,
|
|
|
|
|
|
|
|
WAR_SetAutoMask,
|
|
|
|
|
|
|
|
WAR_UnSetAutoMask,
|
|
|
|
|
|
|
|
WAR_SetCheckable,
|
|
|
|
|
|
|
|
WAR_UnSetCheckable,
|
|
|
|
|
|
|
|
WAR_FrameSetStyle,
|
|
|
|
|
|
|
|
WAR_FrameSetLineWidth,
|
|
|
|
|
|
|
|
WAR_SetLayoutMargin,
|
|
|
|
|
|
|
|
WAR_SetPalette,
|
|
|
|
|
|
|
|
WAR_SetBackgroundMode,
|
|
|
|
|
|
|
|
WAR_SetBackgroundOrigin,
|
|
|
|
|
|
|
|
WAR_SetFont,
|
|
|
|
|
|
|
|
WAR_RepaintAllAccelerators
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef bool (*WidgetActionRequestHook)(TQStyleControlElementData, ControlElementFlags, void*, WidgetActionRequest, TQStyleWidgetActionRequestData);
|
|
|
|
|
|
|
|
//void setWidgetActionRequestHook( WidgetActionRequestHook );
|
|
|
|
|
|
|
|
virtual bool widgetActionRequest( TQStyleControlElementData, ControlElementFlags, void*, WidgetActionRequest, TQStyleWidgetActionRequestData = TQStyleWidgetActionRequestData() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum ApplicationActionRequest {
|
|
|
|
|
|
|
|
AAR_SetPalette,
|
|
|
|
|
|
|
|
AAR_SetFont
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef bool (*ApplicationActionRequestHook)(TQStyleControlElementData, ControlElementFlags, void*, ApplicationActionRequest, TQStyleApplicationActionRequestData);
|
|
|
|
|
|
|
|
//void setApplicationActionRequestHook( ApplicationActionRequestHook );
|
|
|
|
|
|
|
|
virtual bool applicationActionRequest( TQStyleControlElementData, ControlElementFlags, void*, ApplicationActionRequest, TQStyleApplicationActionRequestData = TQStyleApplicationActionRequestData() );
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
protected:
|
|
|
|
%If (TQt_2_1_0 - TQt_3_0_0)
|
|
|
|
%If (TQt_2_1_0 - TQt_3_0_0)
|
|
|
|
void setScrollBarExtent(int,int = -1);
|
|
|
|
void setScrollBarExtent(int,int = -1);
|
|
|
|