You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pytqt/sip/qt/qstyle.sip

1073 lines
27 KiB

// This is the SIP interface definition for TQStyle and TQStyleOption.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%ExportedDoc
<Sect2><Title>TQStyle (TQt v2+)</Title>
<FuncSynopsis>
<FuncDef>virtual void <Function>getButtonShift</Function></FuncDef>
<ParamDef>int &amp;<Parameter>x</Parameter></ParamDef>
<ParamDef>int &amp;<Parameter>y</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes no parameters and returns a tuple of the <Literal>x</Literal> and
<Literal>y</Literal> values. (TQt v2)
</Para>
<FuncSynopsis>
<FuncDef>virtual void <Function>scrollBarMetrics</Function></FuncDef>
<ParamDef>const TQScrollBar *<Parameter>b</Parameter></ParamDef>
<ParamDef>int &amp;<Parameter>sliderMin</Parameter></ParamDef>
<ParamDef>int &amp;<Parameter>sliderMax</Parameter></ParamDef>
<ParamDef>int &amp;<Parameter>sliderLength</Parameter></ParamDef>
<ParamDef>int &amp;<Parameter>buttonDim</Parameter></ParamDef>
</FuncSynopsis>
<Para>
Thus takes only the <Literal>b</Literal> parameter and returns a tuple of the
<Literal>sliderMin</Literal>, <Literal>sliderMax</Literal>,
<Literal>sliderLength</Literal> and <Literal>buttonDim</Literal> values.
(TQt v2)
</Para>
<FuncSynopsis>
<FuncDef>virtual void <Function>tabbarMetrics</Function></FuncDef>
<ParamDef>const TQTabBar *<Parameter>t</Parameter></ParamDef>
<ParamDef>int &amp;<Parameter>hframe</Parameter></ParamDef>
<ParamDef>int &amp;<Parameter>vframe</Parameter></ParamDef>
<ParamDef>int &amp;<Parameter>overlap</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes only the <Literal>t</Literal> parameter and returns a tuple of the
<Literal>hframe</Literal>, <Literal>vframe</Literal> and
<Literal>overlap</Literal> values. (TQt v2)
</Para>
</Sect2>
<Sect2><Title>TQStyleOption (TQt v3+)</Title>
<Para>
<Literal>TQStyleOption</Literal> is fully implemented.
</Para>
</Sect2>
%End
%If (TQt_3_0_0 -)
class TQStyleOption
{
%TypeHeaderCode
#define ENABLE_QSTYLECONTROLELEMENTDATA_SLOW_COPY 1
#include <tqstyle.h>
%End
public:
enum StyleOptionDefault {
Default
};
TQStyleOption(StyleOptionDefault /Constrained/ = Default);
%If (TQt_3_2_0 -)
TQStyleOption(int);
%End
TQStyleOption(int,int);
TQStyleOption(int,int,int,int);
TQStyleOption(TQMenuItem *);
TQStyleOption(TQMenuItem *,int);
TQStyleOption(TQMenuItem *,int,int);
TQStyleOption(const TQColor &);
TQStyleOption(TQTab *);
TQStyleOption(TQListViewItem *);
%If (TQt_3_1_0 -)
TQStyleOption(TQCheckListItem *);
%End
TQStyleOption(TQt::ArrowType /Constrained/);
%If (TQt_3_1_0 -)
TQStyleOption(const TQRect &);
TQStyleOption(TQWidget *);
%End
bool isDefault() const;
%If (TQt_3_3_0 -)
int day() const;
%End
int lineWidth() const;
int midLineWidth() const;
int frameShape() const;
int frameShadow() const;
%If (TQt_3_2_0 -)
int headerSection() const;
%End
TQMenuItem* menuItem() const;
int maxIconWidth() const;
int tabWidth() const;
const TQColor& color() const;
TQTab *tab() const;
%If (TQt_3_1_0 -)
TQCheckListItem *checkListItem() const;
%End
TQListViewItem *listViewItem() const;
TQt::ArrowType arrowType() const;
%If (TQt_3_1_0 -)
TQRect rect() const;
TQWidget *widget() const;
%End
};
%End
%If (TQt_3_0_0 -)
// Not yet defined in TQt v3Beta5.
class TQStyleHintReturn;
%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
{
%TypeHeaderCode
#define ENABLE_QSTYLECONTROLELEMENTDATA_SLOW_COPY 1
#include <tqstyle.h>
%End
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 -)
class TQStyle : TQObject
{
%TypeHeaderCode
#define ENABLE_QSTYLECONTROLELEMENTDATA_SLOW_COPY 1
#include <tqstyle.h>
%End
public:
%If (TQt_3_0_0 -)
TQStyle();
%End
%If (- TQt_3_0_0)
GUIStyle guiStyle() const;
%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(const TQStyleControlElementData &ceData, ControlElementFlags, void *);
virtual void unPolish(TQWidget *);
virtual void unPolish(const TQStyleControlElementData &ceData, ControlElementFlags, void *);
virtual void polish(TQApplication *);
virtual void applicationPolish(const TQStyleControlElementData&, ControlElementFlags, void *);
virtual void unPolish(TQApplication *);
virtual void applicationUnPolish(const TQStyleControlElementData&, ControlElementFlags, void *);
virtual void polish(TQPalette &);
%If (TQt_3_0_0 -)
virtual void polishPopupMenu(TQPopupMenu *) = 0;
virtual void polishPopupMenu(const TQStyleControlElementData&, ControlElementFlags, void *) = 0;
%End
%If (- TQt_3_0_0)
virtual TQRect itemRect(TQPainter *,int,int,int,int,int,bool,
const TQPixmap *,const TQString &,int = -1);
virtual void drawItem(TQPainter *,int,int,int,int,int,
const TQColorGroup &,bool,const TQPixmap *,
const TQString &,int = -1,const TQColor * = 0);
%End
%If (TQt_3_0_0 -)
virtual TQRect itemRect(TQPainter *,const TQRect &,int,bool,
const TQPixmap *,const TQString &,int = -1) const;
virtual void drawItem(TQPainter *,const TQRect &,int,const TQColorGroup &,
bool,const TQPixmap *,const TQString &,int = -1,
const TQColor * = 0) const;
%End
%If (- TQt_3_0_0)
virtual void drawSeparator(TQPainter *,int,int,int,int,
const TQColorGroup &,bool = 1,int = 1,
int = 0);
virtual void drawRect(TQPainter *,int,int,int,int,const TQColor &,
int = 1,const TQBrush * = 0);
virtual void drawRectStrong(TQPainter *,int,int,int,int,
const TQColorGroup &,bool = 0,int = 1,
int = 0,const TQBrush * = 0);
virtual void drawButton(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,const TQBrush * = 0) = 0;
virtual TQRect buttonRect(int,int,int,int);
virtual void drawButtonMask(TQPainter *,int,int,int,int);
virtual void drawBevelButton(TQPainter *,int,int,int,int,
const TQColorGroup &,bool = 0,
const TQBrush * = 0) = 0;
%If (TQt_2_1_0 -)
TQRect bevelButtonRect(int,int,int,int);
%End
virtual void drawToolButton(TQPainter *,int,int,int,int,
const TQColorGroup &,bool = 0,
const TQBrush * = 0);
%If (TQt_2_1_0 -)
void drawToolButton(TQToolButton *,TQPainter *);
TQRect toolButtonRect(int,int,int,int);
%End
virtual void drawPanel(TQPainter *,int,int,int,int,const TQColorGroup &,
bool = 0,int = 1,const TQBrush * = 0);
virtual void drawPopupPanel(TQPainter *,int,int,int,int,
const TQColorGroup &,int = 2,
const TQBrush * = 0);
virtual void drawArrow(TQPainter *,TQt::ArrowType,bool,int,int,int,int,
const TQColorGroup &,bool,const TQBrush * = 0) = 0;
virtual TQSize exclusiveIndicatorSize() const = 0;
virtual void drawExclusiveIndicator(TQPainter *,int,int,int,int,
const TQColorGroup &,bool,bool = 0,
bool = 1) = 0;
virtual void drawExclusiveIndicatorMask(TQPainter *,int,int,int,int,
bool);
virtual TQSize indicatorSize() const = 0;
virtual void drawIndicator(TQPainter *,int,int,int,int,
const TQColorGroup &,int,bool = 0,
bool = 1) = 0;
virtual void drawIndicatorMask(TQPainter *,int,int,int,int,int);
virtual void drawFocusRect(TQPainter *,const TQRect &,const TQColorGroup &,
const TQColor * = 0,bool = 0) = 0;
virtual void drawComboButton(TQPainter *,int,int,int,int,
const TQColorGroup &,bool = 0,bool = 0,
bool = 1,const TQBrush * = 0) = 0;
virtual TQRect comboButtonRect(int,int,int,int) = 0;
virtual TQRect comboButtonFocusRect(int,int,int,int) = 0;
virtual void drawComboButtonMask(TQPainter *,int,int,int,int) = 0;
virtual void drawPushButton(TQPushButton *,TQPainter *) = 0;
virtual void drawPushButtonLabel(TQPushButton *,TQPainter *) = 0;
%If (TQt_2_1_0 -)
TQRect pushButtonContentsRect(TQPushButton *);
int menuButtonIndicatorWidth(int);
%End
virtual void getButtonShift(int &,int &) = 0;
virtual int defaultFrameWidth() const = 0;
virtual void tabbarMetrics(const TQTabBar *,int &,int &,int &) = 0;
virtual void drawTab(TQPainter *,const TQTabBar *,TQTab *,bool) = 0;
virtual void drawTabMask(TQPainter *,const TQTabBar* ,TQTab* ,bool) = 0;
enum ScrollControl
{
AddLine = 0x1,
SubLine = 0x2,
AddPage = 0x4,
SubPage = 0x8,
First = 0x10,
Last = 0x20,
Slider = 0x40,
NoScroll = 0x80
};
virtual void scrollBarMetrics(const TQScrollBar *,int &,int &,int &,
int &) = 0;
virtual void drawScrollBarControls(TQPainter *,const TQScrollBar *,int,
uint,uint) = 0;
virtual ScrollControl scrollBarPointOver(const TQScrollBar *,int,
const TQPoint &) = 0;
virtual int sliderLength() const = 0;
virtual void drawSlider(TQPainter *,int,int,int,int,const TQColorGroup &,
Orientation,bool,bool) = 0;
virtual void drawSliderMask(TQPainter *,int,int,int,int,Orientation,
bool,bool) = 0;
virtual void drawSliderGroove(TQPainter *,int,int,int,int,
const TQColorGroup &,TQCOORD,
Orientation) = 0;
virtual void drawSliderGrooveMask(TQPainter *,int,int,int,int,TQCOORD,
Orientation) = 0;
virtual int maximumSliderDragDistance() const = 0;
virtual int splitterWidth() const = 0;
virtual void drawSplitter(TQPainter *,int,int,int,int,
const TQColorGroup &,Orientation) = 0;
virtual void drawCheckMark(TQPainter *,int,int,int,int,
const TQColorGroup &,bool,bool) = 0;
virtual void polishPopupMenu(TQPopupMenu *) = 0;
virtual int extraPopupMenuItemWidth(bool,int,TQMenuItem *,
const TQFontMetrics &) = 0;
virtual int popupSubmenuIndicatorWidth(const TQFontMetrics &) = 0;
virtual int popupMenuItemHeight(bool,TQMenuItem *,
const TQFontMetrics &) = 0;
virtual void drawPopupMenuItem(TQPainter *,bool,int,int,TQMenuItem *,
const TQPalette &,bool, bool,int,int,int,
int) = 0;
%If (TQt_2_2_0 -)
virtual void drawMenuBarItem(TQPainter *,int,int,int,int,TQMenuItem *,
TQColorGroup &,bool,bool);
%End
%If (TQt_2_1_0 -)
TQSize scrollBarExtent();
int buttonDefaultIndicatorWidth() const;
%If (TQt_2_2_0 -)
int buttonMargin() const;
int toolBarHandleExtent() const;
int sliderThickness() const;
%End
int toolBarHandleExtend() const;
void drawToolBarHandle(TQPainter *,const TQRect &,TQt::Orientation,bool,
const TQColorGroup &,bool = 0);
%End
%End
%If (TQt_3_0_0 -)
enum PrimitiveElement {
PE_ButtonCommand,
PE_ButtonDefault,
PE_ButtonBevel,
PE_ButtonTool,
PE_ButtonDropDown,
PE_FocusRect,
PE_ArrowUp,
PE_ArrowDown,
PE_ArrowRight,
PE_ArrowLeft,
PE_SpinWidgetUp,
PE_SpinWidgetDown,
PE_SpinWidgetPlus,
PE_SpinWidgetMinus,
PE_Indicator,
PE_IndicatorMask,
PE_ExclusiveIndicator,
PE_ExclusiveIndicatorMask,
PE_DockWindowHandle,
PE_DockWindowSeparator,
PE_DockWindowResizeHandle,
PE_Splitter,
PE_Panel,
PE_PanelPopup,
PE_PanelMenuBar,
PE_PanelDockWindow,
PE_TabBarBase,
PE_HeaderSection,
PE_HeaderArrow,
PE_StatusBarSection,
PE_GroupBoxFrame,
PE_Separator,
PE_SizeGrip,
PE_CheckMark,
PE_ScrollBarAddLine,
PE_ScrollBarSubLine,
PE_ScrollBarAddPage,
PE_ScrollBarSubPage,
PE_ScrollBarSlider,
PE_ScrollBarFirst,
PE_ScrollBarLast,
PE_ProgressBarChunk,
%If (TQt_3_0_1 -)
PE_PanelLineEdit,
PE_PanelTabWidget,
PE_WindowFrame,
%End
%If (TQt_3_1_0 -)
PE_CheckListController,
PE_CheckListIndicator,
PE_CheckListExclusiveIndicator,
PE_PanelGroupBox,
%End
%If (TQt_3_0_4 - TQt_3_0_5)
PE_PopupMenuScroller,
%End
%If (TQt_3_3_0 -)
PE_RubberBand,
%End
PE_CustomBase
};
enum StyleFlags {
Style_Default,
Style_Enabled,
Style_Raised,
Style_Sunken,
Style_Off,
Style_NoChange,
Style_On,
Style_Down,
Style_Horizontal,
Style_HasFocus,
Style_Top,
Style_Bottom,
Style_FocusAtBorder,
Style_AutoRaise,
Style_MouseOver,
Style_Up,
Style_Selected,
Style_Active,
Style_ButtonDefault
};
typedef uint SFlags;
virtual void drawPrimitive(PrimitiveElement,TQPainter *,const TQRect &,
const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const = 0;
enum ControlElement {
CE_PushButton,
CE_PushButtonLabel,
CE_CheckBox,
CE_CheckBoxLabel,
CE_RadioButton,
CE_RadioButtonLabel,
CE_TabBarTab,
CE_TabBarLabel,
CE_ProgressBarGroove,
CE_ProgressBarContents,
CE_ProgressBarLabel,
CE_PopupMenuItem,
CE_MenuBarItem,
CE_ToolButtonLabel,
%If (TQt_3_1_0 -)
CE_MenuBarEmptyArea,
%End
%If (TQt_3_0_5 -)
CE_PopupMenuScroller,
%End
%If (TQt_3_1_0 -)
CE_DockWindowEmptyArea,
%End
%If (TQt_3_2_0 -)
CE_PopupMenuVerticalExtra,
CE_PopupMenuHorizontalExtra,
CE_ToolBoxTab,
CE_HeaderLabel,
%End
CE_CustomBase
};
virtual void drawControl(ControlElement,TQPainter *,const TQWidget *,
const TQRect &,const TQColorGroup &,
SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const = 0;
virtual void drawControlMask(ControlElement,TQPainter *,const TQWidget *,
const TQRect &,
const TQStyleOption & = TQStyleOption()) const = 0;
enum SubRect {
SR_PushButtonContents,
SR_PushButtonFocusRect,
SR_CheckBoxIndicator,
SR_CheckBoxContents,
SR_CheckBoxFocusRect,
SR_RadioButtonIndicator,
SR_RadioButtonContents,
SR_RadioButtonFocusRect,
SR_ComboBoxFocusRect,
SR_SliderFocusRect,
SR_DockWindowHandleRect,
SR_ProgressBarGroove,
SR_ProgressBarContents,
SR_ProgressBarLabel,
SR_ToolButtonContents,
%If (TQt_3_2_0 -)
SR_DialogButtonAccept,
SR_DialogButtonReject,
SR_DialogButtonApply,
SR_DialogButtonHelp,
SR_DialogButtonAll,
SR_DialogButtonAbort,
SR_DialogButtonIgnore,
SR_DialogButtonRetry,
SR_DialogButtonCustom,
SR_ToolBoxTabContents,
%End
SR_CustomBase
};
virtual TQRect subRect(SubRect,const TQWidget *) const = 0;
enum ComplexControl{
CC_SpinWidget,
CC_ComboBox,
CC_ScrollBar,
CC_Slider,
CC_ToolButton,
CC_TitleBar,
CC_ListView,
CC_CustomBase
};
enum SubControl {
SC_None,
SC_ScrollBarAddLine,
SC_ScrollBarSubLine,
SC_ScrollBarAddPage,
SC_ScrollBarSubPage,
SC_ScrollBarFirst,
SC_ScrollBarLast,
SC_ScrollBarSlider,
SC_ScrollBarGroove,
SC_SpinWidgetUp,
SC_SpinWidgetDown,
SC_SpinWidgetFrame,
SC_SpinWidgetEditField,
SC_SpinWidgetButtonField,
SC_ComboBoxFrame,
SC_ComboBoxEditField,
SC_ComboBoxArrow,
%If (TQt_3_1_0 -)
SC_ComboBoxListBoxPopup,
%End
SC_SliderGroove,
SC_SliderHandle,
SC_SliderTickmarks,
SC_ToolButton,
SC_ToolButtonMenu,
SC_TitleBarLabel,
SC_TitleBarSysMenu,
SC_TitleBarMinButton,
SC_TitleBarMaxButton,
SC_TitleBarCloseButton,
SC_TitleBarNormalButton,
SC_TitleBarShadeButton,
SC_TitleBarUnshadeButton,
SC_ListView,
SC_ListViewBranch,
SC_ListViewExpand,
SC_All
};
typedef uint SCFlags;
virtual void drawComplexControl(ComplexControl,TQPainter *,
const TQWidget *,const TQRect &,
const TQColorGroup &,
SFlags = Style_Default,
SCFlags = SC_All,SCFlags = SC_None,
const TQStyleOption & = TQStyleOption()) const = 0;
virtual void drawComplexControlMask(ComplexControl,TQPainter *,
const TQWidget *,const TQRect &,
const TQStyleOption & = TQStyleOption()) const = 0;
virtual TQRect querySubControlMetrics(ComplexControl,
const TQWidget *,SubControl,
const TQStyleOption & = TQStyleOption()) const = 0;
virtual SubControl querySubControl(ComplexControl,const TQWidget *,
const TQPoint &,
const TQStyleOption & = TQStyleOption()) const = 0;
enum PixelMetric {
PM_ButtonMargin,
PM_ButtonDefaultIndicator,
PM_MenuButtonIndicator,
PM_ButtonShiftHorizontal,
PM_ButtonShiftVertical,
PM_DefaultFrameWidth,
PM_SpinBoxFrameWidth,
PM_MaximumDragDistance,
PM_ScrollBarExtent,
PM_ScrollBarSliderMin,
PM_SliderThickness,
PM_SliderControlThickness,
PM_SliderLength,
PM_SliderTickmarkOffset,
PM_SliderSpaceAvailable,
PM_DockWindowSeparatorExtent,
PM_DockWindowHandleExtent,
PM_DockWindowFrameWidth,
PM_MenuBarFrameWidth,
PM_TabBarTabOverlap,
PM_TabBarTabHSpace,
PM_TabBarTabVSpace,
PM_TabBarBaseHeight,
PM_TabBarBaseOverlap,
PM_ProgressBarChunkWidth,
PM_SplitterWidth,
PM_TitleBarHeight,
PM_IndicatorWidth,
PM_IndicatorHeight,
PM_ExclusiveIndicatorWidth,
PM_ExclusiveIndicatorHeight,
%If (TQt_3_0_4 -)
PM_PopupMenuScrollerHeight,
%End
%If (TQt_3_1_0 -)
PM_CheckListButtonSize,
%End
%If (TQt_3_2_0 -)
PM_CheckListControllerSize,
PM_PopupMenuFrameHorizontalExtra,
PM_PopupMenuFrameVerticalExtra,
PM_DialogButtonsSeparator,
PM_DialogButtonsButtonWidth,
PM_DialogButtonsButtonHeight,
PM_MDIFrameWidth,
PM_MDIMinimizedWidth,
PM_HeaderMargin,
PM_HeaderMarkSize,
PM_HeaderGripMargin,
PM_TabBarTabShiftHorizontal,
PM_TabBarTabShiftVertical,
%End
%If (TQt_3_3_0 -)
PM_TabBarScrollButtonWidth,
PM_MenuBarItemSpacing,
PM_ToolBarItemSpacing,
%End
PM_CustomBase
};
virtual int pixelMetric(PixelMetric,const TQWidget * = 0) const = 0;
enum ContentsType {
CT_PushButton,
CT_CheckBox,
CT_RadioButton,
CT_ToolButton,
CT_ComboBox,
CT_Splitter,
CT_DockWindow,
CT_ProgressBar,
CT_PopupMenuItem,
%If (TQt_3_1_0 -)
CT_TabBarTab,
CT_Slider,
CT_Header,
CT_LineEdit,
CT_MenuBar,
CT_SpinBox,
%End
%If (TQt_3_2_0 -)
CT_SizeGrip,
CT_TabWidget,
CT_DialogButtons,
%End
CT_CustomBase
};
virtual TQSize sizeFromContents(ContentsType,const TQWidget *,
const TQSize &,
const TQStyleOption & = TQStyleOption()) const = 0;
enum StyleHint {
SH_EtchDisabledText,
SH_GUIStyle,
SH_ScrollBar_BackgroundMode,
SH_ScrollBar_MiddleClickAbsolutePosition,
SH_ScrollBar_ScrollWhenPointerLeavesControl,
SH_TabBar_SelectMouseType,
SH_TabBar_Alignment,
SH_Header_ArrowAlignment,
SH_Slider_SnapToValue,
SH_Slider_SloppyKeyEvents,
SH_ProgressDialog_CenterCancelButton,
SH_ProgressDialog_TextLabelAlignment,
SH_PrintDialog_RightAlignButtons,
SH_MainWindow_SpaceBelowMenuBar,
SH_FontDialog_SelectAssociatedText,
SH_PopupMenu_AllowActiveAndDisabled,
SH_PopupMenu_SpaceActivatesItem,
SH_PopupMenu_SubMenuPopupDelay,
SH_ScrollView_FrameOnlyAroundContents,
SH_MenuBar_AltKeyNavigation,
SH_ComboBox_ListMouseTracking,
SH_PopupMenu_MouseTracking,
SH_MenuBar_MouseTracking,
SH_ItemView_ChangeHighlightOnFocus,
SH_Widget_ShareActivation,
SH_Workspace_FillSpaceOnMaximize,
SH_ComboBox_Popup,
%If (TQt_3_0_1 -)
SH_TitleBar_NoBorder,
SH_ScrollBar_StopMouseOverSlider,
%End
%If (TQt_3_0_2 -)
SH_BlinkCursorWhenTextSelected,
SH_RichText_FullWidthSelection,
%End
%If (TQt_3_0_4 -)
SH_PopupMenu_Scrollable,
%End
%If (TQt_3_1_0 -)
SH_GroupBox_TextLabelVerticalAlignment,
SH_GroupBox_TextLabelColor,
SH_PopupMenu_SloppySubMenus,
%End
%If (TQt_3_2_0 -)
SH_Table_GridLineColor,
SH_LineEdit_PasswordCharacter,
SH_DialogButtons_DefaultButton,
SH_ToolBox_SelectedPageTitleBold,
SH_TabBar_PreferNoArrows,
SH_ScrollBar_LeftClickAbsolutePosition,
SH_ListViewExpand_SelectMouseType,
%End
%If (TQt_3_3_0 -)
SH_UnderlineAccelerator,
SH_ToolButton_Uses3D,
%End
SH_CustomBase
};
virtual int styleHint(StyleHint,const TQWidget * = 0,
const TQStyleOption & = TQStyleOption(),
TQStyleHintReturn * = 0) const = 0;
enum StylePixmap {
SP_TitleBarMinButton,
SP_TitleBarMaxButton,
SP_TitleBarCloseButton,
SP_TitleBarNormalButton,
SP_TitleBarShadeButton,
SP_TitleBarUnshadeButton,
SP_DockWindowCloseButton,
SP_MessageBoxInformation,
SP_MessageBoxWarning,
SP_MessageBoxCritical,
%If (TQt_3_2_0 -)
SP_MessageBoxQuestion,
%End
SP_CustomBase
};
virtual TQPixmap stylePixmap(StylePixmap,const TQWidget * = 0,
const TQStyleOption & = TQStyleOption()) const = 0;
static TQRect visualRect(const TQRect &,const TQWidget *);
static TQRect visualRect(const TQRect &,const TQRect &);
%End
// New API
virtual void drawPrimitive( PrimitiveElement,
TQPainter*,
const TQStyleControlElementData&,
ControlElementFlags,
const TQRect&,
const TQColorGroup&,
SFlags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const = 0;
virtual void drawControl( ControlElement element,
TQPainter*,
const 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*,
const 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*,
const 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,
const TQStyleControlElementData&,
ControlElementFlags,
SubControl,
const TQStyleOption& = TQStyleOption::Default,
const TQWidget* = 0 ) const = 0;
virtual SubControl querySubControl( ComplexControl,
const TQStyleControlElementData&,
ControlElementFlags,
const TQPoint&,
const TQStyleOption& = TQStyleOption::Default,
const TQWidget* = 0 ) const = 0;
virtual int pixelMetric( PixelMetric,
const TQStyleControlElementData&,
ControlElementFlags,
const TQWidget* = 0 ) const = 0;
virtual TQSize sizeFromContents( ContentsType,
const TQStyleControlElementData&,
ControlElementFlags,
const TQSize&,
const TQStyleOption& = TQStyleOption::Default,
const TQWidget* = 0 ) const = 0;
virtual int styleHint( StyleHint,
const TQStyleControlElementData&,
ControlElementFlags,
const TQStyleOption& = TQStyleOption::Default,
TQStyleHintReturn* returnData = 0,
const TQWidget* = 0
) const = 0;
virtual TQPixmap stylePixmap( StylePixmap,
const 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)(const TQStyleControlElementData&, ControlElementFlags, void*, TQStyle*);
typedef bool (*EventHandlerRemovalHook)(const TQStyleControlElementData&, ControlElementFlags, void*, TQStyle*);
void installObjectEventHandler( const TQStyleControlElementData&, ControlElementFlags, void*, TQStyle* );
void removeObjectEventHandler( const TQStyleControlElementData&, ControlElementFlags, void*, TQStyle* );
//void setEventHandlerInstallationHook( EventHandlerInstallationHook );
//void setEventHandlerRemovalHook( EventHandlerRemovalHook hook );
virtual bool objectEventHandler( const 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)(const TQStyleControlElementData&, ControlElementFlags, void*, WidgetActionRequest, TQStyleWidgetActionRequestData);
//void setWidgetActionRequestHook( WidgetActionRequestHook );
virtual bool widgetActionRequest( const TQStyleControlElementData&, ControlElementFlags, void*, WidgetActionRequest, TQStyleWidgetActionRequestData = TQStyleWidgetActionRequestData() );
enum ApplicationActionRequest {
AAR_SetPalette,
AAR_SetFont
};
typedef bool (*ApplicationActionRequestHook)(const TQStyleControlElementData&, ControlElementFlags, void*, ApplicationActionRequest, TQStyleApplicationActionRequestData);
//void setApplicationActionRequestHook( ApplicationActionRequestHook );
virtual bool applicationActionRequest( const TQStyleControlElementData&, ControlElementFlags, void*, ApplicationActionRequest, TQStyleApplicationActionRequestData = TQStyleApplicationActionRequestData() );
protected:
%If (TQt_2_1_0 - TQt_3_0_0)
void setScrollBarExtent(int,int = -1);
void setButtonDefaultIndicatorWidth(int);
%End
private:
%If (- TQt_3_0_0)
TQStyle();
TQStyle(GUIStyle);
%End
%If (TQt_2_1_0 -)
TQStyle(const TQStyle &);
%End
};
%End