37 HEADER_BUTTON = 0x00008000,
38 HEADER_HORIZONTAL = 0,
39 HEADER_VERTICAL = 0x00010000,
40 HEADER_TRACKING = 0x00020000,
41 HEADER_RESIZE = 0x00040000,
42 HEADER_NORMAL = HEADER_HORIZONTAL|FRAME_NORMAL
63 virtual void draw(
const FXHeader* header,
FXDC& dc,FXint x,FXint y,FXint w,FXint h)
const;
67 ARROW_UP = 0x00000001,
68 ARROW_DOWN = 0x00000002,
70 ICONOWNED = 0x00000008,
88 virtual void setText(
const FXString& txt);
100 virtual void setIcon(
FXIcon* icn,FXbool owned=
false);
124 void setArrowDir(FXuint dir=ARROW_NONE);
127 FXuint getArrowDir()
const;
130 void setJustify(FXuint justify=LEFT|CENTER_Y);
133 FXuint getJustify()
const;
136 void setIconPosition(FXuint mode=BEFORE);
139 FXuint getIconPosition()
const;
142 void setPressed(FXbool pressed);
145 FXbool isPressed()
const;
148 virtual FXint getWidth(
const FXHeader* header)
const;
151 virtual FXint getHeight(
const FXHeader* header)
const;
154 virtual void create();
157 virtual void detach();
160 virtual void destroy();
163 virtual void save(
FXStream& store)
const;
172 typedef FXString (*FXNumberingFunc)(FXint);
176 typedef FXObjectListOf<FXHeaderItem> FXHeaderItemList;
203 FXNumberingFunc numbering;
213 void drawSplit(FXint pos);
219 long onPaint(
FXObject*,FXSelector,
void*);
220 long onLeftBtnPress(
FXObject*,FXSelector,
void*);
221 long onLeftBtnRelease(
FXObject*,FXSelector,
void*);
222 long onUngrabbed(
FXObject*,FXSelector,
void*);
223 long onMotion(
FXObject*,FXSelector,
void*);
224 long onTipTimer(
FXObject*,FXSelector,
void*);
225 long onQueryTip(
FXObject*,FXSelector,
void*);
226 long onQueryHelp(
FXObject*,FXSelector,
void*);
230 static FXString decimalNumbering(FXint index);
233 static FXString alphaNumbering(FXint index);
237 FXHeader(
FXComposite* p,
FXObject* tgt=
nullptr,FXSelector sel=0,FXuint opts=HEADER_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD);
240 virtual void create();
243 virtual void detach();
246 virtual void layout();
252 FXint getTotalSize()
const;
255 virtual FXint getDefaultWidth();
258 virtual FXint getDefaultHeight();
261 void setPosition(FXint pos);
271 FXint getItemAt(FXint coord)
const;
277 FXint setItem(FXint index,
FXHeaderItem* item,FXbool notify=
false);
280 FXint setItem(FXint index,
const FXString& text,
FXIcon *icon=
nullptr,FXint size=0,
void* ptr=
nullptr,FXbool notify=
false);
283 FXint fillItems(
const FXchar *
const *strings,
FXIcon *icon=
nullptr,FXint size=0,
void* ptr=
nullptr,FXbool notify=
false);
286 FXint fillItems(
const FXString* strings,
FXIcon *icon=
nullptr,FXint size=0,
void* ptr=
nullptr,FXbool notify=
false);
289 FXint fillItems(
const FXString& strings,
FXIcon *icon=
nullptr,FXint size=0,
void* ptr=
nullptr,FXbool notify=
false);
292 FXint insertItem(FXint index,
FXHeaderItem* item,FXbool notify=
false);
295 FXint insertItem(FXint index,
const FXString& text,
FXIcon *icon=
nullptr,FXint size=0,
void* ptr=
nullptr,FXbool notify=
false);
298 FXint appendItem(
FXHeaderItem* item,FXbool notify=
false);
301 FXint appendItem(
const FXString& text,
FXIcon *icon=
nullptr,FXint size=0,
void* ptr=
nullptr,FXbool notify=
false);
304 FXint prependItem(
FXHeaderItem* item,FXbool notify=
false);
307 FXint prependItem(
const FXString& text,
FXIcon *icon=
nullptr,FXint size=0,
void* ptr=
nullptr,FXbool notify=
false);
310 FXHeaderItem* extractItem(FXint index,FXbool notify=
false);
313 void removeItem(FXint index,FXbool notify=
false);
316 void clearItems(FXbool notify=
false);
319 void setItemText(FXint index,
const FXString& text);
322 FXString getItemText(FXint index)
const;
325 void setItemTipText(FXint index,
const FXString& text);
328 FXString getItemTipText(FXint index)
const;
331 void setItemIcon(FXint index,
FXIcon* icon,FXbool owned=
false);
334 FXIcon* getItemIcon(FXint index)
const;
337 void setItemSize(FXint index,FXint size);
340 FXint getItemSize(FXint index)
const;
343 FXint getItemOffset(FXint index)
const;
346 void setItemData(FXint index,
void* ptr);
349 void* getItemData(FXint index)
const;
352 void setArrowDir(FXint index,FXuint dir=FXHeaderItem::ARROW_NONE);
355 FXuint getArrowDir(FXint index)
const;
364 void setItemJustify(FXint index,FXuint justify);
367 FXuint getItemJustify(FXint index)
const;
376 void setItemIconPosition(FXint index,FXuint mode);
379 FXuint getItemIconPosition(FXint index)
const;
382 void setItemPressed(FXint index,FXbool pressed=
true);
385 FXbool isItemPressed(FXint index)
const;
388 void makeItemVisible(FXint index);
391 void updateItem(FXint index)
const;
394 void setFont(
FXFont* fnt);
400 void renumberCaptions(FXNumberingFunc func,FXint fm=0,FXint to=2147483647);
403 void setAutoNumbering(FXNumberingFunc func);
409 void setTextColor(FXColor clr);
415 void setHeaderStyle(FXuint style);
418 FXuint getHeaderStyle()
const;
427 virtual void save(
FXStream& store)
const;
The Frame widget provides borders around some contents.
Definition: FXFrame.h:58
Base composite.
Definition: FXComposite.h:32
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
Abstract Device Context.
Definition: FXDC.h:153
Definition: FX4Splitter.h:28
An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask ...
Definition: FXIcon.h:42
FXival no() const
Return number of objects.
Definition: FXObjectList.h:59
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:134
Font class.
Definition: FXFont.h:137
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42