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 */
388 /* WMRuler: a tabstop is a linked list of tabstops,
389 each containing the position of the tabstop */
393 struct WMTabStops
*next
;
396 /* All indentation and tab markers are _relative_ to the left margin marker */
398 int left
; /* left margin marker */
399 int right
; /* right margin marker */
400 int first
; /* indentation marker for first line only */
401 int body
; /* body indentation marker */
406 typedef void *WMHandlerID
;
408 typedef void WMInputProc(int fd
, int mask
, void *clientData
);
410 typedef void WMEventProc(XEvent
*event
, void *clientData
);
412 typedef void WMEventHook(XEvent
*event
);
414 /* self is set to the widget from where the callback is being called and
415 * clientData to the data set to with WMSetClientData() */
416 typedef void WMAction(WMWidget
*self
, void *clientData
);
418 /* same as WMAction, but for stuff that arent widgets */
419 typedef void WMAction2(void *self
, void *clientData
);
422 typedef void WMCallback(void *data
);
424 typedef void WMDropDataCallback(WMView
*view
, WMData
*data
);
426 /* delegate method like stuff */
427 typedef void WMListDrawProc(WMList
*lPtr
, int index
, Drawable d
, char *text
,
428 int state
, WMRect
*rect
);
431 typedef void WMSplitViewResizeSubviewsProc(WMSplitView *sPtr,
432 unsigned int oldWidth,
433 unsigned int oldHeight);
436 typedef void WMSplitViewConstrainProc(WMSplitView
*sPtr
, int dividerIndex
,
437 int *minSize
, int *maxSize
);
439 typedef WMWidget
*WMMatrixCreateCellProc(WMMatrix
*mPtr
);
444 typedef struct WMBrowserDelegate
{
447 void (*createRowsForColumn
)(struct WMBrowserDelegate
*self
,
448 WMBrowser
*sender
, int column
, WMList
*list
);
450 char* (*titleOfColumn
)(struct WMBrowserDelegate
*self
, WMBrowser
*sender
,
453 void (*didScroll
)(struct WMBrowserDelegate
*self
, WMBrowser
*sender
);
455 void (*willScroll
)(struct WMBrowserDelegate
*self
, WMBrowser
*sender
);
459 typedef struct WMTextFieldDelegate
{
462 void (*didBeginEditing
)(struct WMTextFieldDelegate
*self
,
463 WMNotification
*notif
);
465 void (*didChange
)(struct WMTextFieldDelegate
*self
,
466 WMNotification
*notif
);
468 void (*didEndEditing
)(struct WMTextFieldDelegate
*self
,
469 WMNotification
*notif
);
471 Bool (*shouldBeginEditing
)(struct WMTextFieldDelegate
*self
,
474 Bool (*shouldEndEditing
)(struct WMTextFieldDelegate
*self
,
476 } WMTextFieldDelegate
;
479 typedef struct WMTextDelegate
{
482 void (*didBeginEditing
)(struct WMTextDelegate
*self
,
483 WMNotification
*notif
);
485 void (*didChange
)(struct WMTextDelegate
*self
,
486 WMNotification
*notif
);
488 void (*didEndEditing
)(struct WMTextDelegate
*self
,
489 WMNotification
*notif
);
491 Bool (*shouldBeginEditing
)(struct WMTextDelegate
*self
,
494 Bool (*shouldEndEditing
)(struct WMTextDelegate
*self
,
500 typedef struct WMTabViewDelegate
{
503 void (*didChangeNumberOfItems
)(struct WMTabViewDelegate
*self
,
506 void (*didSelectItem
)(struct WMTabViewDelegate
*self
, WMTabView
*tabView
,
507 WMTabViewItem
*item
);
509 Bool (*shouldSelectItem
)(struct WMTabViewDelegate
*self
, WMTabView
*tabView
,
510 WMTabViewItem
*item
);
512 void (*willSelectItem
)(struct WMTabViewDelegate
*self
, WMTabView
*tabView
,
513 WMTabViewItem
*item
);
519 typedef void WMSelectionCallback(WMView
*view
, Atom selection
, Atom target
,
520 Time timestamp
, void *cdata
, WMData
*data
);
523 typedef struct WMSelectionProcs
{
524 WMData
* (*convertSelection
)(WMView
*view
, Atom selection
, Atom target
,
525 void *cdata
, Atom
*type
);
526 void (*selectionLost
)(WMView
*view
, Atom selection
, void *cdata
);
527 void (*selectionDone
)(WMView
*view
, Atom selection
, Atom target
,
532 typedef struct W_DraggingInfo WMDraggingInfo
;
535 typedef struct W_DragSourceProcs
{
536 unsigned (*draggingSourceOperation
)(WMView
*self
, Bool local
);
537 void (*beganDragImage
)(WMView
*self
, WMPixmap
*image
, WMPoint point
);
538 void (*endedDragImage
)(WMView
*self
, WMPixmap
*image
, WMPoint point
,
540 WMData
* (*fetchDragData
)(WMView
*self
, char *type
);
541 /* Bool (*ignoreModifierKeysWhileDragging)(WMView *view);*/
546 typedef struct W_DragDestinationProcs
{
547 unsigned (*draggingEntered
)(WMView
*self
, WMDraggingInfo
*info
);
548 unsigned (*draggingUpdated
)(WMView
*self
, WMDraggingInfo
*info
);
549 void (*draggingExited
)(WMView
*self
, WMDraggingInfo
*info
);
550 Bool (*prepareForDragOperation
)(WMView
*self
, WMDraggingInfo
*info
);
551 Bool (*performDragOperation
)(WMView
*self
, WMDraggingInfo
*info
);
552 void (*concludeDragOperation
)(WMView
*self
, WMDraggingInfo
*info
);
553 } WMDragDestinationProcs
;
557 /* ...................................................................... */
560 WMRange
wmkrange(int start
, int count
);
562 WMPoint
wmkpoint(int x
, int y
);
564 WMSize
wmksize(unsigned int width
, unsigned int height
);
567 /* ....................................................................... */
571 void WMInitializeApplication(char *applicationName
, int *argc
, char **argv
);
573 void WMSetResourcePath(char *path
);
575 /* don't free the returned string */
576 char *WMGetApplicationName();
578 /* Try to locate resource file. ext may be NULL */
579 char *WMPathForResourceOfType(char *resource
, char *ext
);
581 WMScreen
*WMCreateScreenWithRContext(Display
*display
, int screen
,
584 WMScreen
*WMCreateScreen(Display
*display
, int screen
);
586 WMScreen
*WMCreateSimpleApplicationScreen(Display
*display
);
588 void WMScreenMainLoop(WMScreen
*scr
);
591 RContext
*WMScreenRContext(WMScreen
*scr
);
593 Display
*WMScreenDisplay(WMScreen
*scr
);
595 int WMScreenDepth(WMScreen
*scr
);
599 void WMSetApplicationIconImage(WMScreen
*app
, WMPixmap
*icon
);
601 WMPixmap
*WMGetApplicationIconImage(WMScreen
*app
);
603 void WMSetFocusToWidget(WMWidget
*widget
);
605 WMEventHook
*WMHookEventHandler(WMEventHook
*handler
);
607 int WMHandleEvent(XEvent
*event
);
609 Bool
WMScreenPending(WMScreen
*scr
);
611 void WMCreateEventHandler(WMView
*view
, unsigned long mask
,
612 WMEventProc
*eventProc
, void *clientData
);
614 void WMDeleteEventHandler(WMView
*view
, unsigned long mask
,
615 WMEventProc
*eventProc
, void *clientData
);
617 int WMIsDoubleClick(XEvent
*event
);
619 void WMNextEvent(Display
*dpy
, XEvent
*event
);
621 void WMMaskEvent(Display
*dpy
, long mask
, XEvent
*event
);
623 WMHandlerID
WMAddTimerHandler(int milliseconds
, WMCallback
*callback
,
626 void WMDeleteTimerWithClientData(void *cdata
);
628 void WMDeleteTimerHandler(WMHandlerID handlerID
);
630 WMHandlerID
WMAddIdleHandler(WMCallback
*callback
, void *cdata
);
632 void WMDeleteIdleHandler(WMHandlerID handlerID
);
634 WMHandlerID
WMAddInputHandler(int fd
, int condition
, WMInputProc
*proc
,
637 void WMDeleteInputHandler(WMHandlerID handlerID
);
641 Bool
WMCreateSelectionHandler(WMView
*view
, Atom selection
, Time timestamp
,
642 WMSelectionProcs
*procs
, void *cdata
);
644 void WMDeleteSelectionHandler(WMView
*view
, Atom selection
, Time timestamp
);
646 Bool
WMRequestSelection(WMView
*view
, Atom selection
, Atom target
,
647 Time timestamp
, WMSelectionCallback
*callback
,
651 /* ....................................................................... */
653 void WMSetViewDragSourceProcs(WMView
*view
, WMDragSourceProcs
*procs
);
655 void WMDragImageFromView(WMView
*view
, WMPixmap
*image
, char *dataTypes
[],
656 WMPoint atLocation
, WMSize mouseOffset
, XEvent
*event
,
659 void WMRegisterViewForDraggedTypes(WMView
*view
, char *acceptedTypes
[]);
661 void WMUnregisterViewDraggedTypes(WMView
*view
);
663 void WMSetViewDragDestinationProcs(WMView
*view
, WMDragDestinationProcs
*procs
);
666 WMPoint
WMGetDraggingInfoImageLocation(WMDraggingInfo
*info
);
668 /* ....................................................................... */
670 WMFont
*WMCreateFontSet(WMScreen
*scrPtr
, char *fontName
);
672 WMFont
*WMCreateNormalFont(WMScreen
*scrPtr
, char *fontName
);
674 WMFont
*WMCreateFont(WMScreen
*scrPtr
, char *fontName
);
676 WMFont
*WMRetainFont(WMFont
*font
);
678 void WMReleaseFont(WMFont
*font
);
680 unsigned int WMFontHeight(WMFont
*font
);
683 WMFont *WMUserFontOfSize(WMScreen *scrPtr, int size);
685 WMFont *WMUserFixedPitchFontOfSize(WMScreen *scrPtr, int size);
689 void WMSetWidgetDefaultFont(WMScreen
*scr
, WMFont
*font
);
691 void WMSetWidgetDefaultBoldFont(WMScreen
*scr
, WMFont
*font
);
693 WMFont
*WMSystemFontOfSize(WMScreen
*scrPtr
, int size
);
695 WMFont
*WMBoldSystemFontOfSize(WMScreen
*scrPtr
, int size
);
697 XFontSet
WMGetFontFontSet(WMFont
*font
);
699 /* ....................................................................... */
701 WMPixmap
*WMRetainPixmap(WMPixmap
*pixmap
);
703 void WMReleasePixmap(WMPixmap
*pixmap
);
705 WMPixmap
*WMCreatePixmap(WMScreen
*scrPtr
, int width
, int height
, int depth
,
708 WMPixmap
*WMCreatePixmapFromXPixmaps(WMScreen
*scrPtr
, Pixmap pixmap
,
709 Pixmap mask
, int width
, int height
,
712 WMPixmap
*WMCreatePixmapFromRImage(WMScreen
*scrPtr
, RImage
*image
,
715 WMPixmap
*WMCreatePixmapFromXPMData(WMScreen
*scrPtr
, char **data
);
717 WMSize
WMGetPixmapSize(WMPixmap
*pixmap
);
719 WMPixmap
*WMCreatePixmapFromFile(WMScreen
*scrPtr
, char *fileName
);
721 WMPixmap
*WMCreateBlendedPixmapFromFile(WMScreen
*scrPtr
, char *fileName
,
724 void WMDrawPixmap(WMPixmap
*pixmap
, Drawable d
, int x
, int y
);
726 Pixmap
WMGetPixmapXID(WMPixmap
*pixmap
);
728 Pixmap
WMGetPixmapMaskXID(WMPixmap
*pixmap
);
730 WMPixmap
*WMGetSystemPixmap(WMScreen
*scr
, int image
);
732 /* ....................................................................... */
735 WMColor
*WMDarkGrayColor(WMScreen
*scr
);
737 WMColor
*WMGrayColor(WMScreen
*scr
);
739 WMColor
*WMBlackColor(WMScreen
*scr
);
741 WMColor
*WMWhiteColor(WMScreen
*scr
);
743 void WMSetColorInGC(WMColor
*color
, GC gc
);
745 GC
WMColorGC(WMColor
*color
);
747 WMPixel
WMColorPixel(WMColor
*color
);
749 void WMPaintColorSwatch(WMColor
*color
, Drawable d
, int x
, int y
,
750 unsigned int width
, unsigned int height
);
752 void WMReleaseColor(WMColor
*color
);
754 WMColor
*WMRetainColor(WMColor
*color
);
756 WMColor
*WMCreateRGBColor(WMScreen
*scr
, unsigned short red
,
757 unsigned short green
, unsigned short blue
,
760 WMColor
*WMCreateNamedColor(WMScreen
*scr
, char *name
, Bool exact
);
762 unsigned short WMRedComponentOfColor(WMColor
*color
);
764 unsigned short WMGreenComponentOfColor(WMColor
*color
);
766 unsigned short WMBlueComponentOfColor(WMColor
*color
);
768 char *WMGetColorRGBDescription(WMColor
*color
);
770 /* ....................................................................... */
773 void WMDrawString(WMScreen
*scr
, Drawable d
, GC gc
, WMFont
*font
, int x
,
774 int y
, char *text
, int length
);
776 void WMDrawImageString(WMScreen
*scr
, Drawable d
, GC gc
, WMFont
*font
, int x
,
777 int y
, char *text
, int length
);
779 int WMWidthOfString(WMFont
*font
, char *text
, int length
);
783 /* ....................................................................... */
785 WMScreen
*WMWidgetScreen(WMWidget
*w
);
787 unsigned int WMScreenWidth(WMScreen
*scr
);
789 unsigned int WMScreenHeight(WMScreen
*scr
);
791 void WMUnmapWidget(WMWidget
*w
);
793 void WMMapWidget(WMWidget
*w
);
795 void WMMoveWidget(WMWidget
*w
, int x
, int y
);
797 void WMResizeWidget(WMWidget
*w
, unsigned int width
, unsigned int height
);
799 void WMSetWidgetBackgroundColor(WMWidget
*w
, WMColor
*color
);
801 void WMMapSubwidgets(WMWidget
*w
);
803 void WMUnmapSubwidgets(WMWidget
*w
);
805 void WMRealizeWidget(WMWidget
*w
);
807 void WMDestroyWidget(WMWidget
*widget
);
809 void WMHangData(WMWidget
*widget
, void *data
);
811 void *WMGetHangedData(WMWidget
*widget
);
813 unsigned int WMWidgetWidth(WMWidget
*w
);
815 unsigned int WMWidgetHeight(WMWidget
*w
);
817 Window
WMWidgetXID(WMWidget
*w
);
819 Window
WMViewXID(WMView
*view
);
821 void WMRedisplayWidget(WMWidget
*w
);
823 void WMSetViewNotifySizeChanges(WMView
*view
, Bool flag
);
825 WMSize
WMGetViewSize(WMView
*view
);
827 WMPoint
WMGetViewPosition(WMView
*view
);
829 WMPoint
WMGetViewScreenPosition(WMView
*view
);
831 WMWidget
*WMWidgetOfView(WMView
*view
);
834 extern char *WMViewSizeDidChangeNotification
;
836 extern char *WMViewRealizedNotification
;
839 /* ....................................................................... */
841 void WMSetBalloonTextForView(char *text
, WMView
*view
);
843 void WMSetBalloonTextAlignment(WMScreen
*scr
, WMAlignment alignment
);
845 void WMSetBalloonFont(WMScreen
*scr
, WMFont
*font
);
847 void WMSetBalloonTextColor(WMScreen
*scr
, WMColor
*color
);
849 void WMSetBalloonDelay(WMScreen
*scr
, int delay
);
851 void WMSetBalloonEnabled(WMScreen
*scr
, Bool flag
);
854 /* ....................................................................... */
856 WMWindow
*WMCreateWindow(WMScreen
*screen
, char *name
);
858 WMWindow
*WMCreateWindowWithStyle(WMScreen
*screen
, char *name
, int style
);
860 WMWindow
*WMCreatePanelWithStyleForWindow(WMWindow
*owner
, char *name
,
863 WMWindow
*WMCreatePanelForWindow(WMWindow
*owner
, char *name
);
865 void WMChangePanelOwner(WMWindow
*win
, WMWindow
*newOwner
);
867 void WMSetWindowTitle(WMWindow
*wPtr
, char *title
);
869 void WMSetWindowMiniwindowTitle(WMWindow
*win
, char *title
);
871 void WMSetWindowMiniwindowImage(WMWindow
*win
, WMPixmap
*pixmap
);
873 void WMSetWindowCloseAction(WMWindow
*win
, WMAction
*action
, void *clientData
);
875 void WMSetWindowInitialPosition(WMWindow
*win
, int x
, int y
);
877 void WMSetWindowAspectRatio(WMWindow
*win
, int minX
, int minY
,
880 void WMSetWindowMaxSize(WMWindow
*win
, unsigned width
, unsigned height
);
882 void WMSetWindowMinSize(WMWindow
*win
, unsigned width
, unsigned height
);
884 void WMSetWindowBaseSize(WMWindow
*win
, unsigned width
, unsigned height
);
886 void WMSetWindowResizeIncrements(WMWindow
*win
, unsigned wIncr
, unsigned hIncr
);
888 void WMSetWindowLevel(WMWindow
*win
, int level
);
890 void WMSetWindowDocumentEdited(WMWindow
*win
, Bool flag
);
892 void WMCloseWindow(WMWindow
*win
);
894 /* ....................................................................... */
896 void WMSetButtonAction(WMButton
*bPtr
, WMAction
*action
, void *clientData
);
898 #define WMCreateCommandButton(parent) \
899 WMCreateCustomButton((parent), WBBSpringLoadedMask\
904 #define WMCreateRadioButton(parent) \
905 WMCreateButton((parent), WBTRadio)
907 #define WMCreateSwitchButton(parent) \
908 WMCreateButton((parent), WBTSwitch)
910 WMButton
*WMCreateButton(WMWidget
*parent
, WMButtonType type
);
912 WMButton
*WMCreateCustomButton(WMWidget
*parent
, int behaviourMask
);
914 void WMSetButtonImageDefault(WMButton
*bPtr
);
916 void WMSetButtonImage(WMButton
*bPtr
, WMPixmap
*image
);
918 void WMSetButtonAltImage(WMButton
*bPtr
, WMPixmap
*image
);
920 void WMSetButtonImagePosition(WMButton
*bPtr
, WMImagePosition position
);
922 void WMSetButtonFont(WMButton
*bPtr
, WMFont
*font
);
924 void WMSetButtonTextAlignment(WMButton
*bPtr
, WMAlignment alignment
);
926 void WMSetButtonText(WMButton
*bPtr
, char *text
);
928 void WMSetButtonAltText(WMButton
*bPtr
, char *text
);
930 void WMSetButtonTextColor(WMButton
*bPtr
, WMColor
*color
);
932 void WMSetButtonAltTextColor(WMButton
*bPtr
, WMColor
*color
);
934 void WMSetButtonDisabledTextColor(WMButton
*bPtr
, WMColor
*color
);
936 void WMSetButtonSelected(WMButton
*bPtr
, int isSelected
);
938 int WMGetButtonSelected(WMButton
*bPtr
);
940 void WMSetButtonBordered(WMButton
*bPtr
, int isBordered
);
942 void WMSetButtonEnabled(WMButton
*bPtr
, Bool flag
);
944 void WMSetButtonImageDimsWhenDisabled(WMButton
*bPtr
, Bool flag
);
946 void WMSetButtonTag(WMButton
*bPtr
, int tag
);
948 void WMGroupButtons(WMButton
*bPtr
, WMButton
*newMember
);
950 void WMPerformButtonClick(WMButton
*bPtr
);
952 void WMSetButtonContinuous(WMButton
*bPtr
, Bool flag
);
954 void WMSetButtonPeriodicDelay(WMButton
*bPtr
, float delay
, float interval
);
956 /* ....................................................................... */
958 WMLabel
*WMCreateLabel(WMWidget
*parent
);
960 void WMSetLabelWraps(WMLabel
*lPtr
, Bool flag
);
962 void WMSetLabelImage(WMLabel
*lPtr
, WMPixmap
*image
);
964 WMPixmap
*WMGetLabelImage(WMLabel
*lPtr
);
966 void WMSetLabelImagePosition(WMLabel
*lPtr
, WMImagePosition position
);
968 void WMSetLabelTextAlignment(WMLabel
*lPtr
, WMAlignment alignment
);
970 void WMSetLabelRelief(WMLabel
*lPtr
, WMReliefType relief
);
972 void WMSetLabelText(WMLabel
*lPtr
, char *text
);
974 void WMSetLabelFont(WMLabel
*lPtr
, WMFont
*font
);
976 void WMSetLabelTextColor(WMLabel
*lPtr
, WMColor
*color
);
978 /* ....................................................................... */
980 WMFrame
*WMCreateFrame(WMWidget
*parent
);
982 void WMSetFrameTitlePosition(WMFrame
*fPtr
, WMTitlePosition position
);
984 void WMSetFrameRelief(WMFrame
*fPtr
, WMReliefType relief
);
986 void WMSetFrameTitle(WMFrame
*fPtr
, char *title
);
988 /* ....................................................................... */
990 WMTextField
*WMCreateTextField(WMWidget
*parent
);
992 void WMInsertTextFieldText(WMTextField
*tPtr
, char *text
, int position
);
994 void WMDeleteTextFieldRange(WMTextField
*tPtr
, WMRange range
);
996 /* you can free the returned string */
997 char *WMGetTextFieldText(WMTextField
*tPtr
);
999 void WMSetTextFieldText(WMTextField
*tPtr
, char *text
);
1001 void WMSetTextFieldAlignment(WMTextField
*tPtr
, WMAlignment alignment
);
1003 void WMSetTextFieldFont(WMTextField
*tPtr
, WMFont
*font
);
1005 WMFont
*WMGetTextFieldFont(WMTextField
*tPtr
);
1007 void WMSetTextFieldBordered(WMTextField
*tPtr
, Bool bordered
);
1009 void WMSetTextFieldBeveled(WMTextField
*tPtr
, Bool flag
);
1011 Bool
WMGetTextFieldEditable(WMTextField
*tPtr
);
1013 void WMSetTextFieldEditable(WMTextField
*tPtr
, Bool flag
);
1015 void WMSetTextFieldSecure(WMTextField
*tPtr
, Bool flag
);
1017 void WMSelectTextFieldRange(WMTextField
*tPtr
, WMRange range
);
1019 void WMSetTextFieldCursorPosition(WMTextField
*tPtr
, unsigned int position
);
1021 void WMSetTextFieldNextTextField(WMTextField
*tPtr
, WMTextField
*next
);
1023 void WMSetTextFieldPrevTextField(WMTextField
*tPtr
, WMTextField
*prev
);
1025 void WMSetTextFieldDelegate(WMTextField
*tPtr
, WMTextFieldDelegate
*delegate
);
1028 extern char *WMTextDidChangeNotification
;
1029 extern char *WMTextDidBeginEditingNotification
;
1030 extern char *WMTextDidEndEditingNotification
;
1032 /* ....................................................................... */
1034 WMScroller
*WMCreateScroller(WMWidget
*parent
);
1036 void WMSetScrollerParameters(WMScroller
*sPtr
, float floatValue
,
1037 float knobProportion
);
1039 float WMGetScrollerKnobProportion(WMScroller
*sPtr
);
1041 float WMGetScrollerValue(WMScroller
*sPtr
);
1043 WMScrollerPart
WMGetScrollerHitPart(WMScroller
*sPtr
);
1045 void WMSetScrollerAction(WMScroller
*sPtr
, WMAction
*action
, void *clientData
);
1047 void WMSetScrollerArrowsPosition(WMScroller
*sPtr
,
1048 WMScrollArrowPosition position
);
1050 /* ....................................................................... */
1052 WMList
*WMCreateList(WMWidget
*parent
);
1054 #define WMAddListItem(lPtr, text) WMInsertListItem((lPtr), -1, (text))
1056 WMListItem
*WMInsertListItem(WMList
*lPtr
, int row
, char *text
);
1058 void WMSortListItems(WMList
*lPtr
);
1060 void WMSortListItemsWithComparer(WMList
*lPtr
,
1061 int (f
)(const void*, const void*));
1063 int WMFindRowOfListItemWithTitle(WMList
*lPtr
, char *title
);
1065 WMListItem
*WMGetListItem(WMList
*lPtr
, int row
);
1067 WMBag
*WMGetListItems(WMList
*lPtr
);
1070 void WMRemoveListItem(WMList
*lPtr
, int row
);
1072 void WMSelectListItem(WMList
*lPtr
, int row
);
1074 void WMSetListUserDrawProc(WMList
*lPtr
, WMListDrawProc
*proc
);
1076 void WMSetListUserDrawItemHeight(WMList
*lPtr
, unsigned short height
);
1078 int WMGetListItemHeight(WMList
*lPtr
);
1080 /* don't free the returned data */
1081 WMListItem
*WMGetListSelectedItem(WMList
*lPtr
);
1083 int WMGetListSelectedItemRow(WMList
*lPtr
);
1085 void WMSetListAction(WMList
*lPtr
, WMAction
*action
, void *clientData
);
1087 void WMSetListDoubleAction(WMList
*lPtr
, WMAction
*action
, void *clientData
);
1089 void WMClearList(WMList
*lPtr
);
1091 int WMGetListNumberOfRows(WMList
*lPtr
);
1093 void WMSetListPosition(WMList
*lPtr
, int row
);
1095 void WMSetListBottomPosition(WMList
*lPtr
, int row
);
1097 int WMGetListPosition(WMList
*lPtr
);
1099 extern char *WMListDidScrollNotification
;
1100 extern char *WMListSelectionDidChangeNotification
;
1102 /* ....................................................................... */
1104 WMBrowser
*WMCreateBrowser(WMWidget
*parent
);
1106 void WMSetBrowserPathSeparator(WMBrowser
*bPtr
, char *separator
);
1108 void WMSetBrowserTitled(WMBrowser
*bPtr
, Bool flag
);
1110 void WMLoadBrowserColumnZero(WMBrowser
*bPtr
);
1112 int WMAddBrowserColumn(WMBrowser
*bPtr
);
1114 void WMRemoveBrowserItem(WMBrowser
*bPtr
, int column
, int row
);
1116 void WMSetBrowserMaxVisibleColumns(WMBrowser
*bPtr
, int columns
);
1118 void WMSetBrowserColumnTitle(WMBrowser
*bPtr
, int column
, char *title
);
1120 WMListItem
*WMInsertBrowserItem(WMBrowser
*bPtr
, int column
, int row
, char *text
, Bool isBranch
);
1122 void WMSortBrowserColumn(WMBrowser
*bPtr
, int column
);
1124 void WMSortBrowserColumnWithComparer(WMBrowser
*bPtr
, int column
,
1125 int (f
)(const void*, const void*));
1127 /* Don't free the returned string. */
1128 char* WMSetBrowserPath(WMBrowser
*bPtr
, char *path
);
1130 /* you can free the returned string */
1131 char *WMGetBrowserPath(WMBrowser
*bPtr
);
1132 /* you can free the returned string */
1133 char *WMGetBrowserPathToColumn(WMBrowser
*bPtr
, int column
);
1135 void WMSetBrowserAction(WMBrowser
*bPtr
, WMAction
*action
, void *clientData
);
1137 void WMSetBrowserDoubleAction(WMBrowser
*bPtr
, WMAction
*action
,
1140 WMListItem
*WMGetBrowserSelectedItemInColumn(WMBrowser
*bPtr
, int column
);
1142 int WMGetBrowserFirstVisibleColumn(WMBrowser
*bPtr
);
1144 int WMGetBrowserSelectedColumn(WMBrowser
*bPtr
);
1146 int WMGetBrowserSelectedRowInColumn(WMBrowser
*bPtr
, int column
);
1148 int WMGetBrowserNumberOfColumns(WMBrowser
*bPtr
);
1150 int WMGetBrowserMaxVisibleColumns(WMBrowser
*bPtr
);
1152 WMList
*WMGetBrowserListInColumn(WMBrowser
*bPtr
, int column
);
1154 void WMSetBrowserDelegate(WMBrowser
*bPtr
, WMBrowserDelegate
*delegate
);
1156 /* ....................................................................... */
1159 Bool
WMMenuItemIsSeparator(WMMenuItem
*item
);
1161 WMMenuItem
*WMCreateMenuItem(void);
1163 void WMDestroyMenuItem(WMMenuItem
*item
);
1165 Bool
WMGetMenuItemEnabled(WMMenuItem
*item
);
1167 void WMSetMenuItemEnabled(WMMenuItem
*item
, Bool flag
);
1169 char *WMGetMenuItemShortcut(WMMenuItem
*item
);
1171 unsigned WMGetMenuItemShortcutModifierMask(WMMenuItem
*item
);
1173 void WMSetMenuItemShortcut(WMMenuItem
*item
, char *shortcut
);
1175 void WMSetMenuItemShortcutModifierMask(WMMenuItem
*item
, unsigned mask
);
1177 void *WMGetMenuItemRepresentedObject(WMMenuItem
*item
);
1179 void WMSetMenuItemRepresentedObject(WMMenuItem
*item
, void *object
);
1181 void WMSetMenuItemAction(WMMenuItem
*item
, WMAction
*action
, void *data
);
1183 WMAction
*WMGetMenuItemAction(WMMenuItem
*item
);
1185 void *WMGetMenuItemData(WMMenuItem
*item
);
1187 void WMSetMenuItemTitle(WMMenuItem
*item
, char *title
);
1189 char *WMGetMenuItemTitle(WMMenuItem
*item
);
1191 void WMSetMenuItemState(WMMenuItem
*item
, int state
);
1193 int WMGetMenuItemState(WMMenuItem
*item
);
1195 void WMSetMenuItemPixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1197 WMPixmap
*WMGetMenuItemPixmap(WMMenuItem
*item
);
1199 void WMSetMenuItemOnStatePixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1201 WMPixmap
*WMGetMenuItemOnStatePixmap(WMMenuItem
*item
);
1203 void WMSetMenuItemOffStatePixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1205 WMPixmap
*WMGetMenuItemOffStatePixmap(WMMenuItem
*item
);
1207 void WMSetMenuItemMixedStatePixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1209 WMPixmap
*WMGetMenuItemMixedStatePixmap(WMMenuItem
*item
);
1211 /*void WMSetMenuItemSubmenu(WMMenuItem *item, WMMenu *submenu);
1214 WMMenu *WMGetMenuItemSubmenu(WMMenuItem *item);
1216 Bool WMGetMenuItemHasSubmenu(WMMenuItem *item);
1219 /* ....................................................................... */
1221 WMPopUpButton
*WMCreatePopUpButton(WMWidget
*parent
);
1223 void WMSetPopUpButtonAction(WMPopUpButton
*sPtr
, WMAction
*action
,
1226 void WMSetPopUpButtonPullsDown(WMPopUpButton
*bPtr
, Bool flag
);
1228 WMMenuItem
*WMAddPopUpButtonItem(WMPopUpButton
*bPtr
, char *title
);
1230 WMMenuItem
*WMInsertPopUpButtonItem(WMPopUpButton
*bPtr
, int index
,
1233 void WMRemovePopUpButtonItem(WMPopUpButton
*bPtr
, int index
);
1235 void WMSetPopUpButtonItemEnabled(WMPopUpButton
*bPtr
, int index
, Bool flag
);
1237 Bool
WMGetPopUpButtonItemEnabled(WMPopUpButton
*bPtr
, int index
);
1239 void WMSetPopUpButtonSelectedItem(WMPopUpButton
*bPtr
, int index
);
1241 int WMGetPopUpButtonSelectedItem(WMPopUpButton
*bPtr
);
1243 void WMSetPopUpButtonText(WMPopUpButton
*bPtr
, char *text
);
1245 /* don't free the returned data */
1246 char *WMGetPopUpButtonItem(WMPopUpButton
*bPtr
, int index
);
1248 WMMenuItem
*WMGetPopUpButtonMenuItem(WMPopUpButton
*bPtr
, int index
);
1251 int WMGetPopUpButtonNumberOfItems(WMPopUpButton
*bPtr
);
1253 void WMSetPopUpButtonEnabled(WMPopUpButton
*bPtr
, Bool flag
);
1255 Bool
WMGetPopUpButtonEnabled(WMPopUpButton
*bPtr
);
1257 /* ....................................................................... */
1259 WMProgressIndicator
*WMCreateProgressIndicator(WMWidget
*parent
);
1261 void WMSetProgressIndicatorMinValue(WMProgressIndicator
*progressindicator
, int value
);
1263 void WMSetProgressIndicatorMaxValue(WMProgressIndicator
*progressindicator
, int value
);
1265 void WMSetProgressIndicatorValue(WMProgressIndicator
*progressindicator
, int value
);
1267 int WMGetProgressIndicatorMinValue(WMProgressIndicator
*progressindicator
);
1269 int WMGetProgressIndicatorMaxValue(WMProgressIndicator
*progressindicator
);
1271 int WMGetProgressIndicatorValue(WMProgressIndicator
*progressindicator
);
1274 /* ....................................................................... */
1276 WMColorPanel
*WMGetColorPanel(WMScreen
*scrPtr
);
1278 void WMFreeColorPanel(WMColorPanel
*panel
);
1280 void WMShowColorPanel(WMColorPanel
*panel
);
1282 void WMCloseColorPanel(WMColorPanel
*panel
);
1284 void WMSetColorPanelColor(WMColorPanel
*panel
, WMColor
*color
);
1286 WMColor
*WMGetColorPanelColor(WMColorPanel
*panel
);
1288 void WMSetColorPanelPickerMode(WMColorPanel
*panel
, WMColorPanelMode mode
);
1290 void WMSetColorPanelAction(WMColorPanel
*panel
, WMAction2
*action
, void *data
);
1292 extern char *WMColorPanelColorChangedNotification
;
1294 /* ....................................................................... */
1296 WMColorWell
*WMCreateColorWell(WMWidget
*parent
);
1298 void WMSetColorWellColor(WMColorWell
*cPtr
, WMColor
*color
);
1300 WMColor
*WMGetColorWellColor(WMColorWell
*cPtr
);
1302 void WSetColorWellBordered(WMColorWell
*cPtr
, Bool flag
);
1305 extern char *WMColorWellDidChangeNotification
;
1308 /* ...................................................................... */
1310 WMScrollView
*WMCreateScrollView(WMWidget
*parent
);
1312 void WMResizeScrollViewContent(WMScrollView
*sPtr
, unsigned int width
,
1313 unsigned int height
);
1315 void WMSetScrollViewHasHorizontalScroller(WMScrollView
*sPtr
, Bool flag
);
1317 void WMSetScrollViewHasVerticalScroller(WMScrollView
*sPtr
, Bool flag
);
1319 void WMSetScrollViewContentView(WMScrollView
*sPtr
, WMView
*view
);
1321 void WMSetScrollViewRelief(WMScrollView
*sPtr
, WMReliefType type
);
1323 void WMSetScrollViewContentView(WMScrollView
*sPtr
, WMView
*view
);
1325 WMScroller
*WMGetScrollViewHorizontalScroller(WMScrollView
*sPtr
);
1327 WMScroller
*WMGetScrollViewVerticalScroller(WMScrollView
*sPtr
);
1329 void WMSetScrollViewLineScroll(WMScrollView
*sPtr
, int amount
);
1331 void WMSetScrollViewPageScroll(WMScrollView
*sPtr
, int amount
);
1333 /* ....................................................................... */
1335 WMSlider
*WMCreateSlider(WMWidget
*parent
);
1337 int WMGetSliderMinValue(WMSlider
*slider
);
1339 int WMGetSliderMaxValue(WMSlider
*slider
);
1341 int WMGetSliderValue(WMSlider
*slider
);
1343 void WMSetSliderMinValue(WMSlider
*slider
, int value
);
1345 void WMSetSliderMaxValue(WMSlider
*slider
, int value
);
1347 void WMSetSliderValue(WMSlider
*slider
, int value
);
1349 void WMSetSliderContinuous(WMSlider
*slider
, Bool flag
);
1351 void WMSetSliderAction(WMSlider
*slider
, WMAction
*action
, void *data
);
1353 void WMSetSliderKnobThickness(WMSlider
*sPtr
, int thickness
);
1355 void WMSetSliderImage(WMSlider
*sPtr
, WMPixmap
*pixmap
);
1357 /* ....................................................................... */
1360 WMSplitView
*WMCreateSplitView(WMWidget
*parent
);
1361 Bool
WMGetSplitViewVertical(WMSplitView
*sPtr
);
1362 void WMSetSplitViewVertical(WMSplitView
*sPtr
, Bool flag
);
1364 int WMGetSplitViewSubviewsCount(WMSplitView
*sPtr
); /* ??? remove ??? */
1366 WMView
*WMGetSplitViewSubviewAt(WMSplitView
*sPtr
, int index
);
1368 /* remove the first subview == view */
1369 void WMRemoveSplitViewSubview(WMSplitView
*sPtr
, WMView
*view
);
1371 void WMRemoveSplitViewSubviewAt(WMSplitView
*sPtr
, int index
);
1374 void WMAddSplitViewSubview(WMSplitView
*sPtr
, WMView
*subview
);
1376 void WMAdjustSplitViewSubviews(WMSplitView
*sPtr
);
1378 void WMSetSplitViewConstrainProc(WMSplitView
*sPtr
,
1379 WMSplitViewConstrainProc
*proc
);
1382 void WMSetSplitViewResizeSubviewsProc(WMSplitView *sPtr,
1383 WMSplitViewResizeSubviewsProc *proc);
1386 int WMGetSplitViewDividerThickness(WMSplitView
*sPtr
);
1388 /* ...................................................................... */
1390 WMRuler
*WMCreateRuler (WMWidget
*parent
);
1392 void WMShowRulerTabs(WMRuler
*rPtr
, Bool Show
);
1394 WMRulerMargins
WMGetRulerMargins(WMRuler
*rPtr
);
1396 void WMSetRulerMargins(WMRuler
*rPtr
, WMRulerMargins margins
);
1398 int WMGetGrabbedRulerMargin(WMRuler
*rPtr
);
1400 int WMGetReleasedRulerMargin(WMRuler
*rPtr
);
1402 int WMGetRulerOffset(WMRuler
*rPtr
);
1404 void WMSetRulerOffset(WMRuler
*rPtr
, int pixels
);
1406 void WMSetRulerMoveAction(WMRuler
*rPtr
, WMAction
*action
, void *clientData
);
1408 void WMSetRulerReleaseAction(WMRuler
*rPtr
, WMAction
*action
, void *clientData
);
1410 /* ....................................................................... */
1412 WMText
*WMCreateText(WMWidget
*parent
);
1414 void WMRefreshText(WMText
*tPtr
, int vpos
, int hpos
);
1416 void WMFreezeText(WMText
*tPtr
);
1418 void WMThawText(WMText
*tPtr
);
1420 Bool
WMScrollText(WMText
*tPtr
, int amount
);
1422 Bool
WMPageText(WMText
*tPtr
, Bool direction
);
1424 void WMSetTextHasHorizontalScroller(WMText
*tPtr
, Bool shouldhave
);
1426 void WMSetTextHasVerticalScroller(WMText
*tPtr
, Bool shouldhave
);
1428 void WMSetTextHasRuler(WMText
*tPtr
, Bool shouldhave
);
1430 void WMShowTextRuler(WMText
*tPtr
, Bool show
);
1432 void WMSetTextUseMonoFont(WMText
*tPtr
, Bool mono
);
1434 int WMGetTextUsesMonoFont(WMText
*tPtr
);
1436 void WMSetTextDefaultFont(WMText
*tPtr
, WMFont
*font
);
1438 WMFont
* WMGetTextDefaultFont(WMText
*tPtr
);
1440 void WMSetTextRelief(WMText
*tPtr
, WMReliefType relief
);
1442 void WMSetTextForegroundColor(WMText
*tPtr
, WMColor
*color
);
1444 void WMSetTextBackgroundColor(WMText
*tPtr
, WMColor
*color
);
1446 void WMPrependTextStream(WMText
*tPtr
, char *text
);
1448 void WMAppendTextStream(WMText
*tPtr
, char *text
);
1450 WMData
* WMGetTextSelected(WMText
*tPtr
);
1452 void *WMCreateTextBlockWithObject(WMWidget
*w
, char *description
,
1453 WMColor
*color
, unsigned short first
, unsigned short reserved
);
1455 void *WMCreateTextBlockWithText(char *text
, WMFont
*font
,
1456 WMColor
*color
, unsigned short first
, unsigned short length
);
1458 void WMSetTextBlockProperties(void *vtb
, unsigned int first
,
1459 unsigned int kanji
, unsigned int underlined
, int script
,
1460 unsigned int marginN
);
1462 void WMGetTextBlockProperties(void *vtb
, unsigned int *first
,
1463 unsigned int *kanji
, unsigned int *underlined
, int *script
,
1464 unsigned int *marginN
);
1467 /* parser related stuff... see how it can be done in testtext.c */
1469 void WMSetTextParser(WMText
*tPtr
, WMAction
*parser
);
1471 void WMSetTextWriter(WMText
*tPtr
, WMAction
*writer
);
1473 int WMGetTextInsertType(WMText
*tPtr
);
1475 int WMGetTextBlocks(WMText
*tPtr
);
1477 void WMSetCurrentTextBlock(WMText
*tPtr
, int current
);
1479 int WMGetCurrentTextBlock(WMText
*tPtr
);
1481 void WMPrependTextBlock(WMText
*tPtr
, void *vtb
);
1483 void WMAppendTextBlock(WMText
*tPtr
, void *vtb
);
1485 void *WMRemoveTextBlock(WMText
*tPtr
);
1487 void WMDestroyTextBlock(WMText
*tPtr
, void *vtb
);
1489 /* ....................................................................... */
1492 WMTabView
*WMCreateTabView(WMWidget
*parent
);
1494 void WMSetTabViewFont(WMTabView
*tPtr
, WMFont
*font
);
1496 void WMAddItemInTabView(WMTabView
*tPtr
, WMTabViewItem
*item
);
1498 void WMInsertItemInTabView(WMTabView
*tPtr
, int index
, WMTabViewItem
*item
);
1500 void WMRemoveTabViewItem(WMTabView
*tPtr
, WMTabViewItem
*item
);
1502 WMTabViewItem
*WMTabViewItemAtPoint(WMTabView
*tPtr
, int x
, int y
);
1504 void WMSelectFirstTabViewItem(WMTabView
*tPtr
);
1506 void WMSelectLastTabViewItem(WMTabView
*tPtr
);
1508 void WMSelectNextTabViewItem(WMTabView
*tPtr
);
1510 void WMSelectPreviousTabViewItem(WMTabView
*tPtr
);
1512 WMTabViewItem
*WMGetSelectedTabViewItem(WMTabView
*tPtr
);
1514 void WMSelectTabViewItem(WMTabView
*tPtr
, WMTabViewItem
*item
);
1516 void WMSelectTabViewItemAtIndex(WMTabView
*tPtr
, int index
);
1518 void WMSetTabViewDelegate(WMTabView
*tPtr
, WMTabViewDelegate
*delegate
);
1521 WMTabViewItem
*WMCreateTabViewItemWithIdentifier(int identifier
);
1523 int WMGetTabViewItemIdentifier(WMTabViewItem
*item
);
1525 void WMSetTabViewItemLabel(WMTabViewItem
*item
, char *label
);
1527 char *WMGetTabViewItemLabel(WMTabViewItem
*item
);
1529 void WMSetTabViewItemView(WMTabViewItem
*item
, WMView
*view
);
1531 WMView
*WMGetTabViewItemView(WMTabViewItem
*item
);
1533 void WMDestroyTabViewItem(WMTabViewItem
*item
);
1535 /* ....................................................................... */
1537 int WMRunAlertPanel(WMScreen
*app
, WMWindow
*owner
, char *title
, char *msg
,
1538 char *defaultButton
, char *alternateButton
,
1541 /* you can free the returned string */
1542 char *WMRunInputPanel(WMScreen
*app
, WMWindow
*owner
, char *title
, char *msg
,
1543 char *defaultText
, char *okButton
, char *cancelButton
);
1545 WMAlertPanel
*WMCreateAlertPanel(WMScreen
*app
, WMWindow
*owner
, char *title
,
1546 char *msg
, char *defaultButton
,
1547 char *alternateButton
, char *otherButton
);
1549 WMInputPanel
*WMCreateInputPanel(WMScreen
*app
, WMWindow
*owner
, char *title
,
1550 char *msg
, char *defaultText
, char *okButton
,
1551 char *cancelButton
);
1553 void WMDestroyAlertPanel(WMAlertPanel
*panel
);
1555 void WMDestroyInputPanel(WMInputPanel
*panel
);
1557 /* ....................................................................... */
1559 /* only 1 instance per WMScreen */
1560 WMOpenPanel
*WMGetOpenPanel(WMScreen
*scrPtr
);
1562 WMSavePanel
*WMGetSavePanel(WMScreen
*scrPtr
);
1564 void WMSetFilePanelCanChooseDirectories(WMFilePanel
*panel
, Bool flag
);
1566 void WMSetFilePanelCanChooseFiles(WMFilePanel
*panel
, Bool flag
);
1568 void WMSetFilePanelAutoCompletion(WMFilePanel
*panel
, Bool flag
);
1570 void WMSetFilePanelDirectory(WMFilePanel
*panel
, char *path
);
1572 /* you can free the returned string */
1573 char *WMGetFilePanelFileName(WMFilePanel
*panel
);
1575 void WMFreeFilePanel(WMFilePanel
*panel
);
1577 int WMRunModalFilePanelForDirectory(WMFilePanel
*panel
, WMWindow
*owner
,
1578 char *path
, char *name
, char **fileTypes
);
1580 void WMSetFilePanelAccessoryView(WMFilePanel
*panel
, WMView
*view
);
1582 WMView
*WMGetFilePanelAccessoryView(WMFilePanel
*panel
);
1585 /* ...................................................................... */
1587 /* only 1 instance per WMScreen */
1588 WMFontPanel
*WMGetFontPanel(WMScreen
*scr
);
1590 void WMShowFontPanel(WMFontPanel
*panel
);
1592 void WMHideFontPanel(WMFontPanel
*panel
);
1594 void WMSetFontPanelFont(WMFontPanel
*panel
, WMFont
*font
);
1596 /* you can free the returned string */
1597 char *WMGetFontPanelFontName(WMFontPanel
*panel
);
1599 WMFont
*WMGetFontPanelFont(WMFontPanel
*panel
);
1603 #endif /* __cplusplus */