10 #define WINGS_H_VERSION 20000521
15 #endif /* __cplusplus */
21 typedef unsigned long WMPixel
;
40 /* WMRange was moved in WUtil.h */
42 #define ClientMessageMask (1L<<30)
45 /* window stacking level */
47 WMNormalWindowLevel
= 0,
48 WMFloatingWindowLevel
= 3,
49 WMDockWindowLevel
= 5,
50 WMSubmenuWindowLevel
= 10,
51 WMMainMenuWindowLevel
= 20
54 /* window attributes */
56 WMBorderlessWindowMask
= 0,
57 WMTitledWindowMask
= 1,
58 WMClosableWindowMask
= 2,
59 WMMiniaturizableWindowMask
= 4,
60 WMResizableWindowMask
= 8
66 /* 0 is reserved for internal use */
72 WBTMomentaryChange
= 6,
77 /* button behaviour masks */
79 WBBSpringLoadedMask
= (1 << 0),
80 WBBPushInMask
= (1 << 1),
81 WBBPushChangeMask
= (1 << 2),
82 WBBPushLightMask
= (1 << 3),
83 WBBStateLightMask
= (1 << 5),
84 WBBStateChangeMask
= (1 << 6),
85 WBBStatePushMask
= (1 << 7)
89 /* frame title positions */
113 /* alignment types */
118 WAJustified
/* not valid for textfields */
134 /* scroller arrow position */
139 } WMScrollArrowPosition
;
152 /* usable scroller parts */
157 } WMUsableScrollerParts
;
169 WTTopTabsBevelBorder
,
176 /* text movement types */
178 WMIllegalTextMovement
,
179 WMReturnTextMovement
,
180 WMEscapeTextMovement
,
182 WMBacktabTextMovement
,
189 /* text field special events */
196 /* drag operations */
204 } WMDragOperationType
;
208 WMGrayModeColorPanel
= 1,
209 WMRGBModeColorPanel
= 2,
210 WMCMYKModeColorPanel
= 3,
211 WMHSBModeColorPanel
= 4,
212 WMCustomPaletteModeColorPanel
= 5,
213 WMColorListModeColorPanel
= 6,
214 WMWheelModeColorPanel
= 7
220 #define WSIReturnArrow 1
221 #define WSIHighlightedReturnArrow 2
222 #define WSIScrollerDimple 3
223 #define WSIArrowLeft 4
224 #define WSIHighlightedArrowLeft 5
225 #define WSIArrowRight 6
226 #define WSIHighlightedArrowRight 7
228 #define WSIHighlightedArrowUp 9
229 #define WSIArrowDown 10
230 #define WSIHighlightedArrowDown 11
231 #define WSICheckMark 12
234 WLDSSelected
= (1 << 16),
235 WLDSDisabled
= (1 << 17),
236 WLDSFocused
= (1 << 18),
237 WLDSIsBranch
= (1 << 19)
240 /* alert panel return values */
250 /* types of input observers */
252 WIReadMask
= (1 << 0),
253 WIWriteMask
= (1 << 1),
254 WIExceptMask
= (1 << 2)
274 WC_Matrix
= 12, /* not ready */
277 WC_ProgressIndicator
= 15,
283 /* All widgets must start with the following structure
284 * in that order. Used for typecasting to get some generic data */
285 typedef struct W_WidgetType
{
292 #define WMWidgetClass(widget) (((W_WidgetType*)(widget))->widgetClass)
293 #define WMWidgetView(widget) (((W_WidgetType*)(widget))->view)
298 typedef void WMWidget
;
300 typedef struct W_Pixmap WMPixmap
;
301 typedef struct W_Font WMFont
;
302 typedef struct W_Color WMColor
;
304 typedef struct W_Screen WMScreen
;
306 typedef struct W_View WMView
;
308 typedef struct W_Window WMWindow
;
309 typedef struct W_Frame WMFrame
;
310 typedef struct W_Button WMButton
;
311 typedef struct W_Label WMLabel
;
312 typedef struct W_TextField WMTextField
;
313 typedef struct W_Scroller WMScroller
;
314 typedef struct W_ScrollView WMScrollView
;
315 typedef struct W_List WMList
;
316 typedef struct W_Browser WMBrowser
;
317 typedef struct W_PopUpButton WMPopUpButton
;
318 typedef struct W_ProgressIndicator WMProgressIndicator
;
319 typedef struct W_ColorWell WMColorWell
;
320 typedef struct W_Slider WMSlider
;
321 typedef struct W_Matrix WMMatrix
; /* not ready */
322 typedef struct W_SplitView WMSplitView
;
323 typedef struct W_TabView WMTabView
;
324 typedef struct W_Ruler WMRuler
;
325 typedef struct W_Text WMText
;
329 typedef struct W_TabViewItem WMTabViewItem
;
330 typedef struct W_MenuItem WMMenuItem
;
333 typedef struct W_FilePanel WMFilePanel
;
334 typedef WMFilePanel WMOpenPanel
;
335 typedef WMFilePanel WMSavePanel
;
337 typedef struct W_FontPanel WMFontPanel
;
339 typedef struct W_ColorPanel WMColorPanel
;
342 /* item for WMList */
343 typedef struct WMListItem
{
345 void *clientData
; /* ptr for user clientdata. */
347 unsigned int uflags
:16; /* flags for the user */
348 unsigned int selected
:1;
349 unsigned int disabled
:1;
350 unsigned int isBranch
:1;
351 unsigned int loaded
:1;
354 /* struct for message panel */
355 typedef struct WMAlertPanel
{
356 WMWindow
*win
; /* window */
357 WMButton
*defBtn
; /* default button */
358 WMButton
*altBtn
; /* alternative button */
359 WMButton
*othBtn
; /* other button */
360 WMLabel
*iLbl
; /* icon label */
361 WMLabel
*tLbl
; /* title label */
362 WMLabel
*mLbl
; /* message label */
363 WMFrame
*line
; /* separator */
364 short result
; /* button that was pushed */
372 typedef struct WMInputPanel
{
373 WMWindow
*win
; /* window */
374 WMButton
*defBtn
; /* default button */
375 WMButton
*altBtn
; /* alternative button */
376 WMLabel
*tLbl
; /* title label */
377 WMLabel
*mLbl
; /* message label */
378 WMTextField
*text
; /* text field */
379 short result
; /* button that was pushed */
391 unsigned int *tabs
; /* a growable array of tabstops */
392 unsigned short ntabstops
:4; /* how many there are */
393 unsigned short left
:15; /* left margin marker */
394 unsigned short right
:15; /* right margin marker */
395 unsigned short first
:15; /* indentation marker for first line only */
396 unsigned short body
:15; /* body indentation marker */
398 /* All indentation and tab markers are _relative_ to the left margin marker */
401 typedef void *WMHandlerID
;
403 typedef void WMInputProc(int fd
, int mask
, void *clientData
);
405 typedef void WMEventProc(XEvent
*event
, void *clientData
);
407 typedef void WMEventHook(XEvent
*event
);
409 /* self is set to the widget from where the callback is being called and
410 * clientData to the data set to with WMSetClientData() */
411 typedef void WMAction(WMWidget
*self
, void *clientData
);
413 /* same as WMAction, but for stuff that arent widgets */
414 typedef void WMAction2(void *self
, void *clientData
);
417 typedef void WMCallback(void *data
);
419 typedef void WMDropDataCallback(WMView
*view
, WMData
*data
);
421 /* delegate method like stuff */
422 typedef void WMListDrawProc(WMList
*lPtr
, int index
, Drawable d
, char *text
,
423 int state
, WMRect
*rect
);
426 typedef void WMSplitViewResizeSubviewsProc(WMSplitView *sPtr,
427 unsigned int oldWidth,
428 unsigned int oldHeight);
431 typedef void WMSplitViewConstrainProc(WMSplitView
*sPtr
, int dividerIndex
,
432 int *minSize
, int *maxSize
);
434 typedef WMWidget
*WMMatrixCreateCellProc(WMMatrix
*mPtr
);
439 typedef struct WMBrowserDelegate
{
442 void (*createRowsForColumn
)(struct WMBrowserDelegate
*self
,
443 WMBrowser
*sender
, int column
, WMList
*list
);
445 char* (*titleOfColumn
)(struct WMBrowserDelegate
*self
, WMBrowser
*sender
,
448 void (*didScroll
)(struct WMBrowserDelegate
*self
, WMBrowser
*sender
);
450 void (*willScroll
)(struct WMBrowserDelegate
*self
, WMBrowser
*sender
);
454 typedef struct WMTextFieldDelegate
{
457 void (*didBeginEditing
)(struct WMTextFieldDelegate
*self
,
458 WMNotification
*notif
);
460 void (*didChange
)(struct WMTextFieldDelegate
*self
,
461 WMNotification
*notif
);
463 void (*didEndEditing
)(struct WMTextFieldDelegate
*self
,
464 WMNotification
*notif
);
466 Bool (*shouldBeginEditing
)(struct WMTextFieldDelegate
*self
,
469 Bool (*shouldEndEditing
)(struct WMTextFieldDelegate
*self
,
471 } WMTextFieldDelegate
;
474 typedef struct WMTextDelegate
{
477 void (*didBeginEditing
)(struct WMTextDelegate
*self
,
478 WMNotification
*notif
);
480 void (*didChange
)(struct WMTextDelegate
*self
,
481 WMNotification
*notif
);
483 void (*didEndEditing
)(struct WMTextDelegate
*self
,
484 WMNotification
*notif
);
486 Bool (*shouldBeginEditing
)(struct WMTextDelegate
*self
,
489 Bool (*shouldEndEditing
)(struct WMTextDelegate
*self
,
495 typedef struct WMTabViewDelegate
{
498 void (*didChangeNumberOfItems
)(struct WMTabViewDelegate
*self
,
501 void (*didSelectItem
)(struct WMTabViewDelegate
*self
, WMTabView
*tabView
,
502 WMTabViewItem
*item
);
504 Bool (*shouldSelectItem
)(struct WMTabViewDelegate
*self
, WMTabView
*tabView
,
505 WMTabViewItem
*item
);
507 void (*willSelectItem
)(struct WMTabViewDelegate
*self
, WMTabView
*tabView
,
508 WMTabViewItem
*item
);
514 typedef void WMSelectionCallback(WMView
*view
, Atom selection
, Atom target
,
515 Time timestamp
, void *cdata
, WMData
*data
);
518 typedef struct WMSelectionProcs
{
519 WMData
* (*convertSelection
)(WMView
*view
, Atom selection
, Atom target
,
520 void *cdata
, Atom
*type
);
521 void (*selectionLost
)(WMView
*view
, Atom selection
, void *cdata
);
522 void (*selectionDone
)(WMView
*view
, Atom selection
, Atom target
,
527 typedef struct W_DraggingInfo WMDraggingInfo
;
530 typedef struct W_DragSourceProcs
{
531 unsigned (*draggingSourceOperation
)(WMView
*self
, Bool local
);
532 void (*beganDragImage
)(WMView
*self
, WMPixmap
*image
, WMPoint point
);
533 void (*endedDragImage
)(WMView
*self
, WMPixmap
*image
, WMPoint point
,
535 WMData
* (*fetchDragData
)(WMView
*self
, char *type
);
536 /* Bool (*ignoreModifierKeysWhileDragging)(WMView *view);*/
541 typedef struct W_DragDestinationProcs
{
542 unsigned (*draggingEntered
)(WMView
*self
, WMDraggingInfo
*info
);
543 unsigned (*draggingUpdated
)(WMView
*self
, WMDraggingInfo
*info
);
544 void (*draggingExited
)(WMView
*self
, WMDraggingInfo
*info
);
545 Bool (*prepareForDragOperation
)(WMView
*self
, WMDraggingInfo
*info
);
546 Bool (*performDragOperation
)(WMView
*self
, WMDraggingInfo
*info
);
547 void (*concludeDragOperation
)(WMView
*self
, WMDraggingInfo
*info
);
548 } WMDragDestinationProcs
;
552 /* ...................................................................... */
555 WMRange
wmkrange(int start
, int count
);
557 WMPoint
wmkpoint(int x
, int y
);
559 WMSize
wmksize(unsigned int width
, unsigned int height
);
562 /* ....................................................................... */
566 void WMInitializeApplication(char *applicationName
, int *argc
, char **argv
);
568 void WMSetResourcePath(char *path
);
570 /* don't free the returned string */
571 char *WMGetApplicationName();
573 /* Try to locate resource file. ext may be NULL */
574 char *WMPathForResourceOfType(char *resource
, char *ext
);
576 WMScreen
*WMCreateScreenWithRContext(Display
*display
, int screen
,
579 WMScreen
*WMCreateScreen(Display
*display
, int screen
);
581 WMScreen
*WMCreateSimpleApplicationScreen(Display
*display
);
583 void WMScreenMainLoop(WMScreen
*scr
);
586 RContext
*WMScreenRContext(WMScreen
*scr
);
588 Display
*WMScreenDisplay(WMScreen
*scr
);
590 int WMScreenDepth(WMScreen
*scr
);
594 void WMSetApplicationIconImage(WMScreen
*app
, WMPixmap
*icon
);
596 WMPixmap
*WMGetApplicationIconImage(WMScreen
*app
);
598 void WMSetFocusToWidget(WMWidget
*widget
);
600 WMEventHook
*WMHookEventHandler(WMEventHook
*handler
);
602 int WMHandleEvent(XEvent
*event
);
604 Bool
WMScreenPending(WMScreen
*scr
);
606 void WMCreateEventHandler(WMView
*view
, unsigned long mask
,
607 WMEventProc
*eventProc
, void *clientData
);
609 void WMDeleteEventHandler(WMView
*view
, unsigned long mask
,
610 WMEventProc
*eventProc
, void *clientData
);
612 int WMIsDoubleClick(XEvent
*event
);
614 void WMNextEvent(Display
*dpy
, XEvent
*event
);
616 void WMMaskEvent(Display
*dpy
, long mask
, XEvent
*event
);
618 WMHandlerID
WMAddTimerHandler(int milliseconds
, WMCallback
*callback
,
621 void WMDeleteTimerWithClientData(void *cdata
);
623 void WMDeleteTimerHandler(WMHandlerID handlerID
);
625 WMHandlerID
WMAddIdleHandler(WMCallback
*callback
, void *cdata
);
627 void WMDeleteIdleHandler(WMHandlerID handlerID
);
629 WMHandlerID
WMAddInputHandler(int fd
, int condition
, WMInputProc
*proc
,
632 void WMDeleteInputHandler(WMHandlerID handlerID
);
636 Bool
WMCreateSelectionHandler(WMView
*view
, Atom selection
, Time timestamp
,
637 WMSelectionProcs
*procs
, void *cdata
);
639 void WMDeleteSelectionHandler(WMView
*view
, Atom selection
, Time timestamp
);
641 Bool
WMRequestSelection(WMView
*view
, Atom selection
, Atom target
,
642 Time timestamp
, WMSelectionCallback
*callback
,
646 /* ....................................................................... */
648 void WMSetViewDragSourceProcs(WMView
*view
, WMDragSourceProcs
*procs
);
650 void WMDragImageFromView(WMView
*view
, WMPixmap
*image
, char *dataTypes
[],
651 WMPoint atLocation
, WMSize mouseOffset
, XEvent
*event
,
654 void WMRegisterViewForDraggedTypes(WMView
*view
, char *acceptedTypes
[]);
656 void WMUnregisterViewDraggedTypes(WMView
*view
);
658 void WMSetViewDragDestinationProcs(WMView
*view
, WMDragDestinationProcs
*procs
);
661 WMPoint
WMGetDraggingInfoImageLocation(WMDraggingInfo
*info
);
663 /* ....................................................................... */
665 WMFont
*WMCreateFontSet(WMScreen
*scrPtr
, char *fontName
);
667 WMFont
*WMCreateNormalFont(WMScreen
*scrPtr
, char *fontName
);
669 WMFont
*WMCreateFont(WMScreen
*scrPtr
, char *fontName
);
671 WMFont
*WMRetainFont(WMFont
*font
);
673 void WMReleaseFont(WMFont
*font
);
675 unsigned int WMFontHeight(WMFont
*font
);
678 WMFont *WMUserFontOfSize(WMScreen *scrPtr, int size);
680 WMFont *WMUserFixedPitchFontOfSize(WMScreen *scrPtr, int size);
684 void WMSetWidgetDefaultFont(WMScreen
*scr
, WMFont
*font
);
686 void WMSetWidgetDefaultBoldFont(WMScreen
*scr
, WMFont
*font
);
688 WMFont
*WMSystemFontOfSize(WMScreen
*scrPtr
, int size
);
690 WMFont
*WMBoldSystemFontOfSize(WMScreen
*scrPtr
, int size
);
692 XFontSet
WMGetFontFontSet(WMFont
*font
);
694 /* ....................................................................... */
696 WMPixmap
*WMRetainPixmap(WMPixmap
*pixmap
);
698 void WMReleasePixmap(WMPixmap
*pixmap
);
700 WMPixmap
*WMCreatePixmap(WMScreen
*scrPtr
, int width
, int height
, int depth
,
703 WMPixmap
*WMCreatePixmapFromXPixmaps(WMScreen
*scrPtr
, Pixmap pixmap
,
704 Pixmap mask
, int width
, int height
,
707 WMPixmap
*WMCreatePixmapFromRImage(WMScreen
*scrPtr
, RImage
*image
,
710 WMPixmap
*WMCreatePixmapFromXPMData(WMScreen
*scrPtr
, char **data
);
712 WMSize
WMGetPixmapSize(WMPixmap
*pixmap
);
714 WMPixmap
*WMCreatePixmapFromFile(WMScreen
*scrPtr
, char *fileName
);
716 WMPixmap
*WMCreateBlendedPixmapFromFile(WMScreen
*scrPtr
, char *fileName
,
719 void WMDrawPixmap(WMPixmap
*pixmap
, Drawable d
, int x
, int y
);
721 Pixmap
WMGetPixmapXID(WMPixmap
*pixmap
);
723 Pixmap
WMGetPixmapMaskXID(WMPixmap
*pixmap
);
725 WMPixmap
*WMGetSystemPixmap(WMScreen
*scr
, int image
);
727 /* ....................................................................... */
730 WMColor
*WMDarkGrayColor(WMScreen
*scr
);
732 WMColor
*WMGrayColor(WMScreen
*scr
);
734 WMColor
*WMBlackColor(WMScreen
*scr
);
736 WMColor
*WMWhiteColor(WMScreen
*scr
);
738 void WMSetColorInGC(WMColor
*color
, GC gc
);
740 GC
WMColorGC(WMColor
*color
);
742 WMPixel
WMColorPixel(WMColor
*color
);
744 void WMPaintColorSwatch(WMColor
*color
, Drawable d
, int x
, int y
,
745 unsigned int width
, unsigned int height
);
747 void WMReleaseColor(WMColor
*color
);
749 WMColor
*WMRetainColor(WMColor
*color
);
751 WMColor
*WMCreateRGBColor(WMScreen
*scr
, unsigned short red
,
752 unsigned short green
, unsigned short blue
,
755 WMColor
*WMCreateNamedColor(WMScreen
*scr
, char *name
, Bool exact
);
757 unsigned short WMRedComponentOfColor(WMColor
*color
);
759 unsigned short WMGreenComponentOfColor(WMColor
*color
);
761 unsigned short WMBlueComponentOfColor(WMColor
*color
);
763 char *WMGetColorRGBDescription(WMColor
*color
);
765 /* ....................................................................... */
768 void WMDrawString(WMScreen
*scr
, Drawable d
, GC gc
, WMFont
*font
, int x
,
769 int y
, char *text
, int length
);
771 void WMDrawImageString(WMScreen
*scr
, Drawable d
, GC gc
, WMFont
*font
, int x
,
772 int y
, char *text
, int length
);
774 int WMWidthOfString(WMFont
*font
, char *text
, int length
);
778 /* ....................................................................... */
780 WMScreen
*WMWidgetScreen(WMWidget
*w
);
782 unsigned int WMScreenWidth(WMScreen
*scr
);
784 unsigned int WMScreenHeight(WMScreen
*scr
);
786 void WMUnmapWidget(WMWidget
*w
);
788 void WMMapWidget(WMWidget
*w
);
790 void WMRaiseWidget(WMWidget
*w
);
792 void WMMoveWidget(WMWidget
*w
, int x
, int y
);
794 void WMResizeWidget(WMWidget
*w
, unsigned int width
, unsigned int height
);
796 void WMSetWidgetBackgroundColor(WMWidget
*w
, WMColor
*color
);
798 void WMMapSubwidgets(WMWidget
*w
);
800 void WMUnmapSubwidgets(WMWidget
*w
);
802 void WMRealizeWidget(WMWidget
*w
);
804 void WMDestroyWidget(WMWidget
*widget
);
806 void WMHangData(WMWidget
*widget
, void *data
);
808 void *WMGetHangedData(WMWidget
*widget
);
810 unsigned int WMWidgetWidth(WMWidget
*w
);
812 unsigned int WMWidgetHeight(WMWidget
*w
);
814 Window
WMWidgetXID(WMWidget
*w
);
816 Window
WMViewXID(WMView
*view
);
818 void WMRedisplayWidget(WMWidget
*w
);
820 void WMSetViewNotifySizeChanges(WMView
*view
, Bool flag
);
822 WMSize
WMGetViewSize(WMView
*view
);
824 WMPoint
WMGetViewPosition(WMView
*view
);
826 WMPoint
WMGetViewScreenPosition(WMView
*view
);
828 WMWidget
*WMWidgetOfView(WMView
*view
);
831 extern char *WMViewSizeDidChangeNotification
;
833 extern char *WMViewRealizedNotification
;
836 /* ....................................................................... */
838 void WMSetBalloonTextForView(char *text
, WMView
*view
);
840 void WMSetBalloonTextAlignment(WMScreen
*scr
, WMAlignment alignment
);
842 void WMSetBalloonFont(WMScreen
*scr
, WMFont
*font
);
844 void WMSetBalloonTextColor(WMScreen
*scr
, WMColor
*color
);
846 void WMSetBalloonDelay(WMScreen
*scr
, int delay
);
848 void WMSetBalloonEnabled(WMScreen
*scr
, Bool flag
);
851 /* ....................................................................... */
853 WMWindow
*WMCreateWindow(WMScreen
*screen
, char *name
);
855 WMWindow
*WMCreateWindowWithStyle(WMScreen
*screen
, char *name
, int style
);
857 WMWindow
*WMCreatePanelWithStyleForWindow(WMWindow
*owner
, char *name
,
860 WMWindow
*WMCreatePanelForWindow(WMWindow
*owner
, char *name
);
862 void WMChangePanelOwner(WMWindow
*win
, WMWindow
*newOwner
);
864 void WMSetWindowTitle(WMWindow
*wPtr
, char *title
);
866 void WMSetWindowMiniwindowTitle(WMWindow
*win
, char *title
);
868 void WMSetWindowMiniwindowImage(WMWindow
*win
, WMPixmap
*pixmap
);
870 void WMSetWindowCloseAction(WMWindow
*win
, WMAction
*action
, void *clientData
);
872 void WMSetWindowInitialPosition(WMWindow
*win
, int x
, int y
);
874 void WMSetWindowAspectRatio(WMWindow
*win
, int minX
, int minY
,
877 void WMSetWindowMaxSize(WMWindow
*win
, unsigned width
, unsigned height
);
879 void WMSetWindowMinSize(WMWindow
*win
, unsigned width
, unsigned height
);
881 void WMSetWindowBaseSize(WMWindow
*win
, unsigned width
, unsigned height
);
883 void WMSetWindowResizeIncrements(WMWindow
*win
, unsigned wIncr
, unsigned hIncr
);
885 void WMSetWindowLevel(WMWindow
*win
, int level
);
887 void WMSetWindowDocumentEdited(WMWindow
*win
, Bool flag
);
889 void WMCloseWindow(WMWindow
*win
);
891 /* ....................................................................... */
893 void WMSetButtonAction(WMButton
*bPtr
, WMAction
*action
, void *clientData
);
895 #define WMCreateCommandButton(parent) \
896 WMCreateCustomButton((parent), WBBSpringLoadedMask\
901 #define WMCreateRadioButton(parent) \
902 WMCreateButton((parent), WBTRadio)
904 #define WMCreateSwitchButton(parent) \
905 WMCreateButton((parent), WBTSwitch)
907 WMButton
*WMCreateButton(WMWidget
*parent
, WMButtonType type
);
909 WMButton
*WMCreateCustomButton(WMWidget
*parent
, int behaviourMask
);
911 void WMSetButtonImageDefault(WMButton
*bPtr
);
913 void WMSetButtonImage(WMButton
*bPtr
, WMPixmap
*image
);
915 void WMSetButtonAltImage(WMButton
*bPtr
, WMPixmap
*image
);
917 void WMSetButtonImagePosition(WMButton
*bPtr
, WMImagePosition position
);
919 void WMSetButtonFont(WMButton
*bPtr
, WMFont
*font
);
921 void WMSetButtonTextAlignment(WMButton
*bPtr
, WMAlignment alignment
);
923 void WMSetButtonText(WMButton
*bPtr
, char *text
);
925 void WMSetButtonAltText(WMButton
*bPtr
, char *text
);
927 void WMSetButtonTextColor(WMButton
*bPtr
, WMColor
*color
);
929 void WMSetButtonAltTextColor(WMButton
*bPtr
, WMColor
*color
);
931 void WMSetButtonDisabledTextColor(WMButton
*bPtr
, WMColor
*color
);
933 void WMSetButtonSelected(WMButton
*bPtr
, int isSelected
);
935 int WMGetButtonSelected(WMButton
*bPtr
);
937 void WMSetButtonBordered(WMButton
*bPtr
, int isBordered
);
939 void WMSetButtonEnabled(WMButton
*bPtr
, Bool flag
);
941 void WMSetButtonImageDimsWhenDisabled(WMButton
*bPtr
, Bool flag
);
943 void WMSetButtonTag(WMButton
*bPtr
, int tag
);
945 void WMGroupButtons(WMButton
*bPtr
, WMButton
*newMember
);
947 void WMPerformButtonClick(WMButton
*bPtr
);
949 void WMSetButtonContinuous(WMButton
*bPtr
, Bool flag
);
951 void WMSetButtonPeriodicDelay(WMButton
*bPtr
, float delay
, float interval
);
953 /* ....................................................................... */
955 WMLabel
*WMCreateLabel(WMWidget
*parent
);
957 void WMSetLabelWraps(WMLabel
*lPtr
, Bool flag
);
959 void WMSetLabelImage(WMLabel
*lPtr
, WMPixmap
*image
);
961 WMPixmap
*WMGetLabelImage(WMLabel
*lPtr
);
963 void WMSetLabelImagePosition(WMLabel
*lPtr
, WMImagePosition position
);
965 void WMSetLabelTextAlignment(WMLabel
*lPtr
, WMAlignment alignment
);
967 void WMSetLabelRelief(WMLabel
*lPtr
, WMReliefType relief
);
969 void WMSetLabelText(WMLabel
*lPtr
, char *text
);
971 void WMSetLabelFont(WMLabel
*lPtr
, WMFont
*font
);
973 void WMSetLabelTextColor(WMLabel
*lPtr
, WMColor
*color
);
975 /* ....................................................................... */
977 WMFrame
*WMCreateFrame(WMWidget
*parent
);
979 void WMSetFrameTitlePosition(WMFrame
*fPtr
, WMTitlePosition position
);
981 void WMSetFrameRelief(WMFrame
*fPtr
, WMReliefType relief
);
983 void WMSetFrameTitle(WMFrame
*fPtr
, char *title
);
985 /* ....................................................................... */
987 WMTextField
*WMCreateTextField(WMWidget
*parent
);
989 void WMInsertTextFieldText(WMTextField
*tPtr
, char *text
, int position
);
991 void WMDeleteTextFieldRange(WMTextField
*tPtr
, WMRange range
);
993 /* you can free the returned string */
994 char *WMGetTextFieldText(WMTextField
*tPtr
);
996 void WMSetTextFieldText(WMTextField
*tPtr
, char *text
);
998 void WMSetTextFieldAlignment(WMTextField
*tPtr
, WMAlignment alignment
);
1000 void WMSetTextFieldFont(WMTextField
*tPtr
, WMFont
*font
);
1002 WMFont
*WMGetTextFieldFont(WMTextField
*tPtr
);
1004 void WMSetTextFieldBordered(WMTextField
*tPtr
, Bool bordered
);
1006 void WMSetTextFieldBeveled(WMTextField
*tPtr
, Bool flag
);
1008 Bool
WMGetTextFieldEditable(WMTextField
*tPtr
);
1010 void WMSetTextFieldEditable(WMTextField
*tPtr
, Bool flag
);
1012 void WMSetTextFieldSecure(WMTextField
*tPtr
, Bool flag
);
1014 void WMSelectTextFieldRange(WMTextField
*tPtr
, WMRange range
);
1016 void WMSetTextFieldCursorPosition(WMTextField
*tPtr
, unsigned int position
);
1018 void WMSetTextFieldNextTextField(WMTextField
*tPtr
, WMTextField
*next
);
1020 void WMSetTextFieldPrevTextField(WMTextField
*tPtr
, WMTextField
*prev
);
1022 void WMSetTextFieldDelegate(WMTextField
*tPtr
, WMTextFieldDelegate
*delegate
);
1025 extern char *WMTextDidChangeNotification
;
1026 extern char *WMTextDidBeginEditingNotification
;
1027 extern char *WMTextDidEndEditingNotification
;
1029 /* ....................................................................... */
1031 WMScroller
*WMCreateScroller(WMWidget
*parent
);
1033 void WMSetScrollerParameters(WMScroller
*sPtr
, float floatValue
,
1034 float knobProportion
);
1036 float WMGetScrollerKnobProportion(WMScroller
*sPtr
);
1038 float WMGetScrollerValue(WMScroller
*sPtr
);
1040 WMScrollerPart
WMGetScrollerHitPart(WMScroller
*sPtr
);
1042 void WMSetScrollerAction(WMScroller
*sPtr
, WMAction
*action
, void *clientData
);
1044 void WMSetScrollerArrowsPosition(WMScroller
*sPtr
,
1045 WMScrollArrowPosition position
);
1047 /* ....................................................................... */
1049 WMList
*WMCreateList(WMWidget
*parent
);
1051 #define WMAddListItem(lPtr, text) WMInsertListItem((lPtr), -1, (text))
1053 WMListItem
*WMInsertListItem(WMList
*lPtr
, int row
, char *text
);
1055 void WMSortListItems(WMList
*lPtr
);
1057 void WMSortListItemsWithComparer(WMList
*lPtr
,
1058 int (f
)(const void*, const void*));
1060 int WMFindRowOfListItemWithTitle(WMList
*lPtr
, char *title
);
1062 WMListItem
*WMGetListItem(WMList
*lPtr
, int row
);
1064 WMBag
*WMGetListItems(WMList
*lPtr
);
1067 void WMRemoveListItem(WMList
*lPtr
, int row
);
1069 void WMSelectListItem(WMList
*lPtr
, int row
);
1071 void WMSetListUserDrawProc(WMList
*lPtr
, WMListDrawProc
*proc
);
1073 void WMSetListUserDrawItemHeight(WMList
*lPtr
, unsigned short height
);
1075 int WMGetListItemHeight(WMList
*lPtr
);
1077 /* don't free the returned data */
1078 WMListItem
*WMGetListSelectedItem(WMList
*lPtr
);
1080 int WMGetListSelectedItemRow(WMList
*lPtr
);
1082 void WMSetListAction(WMList
*lPtr
, WMAction
*action
, void *clientData
);
1084 void WMSetListDoubleAction(WMList
*lPtr
, WMAction
*action
, void *clientData
);
1086 void WMClearList(WMList
*lPtr
);
1088 int WMGetListNumberOfRows(WMList
*lPtr
);
1090 void WMSetListPosition(WMList
*lPtr
, int row
);
1092 void WMSetListBottomPosition(WMList
*lPtr
, int row
);
1094 int WMGetListPosition(WMList
*lPtr
);
1096 extern char *WMListDidScrollNotification
;
1097 extern char *WMListSelectionDidChangeNotification
;
1099 /* ....................................................................... */
1101 WMBrowser
*WMCreateBrowser(WMWidget
*parent
);
1103 void WMSetBrowserPathSeparator(WMBrowser
*bPtr
, char *separator
);
1105 void WMSetBrowserTitled(WMBrowser
*bPtr
, Bool flag
);
1107 void WMLoadBrowserColumnZero(WMBrowser
*bPtr
);
1109 int WMAddBrowserColumn(WMBrowser
*bPtr
);
1111 void WMRemoveBrowserItem(WMBrowser
*bPtr
, int column
, int row
);
1113 void WMSetBrowserMaxVisibleColumns(WMBrowser
*bPtr
, int columns
);
1115 void WMSetBrowserColumnTitle(WMBrowser
*bPtr
, int column
, char *title
);
1117 WMListItem
*WMInsertBrowserItem(WMBrowser
*bPtr
, int column
, int row
, char *text
, Bool isBranch
);
1119 void WMSortBrowserColumn(WMBrowser
*bPtr
, int column
);
1121 void WMSortBrowserColumnWithComparer(WMBrowser
*bPtr
, int column
,
1122 int (f
)(const void*, const void*));
1124 /* Don't free the returned string. */
1125 char* WMSetBrowserPath(WMBrowser
*bPtr
, char *path
);
1127 /* you can free the returned string */
1128 char *WMGetBrowserPath(WMBrowser
*bPtr
);
1129 /* you can free the returned string */
1130 char *WMGetBrowserPathToColumn(WMBrowser
*bPtr
, int column
);
1132 void WMSetBrowserAction(WMBrowser
*bPtr
, WMAction
*action
, void *clientData
);
1134 void WMSetBrowserDoubleAction(WMBrowser
*bPtr
, WMAction
*action
,
1137 WMListItem
*WMGetBrowserSelectedItemInColumn(WMBrowser
*bPtr
, int column
);
1139 int WMGetBrowserFirstVisibleColumn(WMBrowser
*bPtr
);
1141 int WMGetBrowserSelectedColumn(WMBrowser
*bPtr
);
1143 int WMGetBrowserSelectedRowInColumn(WMBrowser
*bPtr
, int column
);
1145 int WMGetBrowserNumberOfColumns(WMBrowser
*bPtr
);
1147 int WMGetBrowserMaxVisibleColumns(WMBrowser
*bPtr
);
1149 WMList
*WMGetBrowserListInColumn(WMBrowser
*bPtr
, int column
);
1151 void WMSetBrowserDelegate(WMBrowser
*bPtr
, WMBrowserDelegate
*delegate
);
1153 /* ....................................................................... */
1156 Bool
WMMenuItemIsSeparator(WMMenuItem
*item
);
1158 WMMenuItem
*WMCreateMenuItem(void);
1160 void WMDestroyMenuItem(WMMenuItem
*item
);
1162 Bool
WMGetMenuItemEnabled(WMMenuItem
*item
);
1164 void WMSetMenuItemEnabled(WMMenuItem
*item
, Bool flag
);
1166 char *WMGetMenuItemShortcut(WMMenuItem
*item
);
1168 unsigned WMGetMenuItemShortcutModifierMask(WMMenuItem
*item
);
1170 void WMSetMenuItemShortcut(WMMenuItem
*item
, char *shortcut
);
1172 void WMSetMenuItemShortcutModifierMask(WMMenuItem
*item
, unsigned mask
);
1174 void *WMGetMenuItemRepresentedObject(WMMenuItem
*item
);
1176 void WMSetMenuItemRepresentedObject(WMMenuItem
*item
, void *object
);
1178 void WMSetMenuItemAction(WMMenuItem
*item
, WMAction
*action
, void *data
);
1180 WMAction
*WMGetMenuItemAction(WMMenuItem
*item
);
1182 void *WMGetMenuItemData(WMMenuItem
*item
);
1184 void WMSetMenuItemTitle(WMMenuItem
*item
, char *title
);
1186 char *WMGetMenuItemTitle(WMMenuItem
*item
);
1188 void WMSetMenuItemState(WMMenuItem
*item
, int state
);
1190 int WMGetMenuItemState(WMMenuItem
*item
);
1192 void WMSetMenuItemPixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1194 WMPixmap
*WMGetMenuItemPixmap(WMMenuItem
*item
);
1196 void WMSetMenuItemOnStatePixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1198 WMPixmap
*WMGetMenuItemOnStatePixmap(WMMenuItem
*item
);
1200 void WMSetMenuItemOffStatePixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1202 WMPixmap
*WMGetMenuItemOffStatePixmap(WMMenuItem
*item
);
1204 void WMSetMenuItemMixedStatePixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1206 WMPixmap
*WMGetMenuItemMixedStatePixmap(WMMenuItem
*item
);
1208 /*void WMSetMenuItemSubmenu(WMMenuItem *item, WMMenu *submenu);
1211 WMMenu *WMGetMenuItemSubmenu(WMMenuItem *item);
1213 Bool WMGetMenuItemHasSubmenu(WMMenuItem *item);
1216 /* ....................................................................... */
1218 WMPopUpButton
*WMCreatePopUpButton(WMWidget
*parent
);
1220 void WMSetPopUpButtonAction(WMPopUpButton
*sPtr
, WMAction
*action
,
1223 void WMSetPopUpButtonPullsDown(WMPopUpButton
*bPtr
, Bool flag
);
1225 WMMenuItem
*WMAddPopUpButtonItem(WMPopUpButton
*bPtr
, char *title
);
1227 WMMenuItem
*WMInsertPopUpButtonItem(WMPopUpButton
*bPtr
, int index
,
1230 void WMRemovePopUpButtonItem(WMPopUpButton
*bPtr
, int index
);
1232 void WMSetPopUpButtonItemEnabled(WMPopUpButton
*bPtr
, int index
, Bool flag
);
1234 Bool
WMGetPopUpButtonItemEnabled(WMPopUpButton
*bPtr
, int index
);
1236 void WMSetPopUpButtonSelectedItem(WMPopUpButton
*bPtr
, int index
);
1238 int WMGetPopUpButtonSelectedItem(WMPopUpButton
*bPtr
);
1240 void WMSetPopUpButtonText(WMPopUpButton
*bPtr
, char *text
);
1242 /* don't free the returned data */
1243 char *WMGetPopUpButtonItem(WMPopUpButton
*bPtr
, int index
);
1245 WMMenuItem
*WMGetPopUpButtonMenuItem(WMPopUpButton
*bPtr
, int index
);
1248 int WMGetPopUpButtonNumberOfItems(WMPopUpButton
*bPtr
);
1250 void WMSetPopUpButtonEnabled(WMPopUpButton
*bPtr
, Bool flag
);
1252 Bool
WMGetPopUpButtonEnabled(WMPopUpButton
*bPtr
);
1254 /* ....................................................................... */
1256 WMProgressIndicator
*WMCreateProgressIndicator(WMWidget
*parent
);
1258 void WMSetProgressIndicatorMinValue(WMProgressIndicator
*progressindicator
, int value
);
1260 void WMSetProgressIndicatorMaxValue(WMProgressIndicator
*progressindicator
, int value
);
1262 void WMSetProgressIndicatorValue(WMProgressIndicator
*progressindicator
, int value
);
1264 int WMGetProgressIndicatorMinValue(WMProgressIndicator
*progressindicator
);
1266 int WMGetProgressIndicatorMaxValue(WMProgressIndicator
*progressindicator
);
1268 int WMGetProgressIndicatorValue(WMProgressIndicator
*progressindicator
);
1271 /* ....................................................................... */
1273 WMColorPanel
*WMGetColorPanel(WMScreen
*scrPtr
);
1275 void WMFreeColorPanel(WMColorPanel
*panel
);
1277 void WMShowColorPanel(WMColorPanel
*panel
);
1279 void WMCloseColorPanel(WMColorPanel
*panel
);
1281 void WMSetColorPanelColor(WMColorPanel
*panel
, WMColor
*color
);
1283 WMColor
*WMGetColorPanelColor(WMColorPanel
*panel
);
1285 void WMSetColorPanelPickerMode(WMColorPanel
*panel
, WMColorPanelMode mode
);
1287 void WMSetColorPanelAction(WMColorPanel
*panel
, WMAction2
*action
, void *data
);
1289 extern char *WMColorPanelColorChangedNotification
;
1291 /* ....................................................................... */
1293 WMColorWell
*WMCreateColorWell(WMWidget
*parent
);
1295 void WMSetColorWellColor(WMColorWell
*cPtr
, WMColor
*color
);
1297 WMColor
*WMGetColorWellColor(WMColorWell
*cPtr
);
1299 void WSetColorWellBordered(WMColorWell
*cPtr
, Bool flag
);
1302 extern char *WMColorWellDidChangeNotification
;
1305 /* ...................................................................... */
1307 WMScrollView
*WMCreateScrollView(WMWidget
*parent
);
1309 void WMResizeScrollViewContent(WMScrollView
*sPtr
, unsigned int width
,
1310 unsigned int height
);
1312 void WMSetScrollViewHasHorizontalScroller(WMScrollView
*sPtr
, Bool flag
);
1314 void WMSetScrollViewHasVerticalScroller(WMScrollView
*sPtr
, Bool flag
);
1316 void WMSetScrollViewContentView(WMScrollView
*sPtr
, WMView
*view
);
1318 void WMSetScrollViewRelief(WMScrollView
*sPtr
, WMReliefType type
);
1320 void WMSetScrollViewContentView(WMScrollView
*sPtr
, WMView
*view
);
1322 WMScroller
*WMGetScrollViewHorizontalScroller(WMScrollView
*sPtr
);
1324 WMScroller
*WMGetScrollViewVerticalScroller(WMScrollView
*sPtr
);
1326 void WMSetScrollViewLineScroll(WMScrollView
*sPtr
, int amount
);
1328 void WMSetScrollViewPageScroll(WMScrollView
*sPtr
, int amount
);
1330 /* ....................................................................... */
1332 WMSlider
*WMCreateSlider(WMWidget
*parent
);
1334 int WMGetSliderMinValue(WMSlider
*slider
);
1336 int WMGetSliderMaxValue(WMSlider
*slider
);
1338 int WMGetSliderValue(WMSlider
*slider
);
1340 void WMSetSliderMinValue(WMSlider
*slider
, int value
);
1342 void WMSetSliderMaxValue(WMSlider
*slider
, int value
);
1344 void WMSetSliderValue(WMSlider
*slider
, int value
);
1346 void WMSetSliderContinuous(WMSlider
*slider
, Bool flag
);
1348 void WMSetSliderAction(WMSlider
*slider
, WMAction
*action
, void *data
);
1350 void WMSetSliderKnobThickness(WMSlider
*sPtr
, int thickness
);
1352 void WMSetSliderImage(WMSlider
*sPtr
, WMPixmap
*pixmap
);
1354 /* ....................................................................... */
1357 WMSplitView
*WMCreateSplitView(WMWidget
*parent
);
1358 Bool
WMGetSplitViewVertical(WMSplitView
*sPtr
);
1359 void WMSetSplitViewVertical(WMSplitView
*sPtr
, Bool flag
);
1361 int WMGetSplitViewSubviewsCount(WMSplitView
*sPtr
); /* ??? remove ??? */
1363 WMView
*WMGetSplitViewSubviewAt(WMSplitView
*sPtr
, int index
);
1365 /* remove the first subview == view */
1366 void WMRemoveSplitViewSubview(WMSplitView
*sPtr
, WMView
*view
);
1368 void WMRemoveSplitViewSubviewAt(WMSplitView
*sPtr
, int index
);
1371 void WMAddSplitViewSubview(WMSplitView
*sPtr
, WMView
*subview
);
1373 void WMAdjustSplitViewSubviews(WMSplitView
*sPtr
);
1375 void WMSetSplitViewConstrainProc(WMSplitView
*sPtr
,
1376 WMSplitViewConstrainProc
*proc
);
1379 void WMSetSplitViewResizeSubviewsProc(WMSplitView *sPtr,
1380 WMSplitViewResizeSubviewsProc *proc);
1383 int WMGetSplitViewDividerThickness(WMSplitView
*sPtr
);
1385 /* ...................................................................... */
1387 WMRuler
*WMCreateRuler (WMWidget
*parent
);
1389 WMRulerMargins
WMGetRulerMargins(WMRuler
*rPtr
);
1391 void WMSetRulerMargins(WMRuler
*rPtr
, WMRulerMargins margins
);
1393 int WMGetGrabbedRulerMargin(WMRuler
*rPtr
);
1395 int WMGetReleasedRulerMargin(WMRuler
*rPtr
);
1397 int WMGetRulerOffset(WMRuler
*rPtr
);
1399 void WMSetRulerOffset(WMRuler
*rPtr
, int pixels
);
1401 void WMSetRulerMoveAction(WMRuler
*rPtr
, WMAction
*action
, void *clientData
);
1403 void WMSetRulerReleaseAction(WMRuler
*rPtr
, WMAction
*action
, void *clientData
);
1405 /* ....................................................................... */
1407 WMText
*WMCreateText(WMWidget
*parent
);
1409 void WMRefreshText(WMText
*tPtr
, int vpos
, int hpos
);
1411 void WMFreezeText(WMText
*tPtr
);
1413 void WMThawText(WMText
*tPtr
);
1415 int WMScrollText(WMText
*tPtr
, int amount
);
1417 int WMPageText(WMText
*tPtr
, Bool direction
);
1419 void WMSetTextHasHorizontalScroller(WMText
*tPtr
, Bool shouldhave
);
1421 void WMSetTextHasVerticalScroller(WMText
*tPtr
, Bool shouldhave
);
1423 void WMSetTextHasRuler(WMText
*tPtr
, Bool shouldhave
);
1425 void WMShowTextRuler(WMText
*tPtr
, Bool show
);
1427 int WMGetTextRulerShown(WMText
*tPtr
);
1429 void WMSetTextEditable(WMText
*tPtr
, Bool editable
);
1431 int WMGetTextEditable(WMText
*tPtr
);
1433 void WMSetTextUsesMonoFont(WMText
*tPtr
, Bool mono
);
1435 int WMGetTextUsesMonoFont(WMText
*tPtr
);
1437 void WMSetTextIgnoresNewline(WMText
*tPtr
, Bool ignore
);
1439 int WMGetTextIgnoresNewline(WMText
*tPtr
);
1441 void WMSetTextDefaultFont(WMText
*tPtr
, WMFont
*font
);
1443 WMFont
* WMGetTextDefaultFont(WMText
*tPtr
);
1445 void WMSetTextRelief(WMText
*tPtr
, WMReliefType relief
);
1447 void WMSetTextForegroundColor(WMText
*tPtr
, WMColor
*color
);
1449 void WMSetTextBackgroundColor(WMText
*tPtr
, WMColor
*color
);
1451 void WMPrependTextStream(WMText
*tPtr
, char *text
);
1453 void WMAppendTextStream(WMText
*tPtr
, char *text
);
1456 char * WMGetTextStream(WMText
*tPtr
);
1459 char * WMGetTextSelected(WMText
*tPtr
);
1461 /* destroy the bag */
1462 WMBag
* WMGetTextStreamIntoBag(WMText
*tPtr
);
1464 /* destroy the bag */
1465 WMBag
* WMGetTextSelectedIntoBag(WMText
*tPtr
);
1467 void *WMCreateTextBlockWithObject(WMWidget
*w
, char *description
,
1468 WMColor
*color
, unsigned short first
, unsigned short reserved
);
1470 void *WMCreateTextBlockWithPixmap(WMPixmap
*p
, char *description
,
1471 WMColor
*color
, unsigned short first
, unsigned short reserved
);
1473 void *WMCreateTextBlockWithText(char *text
, WMFont
*font
,
1474 WMColor
*color
, unsigned short first
, unsigned short length
);
1476 void WMSetTextBlockProperties(void *vtb
, unsigned int first
,
1477 unsigned int kanji
, unsigned int underlined
, int script
,
1478 WMRulerMargins margins
);
1480 void WMGetTextBlockProperties(void *vtb
, unsigned int *first
,
1481 unsigned int *kanji
, unsigned int *underlined
, int *script
,
1482 WMRulerMargins
*margins
);
1484 void WMSetTextSelectionColor(WMText
*tPtr
, WMColor
*color
);
1486 void WMSetTextSelectionFont(WMText
*tPtr
, WMFont
*font
);
1488 void WMSetTextAlignment(WMText
*tPtr
, WMAlignment alignment
);
1490 /* parser related stuff... see how it can be done in testtext.c */
1492 void WMSetTextParser(WMText
*tPtr
, WMAction
*parser
);
1494 void WMSetTextWriter(WMText
*tPtr
, WMAction
*writer
);
1496 int WMGetTextInsertType(WMText
*tPtr
);
1498 int WMGetTextBlocks(WMText
*tPtr
);
1500 void WMSetCurrentTextBlock(WMText
*tPtr
, int current
);
1502 int WMGetCurrentTextBlock(WMText
*tPtr
);
1504 void WMPrependTextBlock(WMText
*tPtr
, void *vtb
);
1506 void WMAppendTextBlock(WMText
*tPtr
, void *vtb
);
1508 void *WMRemoveTextBlock(WMText
*tPtr
);
1510 void WMDestroyTextBlock(WMText
*tPtr
, void *vtb
);
1512 /* ....................................................................... */
1515 WMTabView
*WMCreateTabView(WMWidget
*parent
);
1517 void WMSetTabViewFont(WMTabView
*tPtr
, WMFont
*font
);
1519 void WMAddItemInTabView(WMTabView
*tPtr
, WMTabViewItem
*item
);
1521 void WMInsertItemInTabView(WMTabView
*tPtr
, int index
, WMTabViewItem
*item
);
1523 void WMRemoveTabViewItem(WMTabView
*tPtr
, WMTabViewItem
*item
);
1525 WMTabViewItem
*WMTabViewItemAtPoint(WMTabView
*tPtr
, int x
, int y
);
1527 void WMSelectFirstTabViewItem(WMTabView
*tPtr
);
1529 void WMSelectLastTabViewItem(WMTabView
*tPtr
);
1531 void WMSelectNextTabViewItem(WMTabView
*tPtr
);
1533 void WMSelectPreviousTabViewItem(WMTabView
*tPtr
);
1535 WMTabViewItem
*WMGetSelectedTabViewItem(WMTabView
*tPtr
);
1537 void WMSelectTabViewItem(WMTabView
*tPtr
, WMTabViewItem
*item
);
1539 void WMSelectTabViewItemAtIndex(WMTabView
*tPtr
, int index
);
1541 void WMSetTabViewDelegate(WMTabView
*tPtr
, WMTabViewDelegate
*delegate
);
1544 WMTabViewItem
*WMCreateTabViewItemWithIdentifier(int identifier
);
1546 int WMGetTabViewItemIdentifier(WMTabViewItem
*item
);
1548 void WMSetTabViewItemLabel(WMTabViewItem
*item
, char *label
);
1550 char *WMGetTabViewItemLabel(WMTabViewItem
*item
);
1552 void WMSetTabViewItemView(WMTabViewItem
*item
, WMView
*view
);
1554 WMView
*WMGetTabViewItemView(WMTabViewItem
*item
);
1556 void WMDestroyTabViewItem(WMTabViewItem
*item
);
1558 /* ....................................................................... */
1560 int WMRunAlertPanel(WMScreen
*app
, WMWindow
*owner
, char *title
, char *msg
,
1561 char *defaultButton
, char *alternateButton
,
1564 /* you can free the returned string */
1565 char *WMRunInputPanel(WMScreen
*app
, WMWindow
*owner
, char *title
, char *msg
,
1566 char *defaultText
, char *okButton
, char *cancelButton
);
1568 WMAlertPanel
*WMCreateAlertPanel(WMScreen
*app
, WMWindow
*owner
, char *title
,
1569 char *msg
, char *defaultButton
,
1570 char *alternateButton
, char *otherButton
);
1572 WMInputPanel
*WMCreateInputPanel(WMScreen
*app
, WMWindow
*owner
, char *title
,
1573 char *msg
, char *defaultText
, char *okButton
,
1574 char *cancelButton
);
1576 void WMDestroyAlertPanel(WMAlertPanel
*panel
);
1578 void WMDestroyInputPanel(WMInputPanel
*panel
);
1580 /* ....................................................................... */
1582 /* only 1 instance per WMScreen */
1583 WMOpenPanel
*WMGetOpenPanel(WMScreen
*scrPtr
);
1585 WMSavePanel
*WMGetSavePanel(WMScreen
*scrPtr
);
1587 void WMSetFilePanelCanChooseDirectories(WMFilePanel
*panel
, Bool flag
);
1589 void WMSetFilePanelCanChooseFiles(WMFilePanel
*panel
, Bool flag
);
1591 void WMSetFilePanelAutoCompletion(WMFilePanel
*panel
, Bool flag
);
1593 void WMSetFilePanelDirectory(WMFilePanel
*panel
, char *path
);
1595 /* you can free the returned string */
1596 char *WMGetFilePanelFileName(WMFilePanel
*panel
);
1598 void WMFreeFilePanel(WMFilePanel
*panel
);
1600 int WMRunModalFilePanelForDirectory(WMFilePanel
*panel
, WMWindow
*owner
,
1601 char *path
, char *name
, char **fileTypes
);
1603 void WMSetFilePanelAccessoryView(WMFilePanel
*panel
, WMView
*view
);
1605 WMView
*WMGetFilePanelAccessoryView(WMFilePanel
*panel
);
1608 /* ...................................................................... */
1610 /* only 1 instance per WMScreen */
1611 WMFontPanel
*WMGetFontPanel(WMScreen
*scr
);
1613 void WMShowFontPanel(WMFontPanel
*panel
);
1615 void WMHideFontPanel(WMFontPanel
*panel
);
1617 void WMSetFontPanelFont(WMFontPanel
*panel
, WMFont
*font
);
1619 /* you can free the returned string */
1620 char *WMGetFontPanelFontName(WMFontPanel
*panel
);
1622 WMFont
*WMGetFontPanelFont(WMFontPanel
*panel
);
1626 #endif /* __cplusplus */