35 #include <tqcommonstyle.h>
37 #include <tdelibs_export.h>
41 struct TDEStylePrivate;
57 class TDEFX_EXPORT
TDEStyle:
public TQCommonStyle
83 AllowMenuTransparency = 0x00000001,
84 FilledFrameWorkaround = 0x00000002
111 WindowsStyleScrollBar = 0x00000000,
112 PlatinumStyleScrollBar = 0x00000001,
113 ThreeButtonScrollBar = 0x00000002,
114 NextStyleScrollBar = 0x00000004
147 static TQString defaultStyle();
160 void setScrollBarType(TDEStyleScrollBarType sbtype);
167 TDEStyleFlags styleFlags()
const;
182 virtual void renderMenuBlendPixmap(
KPixmap& pix,
const TQColorGroup& cg,
183 const TQPopupMenu* popup )
const;
229 KPE_DockWindowHandle,
236 KPE_ListViewExpander,
242 virtual void drawTDEStylePrimitive( TDEStylePrimitive kpe,
244 const TQWidget* widget,
246 const TQColorGroup &cg,
247 SFlags flags = Style_Default,
248 const TQStyleOption& = TQStyleOption::Default )
const;
259 virtual void drawTDEStylePrimitive( TDEStylePrimitive kpe,
261 const TQStyleControlElementData &ceData,
262 ControlElementFlags elementFlags,
264 const TQColorGroup &cg,
265 SFlags flags = Style_Default,
266 const TQStyleOption& = TQStyleOption::Default,
267 const TQWidget* widget = 0 )
const;
270 enum TDEStylePixelMetric {
271 KPM_MenuItemSeparatorHeight = 0x00000001,
272 KPM_MenuItemHMargin = 0x00000002,
273 KPM_MenuItemVMargin = 0x00000004,
274 KPM_MenuItemHFrame = 0x00000008,
275 KPM_MenuItemVFrame = 0x00000010,
276 KPM_MenuItemCheckMarkHMargin = 0x00000020,
277 KPM_MenuItemArrowHMargin = 0x00000040,
278 KPM_MenuItemTabSpacing = 0x00000080,
279 KPM_ListViewBranchThickness = 0x00000100
282 int kPixelMetric( TDEStylePixelMetric kpm,
const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQWidget* widget = 0 )
const;
286 void polish(
const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
void * );
287 void unPolish(
const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
void * );
288 void polishPopupMenu(
const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
void *ptr );
290 void drawPrimitive( PrimitiveElement pe,
292 const TQStyleControlElementData &ceData,
293 ControlElementFlags elementFlags,
295 const TQColorGroup &cg,
296 SFlags flags = Style_Default,
297 const TQStyleOption& = TQStyleOption::Default )
const;
299 void drawControl( ControlElement element,
301 const TQStyleControlElementData &ceData,
302 ControlElementFlags elementFlags,
304 const TQColorGroup &cg,
305 SFlags flags = Style_Default,
306 const TQStyleOption& = TQStyleOption::Default,
307 const TQWidget* widget = 0 )
const;
309 void drawComplexControl( ComplexControl control,
311 const TQStyleControlElementData &ceData,
312 ControlElementFlags elementFlags,
314 const TQColorGroup &cg,
315 SFlags flags = Style_Default,
316 SCFlags controls = SC_All,
317 SCFlags active = SC_None,
318 const TQStyleOption& = TQStyleOption::Default,
319 const TQWidget* widget = 0 )
const;
321 SubControl querySubControl( ComplexControl control,
322 const TQStyleControlElementData &ceData,
323 ControlElementFlags elementFlags,
325 const TQStyleOption& = TQStyleOption::Default,
326 const TQWidget* widget = 0 )
const;
328 TQRect querySubControlMetrics( ComplexControl control,
329 const TQStyleControlElementData &ceData,
330 ControlElementFlags elementFlags,
332 const TQStyleOption& = TQStyleOption::Default,
333 const TQWidget* widget = 0 )
const;
335 int pixelMetric( PixelMetric m,
const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
336 const TQWidget* widget = 0 )
const;
338 TQRect subRect( SubRect r,
const TQStyleControlElementData &ceData,
const ControlElementFlags elementFlags,
339 const TQWidget* widget = 0 )
const;
341 TQPixmap stylePixmap( StylePixmap stylepixmap,
342 const TQStyleControlElementData &ceData,
343 ControlElementFlags elementFlags,
344 const TQStyleOption& = TQStyleOption::Default,
345 const TQWidget* widget = 0 )
const;
347 int styleHint( StyleHint sh,
const TQStyleControlElementData &ceData,
348 ControlElementFlags elementFlags,
349 const TQStyleOption &opt = TQStyleOption::Default,
350 TQStyleHintReturn* shr = 0,
351 const TQWidget* w = 0 )
const;
354 virtual bool objectEventHandler(
const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
void* source, TQEvent *e );
362 virtual void virtual_hook(
int id,
void* data );
Off-screen paint device with extended features.
Simplifies and extends the TQStyle API to make style coding easier.
TDEStyleScrollBarType
TDEStyle ScrollBarType:
@ WindowsStyleScrollBar
two button, windows style
@ Default
All options disabled.
uint TDEStyleFlags
TDEStyle Flags:
TDEStylePrimitive
TDEStyle Primitive Elements: