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.
842 lines
20 KiB
842 lines
20 KiB
13 years ago
|
// This is the SIP interface definition for TQStyle and TQStyleOption.
|
||
13 years ago
|
//
|
||
|
// Copyright (c) 2007
|
||
|
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
|
||
|
//
|
||
13 years ago
|
// This file is part of PyTQt.
|
||
13 years ago
|
//
|
||
13 years ago
|
// This copy of PyTQt is free software; you can redistribute it and/or modify it
|
||
13 years ago
|
// 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.
|
||
|
//
|
||
13 years ago
|
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
|
||
13 years ago
|
// 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
|
||
13 years ago
|
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
|
||
13 years ago
|
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||
|
|
||
|
|
||
|
%ExportedDoc
|
||
13 years ago
|
<Sect2><Title>TQStyle (TQt v2+)</Title>
|
||
13 years ago
|
<FuncSynopsis>
|
||
|
<FuncDef>virtual void <Function>getButtonShift</Function></FuncDef>
|
||
|
<ParamDef>int &<Parameter>x</Parameter></ParamDef>
|
||
|
<ParamDef>int &<Parameter>y</Parameter></ParamDef>
|
||
|
</FuncSynopsis>
|
||
|
<Para>
|
||
|
This takes no parameters and returns a tuple of the <Literal>x</Literal> and
|
||
13 years ago
|
<Literal>y</Literal> values. (TQt v2)
|
||
13 years ago
|
</Para>
|
||
|
|
||
|
<FuncSynopsis>
|
||
|
<FuncDef>virtual void <Function>scrollBarMetrics</Function></FuncDef>
|
||
13 years ago
|
<ParamDef>const TQScrollBar *<Parameter>b</Parameter></ParamDef>
|
||
13 years ago
|
<ParamDef>int &<Parameter>sliderMin</Parameter></ParamDef>
|
||
|
<ParamDef>int &<Parameter>sliderMax</Parameter></ParamDef>
|
||
|
<ParamDef>int &<Parameter>sliderLength</Parameter></ParamDef>
|
||
|
<ParamDef>int &<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.
|
||
13 years ago
|
(TQt v2)
|
||
13 years ago
|
</Para>
|
||
|
|
||
|
<FuncSynopsis>
|
||
|
<FuncDef>virtual void <Function>tabbarMetrics</Function></FuncDef>
|
||
13 years ago
|
<ParamDef>const TQTabBar *<Parameter>t</Parameter></ParamDef>
|
||
13 years ago
|
<ParamDef>int &<Parameter>hframe</Parameter></ParamDef>
|
||
|
<ParamDef>int &<Parameter>vframe</Parameter></ParamDef>
|
||
|
<ParamDef>int &<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
|
||
13 years ago
|
<Literal>overlap</Literal> values. (TQt v2)
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQStyleOption (TQt v3+)</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQStyleOption</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
%End
|
||
|
|
||
|
|
||
13 years ago
|
class TQStyleOption
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
3 years ago
|
#define ENABLE_TQSTYLECONTROLELEMENTDATA_SLOW_COPY 1
|
||
13 years ago
|
#include <tqstyle.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
|
enum StyleOptionDefault {
|
||
|
Default
|
||
|
};
|
||
|
|
||
13 years ago
|
TQStyleOption(StyleOptionDefault /Constrained/ = Default);
|
||
13 years ago
|
|
||
13 years ago
|
TQStyleOption(int);
|
||
|
TQStyleOption(int,int);
|
||
|
TQStyleOption(int,int,int,int);
|
||
|
TQStyleOption(TQMenuItem *);
|
||
|
TQStyleOption(TQMenuItem *,int);
|
||
|
TQStyleOption(TQMenuItem *,int,int);
|
||
|
TQStyleOption(const TQColor &);
|
||
|
TQStyleOption(TQTab *);
|
||
|
TQStyleOption(TQListViewItem *);
|
||
|
TQStyleOption(TQCheckListItem *);
|
||
|
TQStyleOption(TQt::ArrowType /Constrained/);
|
||
|
TQStyleOption(const TQRect &);
|
||
|
TQStyleOption(TQWidget *);
|
||
13 years ago
|
|
||
|
bool isDefault() const;
|
||
|
|
||
|
int day() const;
|
||
|
|
||
|
int lineWidth() const;
|
||
|
int midLineWidth() const;
|
||
|
int frameShape() const;
|
||
|
int frameShadow() const;
|
||
|
|
||
|
int headerSection() const;
|
||
13 years ago
|
TQMenuItem* menuItem() const;
|
||
13 years ago
|
int maxIconWidth() const;
|
||
|
int tabWidth() const;
|
||
|
|
||
13 years ago
|
const TQColor& color() const;
|
||
13 years ago
|
|
||
13 years ago
|
TQTab *tab() const;
|
||
13 years ago
|
|
||
13 years ago
|
TQCheckListItem *checkListItem() const;
|
||
|
TQListViewItem *listViewItem() const;
|
||
13 years ago
|
|
||
13 years ago
|
TQt::ArrowType arrowType() const;
|
||
|
TQRect rect() const;
|
||
|
TQWidget *widget() const;
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
// Not yet defined in TQt v3Beta5.
|
||
|
class TQStyleHintReturn;
|
||
13 years ago
|
|
||
12 years ago
|
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
|
||
|
{
|
||
11 years ago
|
%TypeHeaderCode
|
||
3 years ago
|
#define ENABLE_TQSTYLECONTROLELEMENTDATA_SLOW_COPY 1
|
||
11 years ago
|
#include <tqstyle.h>
|
||
|
%End
|
||
|
|
||
12 years ago
|
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;
|
||
13 years ago
|
|
||
13 years ago
|
class TQStyle : TQObject
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
3 years ago
|
#define ENABLE_TQSTYLECONTROLELEMENTDATA_SLOW_COPY 1
|
||
13 years ago
|
#include <tqstyle.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQStyle();
|
||
13 years ago
|
|
||
12 years ago
|
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
|
||
|
};
|
||
|
|
||
13 years ago
|
virtual void polish(TQWidget *);
|
||
11 years ago
|
virtual void polish(const TQStyleControlElementData &ceData, ControlElementFlags, void *);
|
||
12 years ago
|
|
||
13 years ago
|
virtual void unPolish(TQWidget *);
|
||
11 years ago
|
virtual void unPolish(const TQStyleControlElementData &ceData, ControlElementFlags, void *);
|
||
13 years ago
|
|
||
13 years ago
|
virtual void polish(TQApplication *);
|
||
12 years ago
|
virtual void applicationPolish(const TQStyleControlElementData&, ControlElementFlags, void *);
|
||
12 years ago
|
|
||
13 years ago
|
virtual void unPolish(TQApplication *);
|
||
12 years ago
|
virtual void applicationUnPolish(const TQStyleControlElementData&, ControlElementFlags, void *);
|
||
13 years ago
|
|
||
13 years ago
|
virtual void polish(TQPalette &);
|
||
13 years ago
|
|
||
13 years ago
|
virtual void polishPopupMenu(TQPopupMenu *) = 0;
|
||
12 years ago
|
virtual void polishPopupMenu(const TQStyleControlElementData&, ControlElementFlags, void *) = 0;
|
||
13 years ago
|
|
||
13 years ago
|
virtual TQRect itemRect(TQPainter *,const TQRect &,int,bool,
|
||
|
const TQPixmap *,const TQString &,int = -1) const;
|
||
13 years ago
|
|
||
13 years ago
|
virtual void drawItem(TQPainter *,const TQRect &,int,const TQColorGroup &,
|
||
|
bool,const TQPixmap *,const TQString &,int = -1,
|
||
|
const TQColor * = 0) const;
|
||
13 years ago
|
|
||
|
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,
|
||
|
|
||
|
PE_PanelLineEdit,
|
||
|
PE_PanelTabWidget,
|
||
|
|
||
|
PE_WindowFrame,
|
||
|
PE_CheckListController,
|
||
|
PE_CheckListIndicator,
|
||
|
PE_CheckListExclusiveIndicator,
|
||
|
|
||
|
PE_PanelGroupBox,
|
||
|
PE_RubberBand,
|
||
|
|
||
|
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;
|
||
|
|
||
13 years ago
|
virtual void drawPrimitive(PrimitiveElement,TQPainter *,const TQRect &,
|
||
|
const TQColorGroup &,SFlags = Style_Default,
|
||
|
const TQStyleOption & = TQStyleOption()) const = 0;
|
||
13 years ago
|
|
||
|
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,
|
||
|
CE_MenuBarEmptyArea,
|
||
|
CE_PopupMenuScroller,
|
||
|
CE_DockWindowEmptyArea,
|
||
|
CE_PopupMenuVerticalExtra,
|
||
|
CE_PopupMenuHorizontalExtra,
|
||
|
|
||
|
CE_ToolBoxTab,
|
||
|
CE_HeaderLabel,
|
||
|
|
||
|
CE_CustomBase
|
||
|
};
|
||
|
|
||
13 years ago
|
virtual void drawControl(ControlElement,TQPainter *,const TQWidget *,
|
||
|
const TQRect &,const TQColorGroup &,
|
||
13 years ago
|
SFlags = Style_Default,
|
||
13 years ago
|
const TQStyleOption & = TQStyleOption()) const = 0;
|
||
|
virtual void drawControlMask(ControlElement,TQPainter *,const TQWidget *,
|
||
|
const TQRect &,
|
||
|
const TQStyleOption & = TQStyleOption()) const = 0;
|
||
13 years ago
|
|
||
|
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,
|
||
|
|
||
|
SR_DialogButtonAccept,
|
||
|
SR_DialogButtonReject,
|
||
|
SR_DialogButtonApply,
|
||
|
SR_DialogButtonHelp,
|
||
|
SR_DialogButtonAll,
|
||
|
SR_DialogButtonAbort,
|
||
|
SR_DialogButtonIgnore,
|
||
|
SR_DialogButtonRetry,
|
||
|
SR_DialogButtonCustom,
|
||
|
|
||
|
SR_ToolBoxTabContents,
|
||
|
|
||
|
SR_CustomBase
|
||
|
};
|
||
|
|
||
13 years ago
|
virtual TQRect subRect(SubRect,const TQWidget *) const = 0;
|
||
13 years ago
|
|
||
|
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,
|
||
|
SC_ComboBoxListBoxPopup,
|
||
|
|
||
|
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;
|
||
|
|
||
13 years ago
|
virtual void drawComplexControl(ComplexControl,TQPainter *,
|
||
|
const TQWidget *,const TQRect &,
|
||
|
const TQColorGroup &,
|
||
13 years ago
|
SFlags = Style_Default,
|
||
|
SCFlags = SC_All,SCFlags = SC_None,
|
||
13 years ago
|
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;
|
||
13 years ago
|
|
||
|
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,
|
||
|
PM_PopupMenuScrollerHeight,
|
||
|
PM_CheckListButtonSize,
|
||
|
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,
|
||
|
PM_TabBarScrollButtonWidth,
|
||
|
|
||
|
PM_MenuBarItemSpacing,
|
||
|
PM_ToolBarItemSpacing,
|
||
|
|
||
|
PM_CustomBase
|
||
|
};
|
||
|
|
||
13 years ago
|
virtual int pixelMetric(PixelMetric,const TQWidget * = 0) const = 0;
|
||
13 years ago
|
|
||
|
enum ContentsType {
|
||
|
CT_PushButton,
|
||
|
CT_CheckBox,
|
||
|
CT_RadioButton,
|
||
|
CT_ToolButton,
|
||
|
CT_ComboBox,
|
||
|
CT_Splitter,
|
||
|
CT_DockWindow,
|
||
|
CT_ProgressBar,
|
||
|
CT_PopupMenuItem,
|
||
|
CT_TabBarTab,
|
||
|
CT_Slider,
|
||
|
CT_Header,
|
||
|
CT_LineEdit,
|
||
|
CT_MenuBar,
|
||
|
CT_SpinBox,
|
||
|
CT_SizeGrip,
|
||
|
CT_TabWidget,
|
||
|
CT_DialogButtons,
|
||
|
|
||
|
CT_CustomBase
|
||
|
};
|
||
|
|
||
13 years ago
|
virtual TQSize sizeFromContents(ContentsType,const TQWidget *,
|
||
|
const TQSize &,
|
||
|
const TQStyleOption & = TQStyleOption()) const = 0;
|
||
13 years ago
|
|
||
|
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,
|
||
|
|
||
|
SH_TitleBar_NoBorder,
|
||
|
|
||
|
SH_ScrollBar_StopMouseOverSlider,
|
||
|
|
||
|
SH_BlinkCursorWhenTextSelected,
|
||
|
|
||
|
SH_RichText_FullWidthSelection,
|
||
|
|
||
|
SH_PopupMenu_Scrollable,
|
||
|
|
||
|
SH_GroupBox_TextLabelVerticalAlignment,
|
||
|
|
||
|
SH_GroupBox_TextLabelColor,
|
||
|
|
||
|
SH_PopupMenu_SloppySubMenus,
|
||
|
|
||
|
SH_Table_GridLineColor,
|
||
|
|
||
|
SH_LineEdit_PasswordCharacter,
|
||
|
|
||
|
SH_DialogButtons_DefaultButton,
|
||
|
|
||
|
SH_ToolBox_SelectedPageTitleBold,
|
||
|
|
||
|
SH_TabBar_PreferNoArrows,
|
||
|
|
||
|
SH_ScrollBar_LeftClickAbsolutePosition,
|
||
|
|
||
|
SH_ListViewExpand_SelectMouseType,
|
||
|
|
||
|
SH_UnderlineAccelerator,
|
||
|
|
||
|
SH_ToolButton_Uses3D,
|
||
|
|
||
|
SH_CustomBase
|
||
|
};
|
||
|
|
||
13 years ago
|
virtual int styleHint(StyleHint,const TQWidget * = 0,
|
||
|
const TQStyleOption & = TQStyleOption(),
|
||
|
TQStyleHintReturn * = 0) const = 0;
|
||
13 years ago
|
|
||
|
enum StylePixmap {
|
||
|
SP_TitleBarMinButton,
|
||
|
SP_TitleBarMaxButton,
|
||
|
SP_TitleBarCloseButton,
|
||
|
SP_TitleBarNormalButton,
|
||
|
SP_TitleBarShadeButton,
|
||
|
SP_TitleBarUnshadeButton,
|
||
|
SP_DockWindowCloseButton,
|
||
|
SP_MessageBoxInformation,
|
||
|
SP_MessageBoxWarning,
|
||
|
SP_MessageBoxCritical,
|
||
|
SP_MessageBoxQuestion,
|
||
|
|
||
|
SP_CustomBase
|
||
|
};
|
||
|
|
||
13 years ago
|
virtual TQPixmap stylePixmap(StylePixmap,const TQWidget * = 0,
|
||
|
const TQStyleOption & = TQStyleOption()) const = 0;
|
||
13 years ago
|
|
||
13 years ago
|
static TQRect visualRect(const TQRect &,const TQWidget *);
|
||
13 years ago
|
|
||
13 years ago
|
static TQRect visualRect(const TQRect &,const TQRect &);
|
||
13 years ago
|
|
||
12 years ago
|
// New API
|
||
|
virtual void drawPrimitive( PrimitiveElement,
|
||
|
TQPainter*,
|
||
12 years ago
|
const TQStyleControlElementData&,
|
||
12 years ago
|
ControlElementFlags,
|
||
|
const TQRect&,
|
||
|
const TQColorGroup&,
|
||
|
SFlags = Style_Default,
|
||
|
const TQStyleOption& = TQStyleOption::Default ) const = 0;
|
||
|
|
||
|
virtual void drawControl( ControlElement element,
|
||
|
TQPainter*,
|
||
12 years ago
|
const TQStyleControlElementData&,
|
||
12 years ago
|
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*,
|
||
12 years ago
|
const TQStyleControlElementData&,
|
||
12 years ago
|
ControlElementFlags,
|
||
|
const TQRect&,
|
||
|
const TQStyleOption& = TQStyleOption::Default,
|
||
|
const TQWidget* = 0 /* compat, will likely go away */ ) const = 0;
|
||
|
|
||
12 years ago
|
virtual TQRect subRect( SubRect, const TQStyleControlElementData&, const ControlElementFlags, const TQWidget* ) const = 0;
|
||
12 years ago
|
|
||
|
virtual void drawComplexControl( ComplexControl,
|
||
|
TQPainter*,
|
||
12 years ago
|
const TQStyleControlElementData&,
|
||
12 years ago
|
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*,
|
||
12 years ago
|
const TQStyleControlElementData&,
|
||
12 years ago
|
const ControlElementFlags,
|
||
|
const TQRect&,
|
||
|
const TQStyleOption& = TQStyleOption::Default,
|
||
|
const TQWidget* = 0 ) const = 0;
|
||
|
|
||
|
virtual TQRect querySubControlMetrics( ComplexControl,
|
||
12 years ago
|
const TQStyleControlElementData&,
|
||
12 years ago
|
ControlElementFlags,
|
||
|
SubControl,
|
||
|
const TQStyleOption& = TQStyleOption::Default,
|
||
|
const TQWidget* = 0 ) const = 0;
|
||
|
|
||
|
virtual SubControl querySubControl( ComplexControl,
|
||
12 years ago
|
const TQStyleControlElementData&,
|
||
12 years ago
|
ControlElementFlags,
|
||
|
const TQPoint&,
|
||
|
const TQStyleOption& = TQStyleOption::Default,
|
||
|
const TQWidget* = 0 ) const = 0;
|
||
|
|
||
|
virtual int pixelMetric( PixelMetric,
|
||
12 years ago
|
const TQStyleControlElementData&,
|
||
12 years ago
|
ControlElementFlags,
|
||
|
const TQWidget* = 0 ) const = 0;
|
||
|
|
||
|
virtual TQSize sizeFromContents( ContentsType,
|
||
12 years ago
|
const TQStyleControlElementData&,
|
||
12 years ago
|
ControlElementFlags,
|
||
|
const TQSize&,
|
||
|
const TQStyleOption& = TQStyleOption::Default,
|
||
|
const TQWidget* = 0 ) const = 0;
|
||
|
|
||
|
virtual int styleHint( StyleHint,
|
||
12 years ago
|
const TQStyleControlElementData&,
|
||
12 years ago
|
ControlElementFlags,
|
||
|
const TQStyleOption& = TQStyleOption::Default,
|
||
|
TQStyleHintReturn* returnData = 0,
|
||
|
const TQWidget* = 0
|
||
|
) const = 0;
|
||
|
|
||
|
virtual TQPixmap stylePixmap( StylePixmap,
|
||
12 years ago
|
const TQStyleControlElementData&,
|
||
12 years ago
|
ControlElementFlags,
|
||
|
const TQStyleOption& = TQStyleOption::Default,
|
||
|
const TQWidget* = 0 ) const = 0;
|
||
|
|
||
12 years ago
|
static TQRect visualRect( const TQRect&, const TQStyleControlElementData&, const ControlElementFlags );
|
||
12 years ago
|
|
||
|
typedef TQMap<void*, TQStyle*> ObjectEventSourceToHandlerMap;
|
||
|
typedef TQMap<void*, TQStyleControlElementData> ObjectEventSourceDataToHandlerMap;
|
||
|
typedef TQMap<void*, ControlElementFlags> ObjectEventSourceFlagsToHandlerMap;
|
||
12 years ago
|
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* );
|
||
12 years ago
|
//void setEventHandlerInstallationHook( EventHandlerInstallationHook );
|
||
|
//void setEventHandlerRemovalHook( EventHandlerRemovalHook hook );
|
||
12 years ago
|
virtual bool objectEventHandler( const TQStyleControlElementData&, ControlElementFlags, void*, TQEvent * );
|
||
12 years ago
|
|
||
|
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
|
||
|
};
|
||
|
|
||
12 years ago
|
typedef bool (*WidgetActionRequestHook)(const TQStyleControlElementData&, ControlElementFlags, void*, WidgetActionRequest, TQStyleWidgetActionRequestData);
|
||
12 years ago
|
//void setWidgetActionRequestHook( WidgetActionRequestHook );
|
||
12 years ago
|
virtual bool widgetActionRequest( const TQStyleControlElementData&, ControlElementFlags, void*, WidgetActionRequest, TQStyleWidgetActionRequestData = TQStyleWidgetActionRequestData() );
|
||
12 years ago
|
|
||
|
enum ApplicationActionRequest {
|
||
|
AAR_SetPalette,
|
||
|
AAR_SetFont
|
||
|
};
|
||
|
|
||
12 years ago
|
typedef bool (*ApplicationActionRequestHook)(const TQStyleControlElementData&, ControlElementFlags, void*, ApplicationActionRequest, TQStyleApplicationActionRequestData);
|
||
12 years ago
|
//void setApplicationActionRequestHook( ApplicationActionRequestHook );
|
||
12 years ago
|
virtual bool applicationActionRequest( const TQStyleControlElementData&, ControlElementFlags, void*, ApplicationActionRequest, TQStyleApplicationActionRequestData = TQStyleApplicationActionRequestData() );
|
||
12 years ago
|
|
||
13 years ago
|
private:
|
||
13 years ago
|
TQStyle(const TQStyle &);
|
||
13 years ago
|
};
|