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 */
207 /* drag operations */
215 } WMDragOperationType
;
219 WMGrayModeColorPanel
= 1,
220 WMRGBModeColorPanel
= 2,
221 WMCMYKModeColorPanel
= 3,
222 WMHSBModeColorPanel
= 4,
223 WMCustomPaletteModeColorPanel
= 5,
224 WMColorListModeColorPanel
= 6,
225 WMWheelModeColorPanel
= 7
231 #define WSIReturnArrow 1
232 #define WSIHighlightedReturnArrow 2
233 #define WSIScrollerDimple 3
234 #define WSIArrowLeft 4
235 #define WSIHighlightedArrowLeft 5
236 #define WSIArrowRight 6
237 #define WSIHighlightedArrowRight 7
239 #define WSIHighlightedArrowUp 9
240 #define WSIArrowDown 10
241 #define WSIHighlightedArrowDown 11
242 #define WSICheckMark 12
245 WLDSSelected
= (1 << 16),
246 WLDSDisabled
= (1 << 17),
247 WLDSFocused
= (1 << 18),
248 WLDSIsBranch
= (1 << 19)
251 /* alert panel return values */
261 /* types of input observers */
263 WIReadMask
= (1 << 0),
264 WIWriteMask
= (1 << 1),
265 WIExceptMask
= (1 << 2)
285 WC_Matrix
= 12, /* not ready */
288 WC_ProgressIndicator
= 15,
294 /* All widgets must start with the following structure
295 * in that order. Used for typecasting to get some generic data */
296 typedef struct W_WidgetType
{
303 #define WMWidgetClass(widget) (((W_WidgetType*)(widget))->widgetClass)
304 #define WMWidgetView(widget) (((W_WidgetType*)(widget))->view)
309 typedef void WMWidget
;
311 typedef struct W_Pixmap WMPixmap
;
312 typedef struct W_Font WMFont
;
313 typedef struct W_Color WMColor
;
315 typedef struct W_Screen WMScreen
;
317 typedef struct W_View WMView
;
319 typedef struct W_Window WMWindow
;
320 typedef struct W_Frame WMFrame
;
321 typedef struct W_Button WMButton
;
322 typedef struct W_Label WMLabel
;
323 typedef struct W_TextField WMTextField
;
324 typedef struct W_Scroller WMScroller
;
325 typedef struct W_ScrollView WMScrollView
;
326 typedef struct W_List WMList
;
327 typedef struct W_Browser WMBrowser
;
328 typedef struct W_PopUpButton WMPopUpButton
;
329 typedef struct W_ProgressIndicator WMProgressIndicator
;
330 typedef struct W_ColorWell WMColorWell
;
331 typedef struct W_Slider WMSlider
;
332 typedef struct W_Matrix WMMatrix
; /* not ready */
333 typedef struct W_SplitView WMSplitView
;
334 typedef struct W_TabView WMTabView
;
335 typedef struct W_Ruler WMRuler
;
336 typedef struct W_Text WMText
;
340 typedef struct W_TabViewItem WMTabViewItem
;
341 typedef struct W_MenuItem WMMenuItem
;
344 typedef struct W_FilePanel WMFilePanel
;
345 typedef WMFilePanel WMOpenPanel
;
346 typedef WMFilePanel WMSavePanel
;
348 typedef struct W_FontPanel WMFontPanel
;
350 typedef struct W_ColorPanel WMColorPanel
;
353 /* item for WMList */
354 typedef struct WMListItem
{
356 void *clientData
; /* ptr for user clientdata. */
358 unsigned int uflags
:16; /* flags for the user */
359 unsigned int selected
:1;
360 unsigned int disabled
:1;
361 unsigned int isBranch
:1;
362 unsigned int loaded
:1;
365 /* struct for message panel */
366 typedef struct WMAlertPanel
{
367 WMWindow
*win
; /* window */
368 WMButton
*defBtn
; /* default button */
369 WMButton
*altBtn
; /* alternative button */
370 WMButton
*othBtn
; /* other button */
371 WMLabel
*iLbl
; /* icon label */
372 WMLabel
*tLbl
; /* title label */
373 WMLabel
*mLbl
; /* message label */
374 WMFrame
*line
; /* separator */
375 short result
; /* button that was pushed */
383 typedef struct WMInputPanel
{
384 WMWindow
*win
; /* window */
385 WMButton
*defBtn
; /* default button */
386 WMButton
*altBtn
; /* alternative button */
387 WMLabel
*tLbl
; /* title label */
388 WMLabel
*mLbl
; /* message label */
389 WMTextField
*text
; /* text field */
390 short result
; /* button that was pushed */
403 typedef void *WMHandlerID
;
405 typedef void WMInputProc(int fd
, int mask
, void *clientData
);
407 typedef void WMEventProc(XEvent
*event
, void *clientData
);
409 typedef void WMEventHook(XEvent
*event
);
411 /* self is set to the widget from where the callback is being called and
412 * clientData to the data set to with WMSetClientData() */
413 typedef void WMAction(WMWidget
*self
, void *clientData
);
415 /* same as WMAction, but for stuff that arent widgets */
416 typedef void WMAction2(void *self
, void *clientData
);
419 typedef void WMCallback(void *data
);
421 typedef void WMDropDataCallback(WMView
*view
, WMData
*data
);
423 /* delegate method like stuff */
424 typedef void WMListDrawProc(WMList
*lPtr
, int index
, Drawable d
, char *text
,
425 int state
, WMRect
*rect
);
428 typedef void WMSplitViewResizeSubviewsProc(WMSplitView *sPtr,
429 unsigned int oldWidth,
430 unsigned int oldHeight);
433 typedef void WMSplitViewConstrainProc(WMSplitView
*sPtr
, int dividerIndex
,
434 int *minSize
, int *maxSize
);
436 typedef WMWidget
*WMMatrixCreateCellProc(WMMatrix
*mPtr
);
441 typedef struct WMBrowserDelegate
{
444 void (*createRowsForColumn
)(struct WMBrowserDelegate
*self
,
445 WMBrowser
*sender
, int column
, WMList
*list
);
447 char* (*titleOfColumn
)(struct WMBrowserDelegate
*self
, WMBrowser
*sender
,
450 void (*didScroll
)(struct WMBrowserDelegate
*self
, WMBrowser
*sender
);
452 void (*willScroll
)(struct WMBrowserDelegate
*self
, WMBrowser
*sender
);
456 typedef struct WMTextFieldDelegate
{
459 void (*didBeginEditing
)(struct WMTextFieldDelegate
*self
,
460 WMNotification
*notif
);
462 void (*didChange
)(struct WMTextFieldDelegate
*self
,
463 WMNotification
*notif
);
465 void (*didEndEditing
)(struct WMTextFieldDelegate
*self
,
466 WMNotification
*notif
);
468 Bool (*shouldBeginEditing
)(struct WMTextFieldDelegate
*self
,
471 Bool (*shouldEndEditing
)(struct WMTextFieldDelegate
*self
,
473 } WMTextFieldDelegate
;
477 typedef struct WMTabViewDelegate
{
480 void (*didChangeNumberOfItems
)(struct WMTabViewDelegate
*self
,
483 void (*didSelectItem
)(struct WMTabViewDelegate
*self
, WMTabView
*tabView
,
484 WMTabViewItem
*item
);
486 Bool (*shouldSelectItem
)(struct WMTabViewDelegate
*self
, WMTabView
*tabView
,
487 WMTabViewItem
*item
);
489 void (*willSelectItem
)(struct WMTabViewDelegate
*self
, WMTabView
*tabView
,
490 WMTabViewItem
*item
);
496 typedef void WMSelectionCallback(WMView
*view
, Atom selection
, Atom target
,
497 Time timestamp
, void *cdata
, WMData
*data
);
500 typedef struct WMSelectionProcs
{
501 WMData
* (*convertSelection
)(WMView
*view
, Atom selection
, Atom target
,
502 void *cdata
, Atom
*type
);
503 void (*selectionLost
)(WMView
*view
, Atom selection
, void *cdata
);
504 void (*selectionDone
)(WMView
*view
, Atom selection
, Atom target
,
511 typedef void WMParseAction(WMWidget
*self
, void *clientData
, short type
);
513 /* these are the things parsers (for text) do */
515 typedef struct _parserActions
{
516 void *(*createParagraph
) (short fmargin
, short bmargin
,
517 short rmargin
, short *tabstops
, short numTabs
, WMAlignment a
);
518 void (*insertParagraph
) (WMText
*tPtr
, void *para
, InsertType type
);
519 void *(*createPChunk
) (WMPixmap
*pixmap
, short script
, ushort ul
);
520 void *(*createTChunk
) (char *text
, short chars
, WMFont
*font
,
521 WMColor
*color
, short script
, ushort ul
);
522 void (*insertChunk
) (WMText
*tPtr
, void *chunk
, InsertType type
);
528 typedef struct W_DraggingInfo WMDraggingInfo
;
531 typedef struct W_DragSourceProcs
{
532 unsigned (*draggingSourceOperation
)(WMView
*self
, Bool local
);
533 void (*beganDragImage
)(WMView
*self
, WMPixmap
*image
, WMPoint point
);
534 void (*endedDragImage
)(WMView
*self
, WMPixmap
*image
, WMPoint point
,
536 WMData
* (*fetchDragData
)(WMView
*self
, char *type
);
537 /* Bool (*ignoreModifierKeysWhileDragging)(WMView *view);*/
542 typedef struct W_DragDestinationProcs
{
543 unsigned (*draggingEntered
)(WMView
*self
, WMDraggingInfo
*info
);
544 unsigned (*draggingUpdated
)(WMView
*self
, WMDraggingInfo
*info
);
545 void (*draggingExited
)(WMView
*self
, WMDraggingInfo
*info
);
546 Bool (*prepareForDragOperation
)(WMView
*self
, WMDraggingInfo
*info
);
547 Bool (*performDragOperation
)(WMView
*self
, WMDraggingInfo
*info
);
548 void (*concludeDragOperation
)(WMView
*self
, WMDraggingInfo
*info
);
549 } WMDragDestinationProcs
;
553 /* ...................................................................... */
556 WMRange
wmkrange(int start
, int count
);
558 WMPoint
wmkpoint(int x
, int y
);
560 WMSize
wmksize(unsigned int width
, unsigned int height
);
563 /* ....................................................................... */
567 void WMInitializeApplication(char *applicationName
, int *argc
, char **argv
);
569 void WMSetResourcePath(char *path
);
571 /* don't free the returned string */
572 char *WMGetApplicationName();
574 /* Try to locate resource file. ext may be NULL */
575 char *WMPathForResourceOfType(char *resource
, char *ext
);
577 WMScreen
*WMCreateScreenWithRContext(Display
*display
, int screen
,
580 WMScreen
*WMCreateScreen(Display
*display
, int screen
);
582 WMScreen
*WMCreateSimpleApplicationScreen(Display
*display
);
584 void WMScreenMainLoop(WMScreen
*scr
);
587 RContext
*WMScreenRContext(WMScreen
*scr
);
589 Display
*WMScreenDisplay(WMScreen
*scr
);
591 int WMScreenDepth(WMScreen
*scr
);
595 void WMSetApplicationIconImage(WMScreen
*app
, WMPixmap
*icon
);
597 WMPixmap
*WMGetApplicationIconImage(WMScreen
*app
);
599 void WMSetFocusToWidget(WMWidget
*widget
);
601 WMEventHook
*WMHookEventHandler(WMEventHook
*handler
);
603 int WMHandleEvent(XEvent
*event
);
605 Bool
WMScreenPending(WMScreen
*scr
);
607 void WMCreateEventHandler(WMView
*view
, unsigned long mask
,
608 WMEventProc
*eventProc
, void *clientData
);
610 void WMDeleteEventHandler(WMView
*view
, unsigned long mask
,
611 WMEventProc
*eventProc
, void *clientData
);
613 int WMIsDoubleClick(XEvent
*event
);
615 void WMNextEvent(Display
*dpy
, XEvent
*event
);
617 void WMMaskEvent(Display
*dpy
, long mask
, XEvent
*event
);
619 WMHandlerID
WMAddTimerHandler(int milliseconds
, WMCallback
*callback
,
622 void WMDeleteTimerWithClientData(void *cdata
);
624 void WMDeleteTimerHandler(WMHandlerID handlerID
);
626 WMHandlerID
WMAddIdleHandler(WMCallback
*callback
, void *cdata
);
628 void WMDeleteIdleHandler(WMHandlerID handlerID
);
630 WMHandlerID
WMAddInputHandler(int fd
, int condition
, WMInputProc
*proc
,
633 void WMDeleteInputHandler(WMHandlerID handlerID
);
637 Bool
WMCreateSelectionHandler(WMView
*view
, Atom selection
, Time timestamp
,
638 WMSelectionProcs
*procs
, void *cdata
);
640 void WMDeleteSelectionHandler(WMView
*view
, Atom selection
, Time timestamp
);
642 Bool
WMRequestSelection(WMView
*view
, Atom selection
, Atom target
,
643 Time timestamp
, WMSelectionCallback
*callback
,
647 /* ....................................................................... */
649 void WMSetViewDragSourceProcs(WMView
*view
, WMDragSourceProcs
*procs
);
651 void WMDragImageFromView(WMView
*view
, WMPixmap
*image
, char *dataTypes
[],
652 WMPoint atLocation
, WMSize mouseOffset
, XEvent
*event
,
655 void WMRegisterViewForDraggedTypes(WMView
*view
, char *acceptedTypes
[]);
657 void WMUnregisterViewDraggedTypes(WMView
*view
);
659 void WMSetViewDragDestinationProcs(WMView
*view
, WMDragDestinationProcs
*procs
);
662 WMPoint
WMGetDraggingInfoImageLocation(WMDraggingInfo
*info
);
664 /* ....................................................................... */
666 WMFont
*WMCreateFontSet(WMScreen
*scrPtr
, char *fontName
);
668 WMFont
*WMCreateNormalFont(WMScreen
*scrPtr
, char *fontName
);
670 WMFont
*WMCreateFont(WMScreen
*scrPtr
, char *fontName
);
672 WMFont
*WMRetainFont(WMFont
*font
);
674 void WMReleaseFont(WMFont
*font
);
676 unsigned int WMFontHeight(WMFont
*font
);
679 WMFont *WMUserFontOfSize(WMScreen *scrPtr, int size);
681 WMFont *WMUserFixedPitchFontOfSize(WMScreen *scrPtr, int size);
685 void WMSetWidgetDefaultFont(WMScreen
*scr
, WMFont
*font
);
687 void WMSetWidgetDefaultBoldFont(WMScreen
*scr
, WMFont
*font
);
689 WMFont
*WMSystemFontOfSize(WMScreen
*scrPtr
, int size
);
691 WMFont
*WMBoldSystemFontOfSize(WMScreen
*scrPtr
, int size
);
693 XFontSet
WMGetFontFontSet(WMFont
*font
);
695 /* ....................................................................... */
697 WMPixmap
*WMRetainPixmap(WMPixmap
*pixmap
);
699 void WMReleasePixmap(WMPixmap
*pixmap
);
701 WMPixmap
*WMCreatePixmap(WMScreen
*scrPtr
, int width
, int height
, int depth
,
704 WMPixmap
*WMCreatePixmapFromXPixmaps(WMScreen
*scrPtr
, Pixmap pixmap
,
705 Pixmap mask
, int width
, int height
,
708 WMPixmap
*WMCreatePixmapFromRImage(WMScreen
*scrPtr
, RImage
*image
,
711 WMPixmap
*WMCreatePixmapFromXPMData(WMScreen
*scrPtr
, char **data
);
713 WMSize
WMGetPixmapSize(WMPixmap
*pixmap
);
715 WMPixmap
*WMCreatePixmapFromFile(WMScreen
*scrPtr
, char *fileName
);
717 WMPixmap
*WMCreateBlendedPixmapFromFile(WMScreen
*scrPtr
, char *fileName
,
720 void WMDrawPixmap(WMPixmap
*pixmap
, Drawable d
, int x
, int y
);
722 Pixmap
WMGetPixmapXID(WMPixmap
*pixmap
);
724 Pixmap
WMGetPixmapMaskXID(WMPixmap
*pixmap
);
726 WMPixmap
*WMGetSystemPixmap(WMScreen
*scr
, int image
);
728 /* ....................................................................... */
731 WMColor
*WMDarkGrayColor(WMScreen
*scr
);
733 WMColor
*WMGrayColor(WMScreen
*scr
);
735 WMColor
*WMBlackColor(WMScreen
*scr
);
737 WMColor
*WMWhiteColor(WMScreen
*scr
);
739 void WMSetColorInGC(WMColor
*color
, GC gc
);
741 GC
WMColorGC(WMColor
*color
);
743 WMPixel
WMColorPixel(WMColor
*color
);
745 void WMPaintColorSwatch(WMColor
*color
, Drawable d
, int x
, int y
,
746 unsigned int width
, unsigned int height
);
748 void WMReleaseColor(WMColor
*color
);
750 WMColor
*WMRetainColor(WMColor
*color
);
752 WMColor
*WMCreateRGBColor(WMScreen
*scr
, unsigned short red
,
753 unsigned short green
, unsigned short blue
,
756 WMColor
*WMCreateNamedColor(WMScreen
*scr
, char *name
, Bool exact
);
758 unsigned short WMRedComponentOfColor(WMColor
*color
);
760 unsigned short WMGreenComponentOfColor(WMColor
*color
);
762 unsigned short WMBlueComponentOfColor(WMColor
*color
);
764 char *WMGetColorRGBDescription(WMColor
*color
);
766 /* ....................................................................... */
769 void WMDrawString(WMScreen
*scr
, Drawable d
, GC gc
, WMFont
*font
, int x
,
770 int y
, char *text
, int length
);
772 void WMDrawImageString(WMScreen
*scr
, Drawable d
, GC gc
, WMFont
*font
, int x
,
773 int y
, char *text
, int length
);
775 int WMWidthOfString(WMFont
*font
, char *text
, int length
);
779 /* ....................................................................... */
781 WMScreen
*WMWidgetScreen(WMWidget
*w
);
783 unsigned int WMScreenWidth(WMScreen
*scr
);
785 unsigned int WMScreenHeight(WMScreen
*scr
);
787 void WMUnmapWidget(WMWidget
*w
);
789 void WMMapWidget(WMWidget
*w
);
791 void WMMoveWidget(WMWidget
*w
, int x
, int y
);
793 void WMResizeWidget(WMWidget
*w
, unsigned int width
, unsigned int height
);
795 void WMSetWidgetBackgroundColor(WMWidget
*w
, WMColor
*color
);
797 void WMMapSubwidgets(WMWidget
*w
);
799 void WMUnmapSubwidgets(WMWidget
*w
);
801 void WMRealizeWidget(WMWidget
*w
);
803 void WMDestroyWidget(WMWidget
*widget
);
805 void WMHangData(WMWidget
*widget
, void *data
);
807 void *WMGetHangedData(WMWidget
*widget
);
809 unsigned int WMWidgetWidth(WMWidget
*w
);
811 unsigned int WMWidgetHeight(WMWidget
*w
);
813 Window
WMWidgetXID(WMWidget
*w
);
815 Window
WMViewXID(WMView
*view
);
817 void WMRedisplayWidget(WMWidget
*w
);
819 void WMSetViewNotifySizeChanges(WMView
*view
, Bool flag
);
821 WMSize
WMGetViewSize(WMView
*view
);
823 WMPoint
WMGetViewPosition(WMView
*view
);
825 WMPoint
WMGetViewScreenPosition(WMView
*view
);
827 WMWidget
*WMWidgetOfView(WMView
*view
);
830 extern char *WMViewSizeDidChangeNotification
;
832 extern char *WMViewRealizedNotification
;
835 /* ....................................................................... */
837 void WMSetBalloonTextForView(char *text
, WMView
*view
);
839 void WMSetBalloonTextAlignment(WMScreen
*scr
, WMAlignment alignment
);
841 void WMSetBalloonFont(WMScreen
*scr
, WMFont
*font
);
843 void WMSetBalloonTextColor(WMScreen
*scr
, WMColor
*color
);
845 void WMSetBalloonDelay(WMScreen
*scr
, int delay
);
847 void WMSetBalloonEnabled(WMScreen
*scr
, Bool flag
);
850 /* ....................................................................... */
852 WMWindow
*WMCreateWindow(WMScreen
*screen
, char *name
);
854 WMWindow
*WMCreateWindowWithStyle(WMScreen
*screen
, char *name
, int style
);
856 WMWindow
*WMCreatePanelWithStyleForWindow(WMWindow
*owner
, char *name
,
859 WMWindow
*WMCreatePanelForWindow(WMWindow
*owner
, char *name
);
861 void WMChangePanelOwner(WMWindow
*win
, WMWindow
*newOwner
);
863 void WMSetWindowTitle(WMWindow
*wPtr
, char *title
);
865 void WMSetWindowMiniwindowTitle(WMWindow
*win
, char *title
);
867 void WMSetWindowMiniwindowImage(WMWindow
*win
, WMPixmap
*pixmap
);
869 void WMSetWindowCloseAction(WMWindow
*win
, WMAction
*action
, void *clientData
);
871 void WMSetWindowInitialPosition(WMWindow
*win
, int x
, int y
);
873 void WMSetWindowAspectRatio(WMWindow
*win
, int minX
, int minY
,
876 void WMSetWindowMaxSize(WMWindow
*win
, unsigned width
, unsigned height
);
878 void WMSetWindowMinSize(WMWindow
*win
, unsigned width
, unsigned height
);
880 void WMSetWindowBaseSize(WMWindow
*win
, unsigned width
, unsigned height
);
882 void WMSetWindowResizeIncrements(WMWindow
*win
, unsigned wIncr
, unsigned hIncr
);
884 void WMSetWindowLevel(WMWindow
*win
, int level
);
886 void WMSetWindowDocumentEdited(WMWindow
*win
, Bool flag
);
888 void WMCloseWindow(WMWindow
*win
);
890 /* ....................................................................... */
892 void WMSetButtonAction(WMButton
*bPtr
, WMAction
*action
, void *clientData
);
894 #define WMCreateCommandButton(parent) \
895 WMCreateCustomButton((parent), WBBSpringLoadedMask\
900 #define WMCreateRadioButton(parent) \
901 WMCreateButton((parent), WBTRadio)
903 #define WMCreateSwitchButton(parent) \
904 WMCreateButton((parent), WBTSwitch)
906 WMButton
*WMCreateButton(WMWidget
*parent
, WMButtonType type
);
908 WMButton
*WMCreateCustomButton(WMWidget
*parent
, int behaviourMask
);
910 void WMSetButtonImageDefault(WMButton
*bPtr
);
912 void WMSetButtonImage(WMButton
*bPtr
, WMPixmap
*image
);
914 void WMSetButtonAltImage(WMButton
*bPtr
, WMPixmap
*image
);
916 void WMSetButtonImagePosition(WMButton
*bPtr
, WMImagePosition position
);
918 void WMSetButtonFont(WMButton
*bPtr
, WMFont
*font
);
920 void WMSetButtonTextAlignment(WMButton
*bPtr
, WMAlignment alignment
);
922 void WMSetButtonText(WMButton
*bPtr
, char *text
);
924 void WMSetButtonAltText(WMButton
*bPtr
, char *text
);
926 void WMSetButtonTextColor(WMButton
*bPtr
, WMColor
*color
);
928 void WMSetButtonAltTextColor(WMButton
*bPtr
, WMColor
*color
);
930 void WMSetButtonDisabledTextColor(WMButton
*bPtr
, WMColor
*color
);
932 void WMSetButtonSelected(WMButton
*bPtr
, int isSelected
);
934 int WMGetButtonSelected(WMButton
*bPtr
);
936 void WMSetButtonBordered(WMButton
*bPtr
, int isBordered
);
938 void WMSetButtonEnabled(WMButton
*bPtr
, Bool flag
);
940 void WMSetButtonImageDimsWhenDisabled(WMButton
*bPtr
, Bool flag
);
942 void WMSetButtonTag(WMButton
*bPtr
, int tag
);
944 void WMGroupButtons(WMButton
*bPtr
, WMButton
*newMember
);
946 void WMPerformButtonClick(WMButton
*bPtr
);
948 void WMSetButtonContinuous(WMButton
*bPtr
, Bool flag
);
950 void WMSetButtonPeriodicDelay(WMButton
*bPtr
, float delay
, float interval
);
952 /* ....................................................................... */
954 WMLabel
*WMCreateLabel(WMWidget
*parent
);
956 void WMSetLabelWraps(WMLabel
*lPtr
, Bool flag
);
958 void WMSetLabelImage(WMLabel
*lPtr
, WMPixmap
*image
);
960 WMPixmap
*WMGetLabelImage(WMLabel
*lPtr
);
962 void WMSetLabelImagePosition(WMLabel
*lPtr
, WMImagePosition position
);
964 void WMSetLabelTextAlignment(WMLabel
*lPtr
, WMAlignment alignment
);
966 void WMSetLabelRelief(WMLabel
*lPtr
, WMReliefType relief
);
968 void WMSetLabelText(WMLabel
*lPtr
, char *text
);
970 void WMSetLabelFont(WMLabel
*lPtr
, WMFont
*font
);
972 void WMSetLabelTextColor(WMLabel
*lPtr
, WMColor
*color
);
974 /* ....................................................................... */
976 WMFrame
*WMCreateFrame(WMWidget
*parent
);
978 void WMSetFrameTitlePosition(WMFrame
*fPtr
, WMTitlePosition position
);
980 void WMSetFrameRelief(WMFrame
*fPtr
, WMReliefType relief
);
982 void WMSetFrameTitle(WMFrame
*fPtr
, char *title
);
984 /* ....................................................................... */
986 WMTextField
*WMCreateTextField(WMWidget
*parent
);
988 void WMInsertTextFieldText(WMTextField
*tPtr
, char *text
, int position
);
990 void WMDeleteTextFieldRange(WMTextField
*tPtr
, WMRange range
);
992 /* you can free the returned string */
993 char *WMGetTextFieldText(WMTextField
*tPtr
);
995 void WMSetTextFieldText(WMTextField
*tPtr
, char *text
);
997 void WMSetTextFieldAlignment(WMTextField
*tPtr
, WMAlignment alignment
);
999 void WMSetTextFieldFont(WMTextField
*tPtr
, WMFont
*font
);
1001 WMFont
*WMGetTextFieldFont(WMTextField
*tPtr
);
1003 void WMSetTextFieldBordered(WMTextField
*tPtr
, Bool bordered
);
1005 void WMSetTextFieldBeveled(WMTextField
*tPtr
, Bool flag
);
1007 Bool
WMGetTextFieldEditable(WMTextField
*tPtr
);
1009 void WMSetTextFieldEditable(WMTextField
*tPtr
, Bool flag
);
1011 void WMSetTextFieldSecure(WMTextField
*tPtr
, Bool flag
);
1013 void WMSelectTextFieldRange(WMTextField
*tPtr
, WMRange range
);
1015 void WMSetTextFieldCursorPosition(WMTextField
*tPtr
, unsigned int position
);
1017 void WMSetTextFieldNextTextField(WMTextField
*tPtr
, WMTextField
*next
);
1019 void WMSetTextFieldPrevTextField(WMTextField
*tPtr
, WMTextField
*prev
);
1021 void WMSetTextFieldDelegate(WMTextField
*tPtr
, WMTextFieldDelegate
*delegate
);
1024 extern char *WMTextDidChangeNotification
;
1025 extern char *WMTextDidBeginEditingNotification
;
1026 extern char *WMTextDidEndEditingNotification
;
1028 /* ....................................................................... */
1030 WMScroller
*WMCreateScroller(WMWidget
*parent
);
1032 void WMSetScrollerParameters(WMScroller
*sPtr
, float floatValue
,
1033 float knobProportion
);
1035 float WMGetScrollerKnobProportion(WMScroller
*sPtr
);
1037 float WMGetScrollerValue(WMScroller
*sPtr
);
1039 WMScrollerPart
WMGetScrollerHitPart(WMScroller
*sPtr
);
1041 void WMSetScrollerAction(WMScroller
*sPtr
, WMAction
*action
, void *clientData
);
1043 void WMSetScrollerArrowsPosition(WMScroller
*sPtr
,
1044 WMScrollArrowPosition position
);
1046 /* ....................................................................... */
1048 WMList
*WMCreateList(WMWidget
*parent
);
1050 #define WMAddListItem(lPtr, text) WMInsertListItem((lPtr), -1, (text))
1052 WMListItem
*WMInsertListItem(WMList
*lPtr
, int row
, char *text
);
1054 void WMSortListItems(WMList
*lPtr
);
1056 void WMSortListItemsWithComparer(WMList
*lPtr
,
1057 int (f
)(const void*, const void*));
1059 int WMFindRowOfListItemWithTitle(WMList
*lPtr
, char *title
);
1061 WMListItem
*WMGetListItem(WMList
*lPtr
, int row
);
1063 WMBag
*WMGetListItems(WMList
*lPtr
);
1066 void WMRemoveListItem(WMList
*lPtr
, int row
);
1068 void WMSelectListItem(WMList
*lPtr
, int row
);
1070 void WMSetListUserDrawProc(WMList
*lPtr
, WMListDrawProc
*proc
);
1072 void WMSetListUserDrawItemHeight(WMList
*lPtr
, unsigned short height
);
1074 int WMGetListItemHeight(WMList
*lPtr
);
1076 /* don't free the returned data */
1077 WMListItem
*WMGetListSelectedItem(WMList
*lPtr
);
1079 int WMGetListSelectedItemRow(WMList
*lPtr
);
1081 void WMSetListAction(WMList
*lPtr
, WMAction
*action
, void *clientData
);
1083 void WMSetListDoubleAction(WMList
*lPtr
, WMAction
*action
, void *clientData
);
1085 void WMClearList(WMList
*lPtr
);
1087 int WMGetListNumberOfRows(WMList
*lPtr
);
1089 void WMSetListPosition(WMList
*lPtr
, int row
);
1091 void WMSetListBottomPosition(WMList
*lPtr
, int row
);
1093 int WMGetListPosition(WMList
*lPtr
);
1095 extern char *WMListDidScrollNotification
;
1096 extern char *WMListSelectionDidChangeNotification
;
1098 /* ....................................................................... */
1100 WMBrowser
*WMCreateBrowser(WMWidget
*parent
);
1102 void WMSetBrowserPathSeparator(WMBrowser
*bPtr
, char *separator
);
1104 void WMSetBrowserTitled(WMBrowser
*bPtr
, Bool flag
);
1106 void WMLoadBrowserColumnZero(WMBrowser
*bPtr
);
1108 int WMAddBrowserColumn(WMBrowser
*bPtr
);
1110 void WMRemoveBrowserItem(WMBrowser
*bPtr
, int column
, int row
);
1112 void WMSetBrowserMaxVisibleColumns(WMBrowser
*bPtr
, int columns
);
1114 void WMSetBrowserColumnTitle(WMBrowser
*bPtr
, int column
, char *title
);
1116 WMListItem
*WMInsertBrowserItem(WMBrowser
*bPtr
, int column
, int row
, char *text
, Bool isBranch
);
1118 void WMSortBrowserColumn(WMBrowser
*bPtr
, int column
);
1120 void WMSortBrowserColumnWithComparer(WMBrowser
*bPtr
, int column
,
1121 int (f
)(const void*, const void*));
1123 /* Don't free the returned string. */
1124 char* WMSetBrowserPath(WMBrowser
*bPtr
, char *path
);
1126 /* you can free the returned string */
1127 char *WMGetBrowserPath(WMBrowser
*bPtr
);
1128 /* you can free the returned string */
1129 char *WMGetBrowserPathToColumn(WMBrowser
*bPtr
, int column
);
1131 void WMSetBrowserAction(WMBrowser
*bPtr
, WMAction
*action
, void *clientData
);
1133 void WMSetBrowserDoubleAction(WMBrowser
*bPtr
, WMAction
*action
,
1136 WMListItem
*WMGetBrowserSelectedItemInColumn(WMBrowser
*bPtr
, int column
);
1138 int WMGetBrowserFirstVisibleColumn(WMBrowser
*bPtr
);
1140 int WMGetBrowserSelectedColumn(WMBrowser
*bPtr
);
1142 int WMGetBrowserSelectedRowInColumn(WMBrowser
*bPtr
, int column
);
1144 int WMGetBrowserNumberOfColumns(WMBrowser
*bPtr
);
1146 int WMGetBrowserMaxVisibleColumns(WMBrowser
*bPtr
);
1148 WMList
*WMGetBrowserListInColumn(WMBrowser
*bPtr
, int column
);
1150 void WMSetBrowserDelegate(WMBrowser
*bPtr
, WMBrowserDelegate
*delegate
);
1152 /* ....................................................................... */
1155 Bool
WMMenuItemIsSeparator(WMMenuItem
*item
);
1157 WMMenuItem
*WMCreateMenuItem(void);
1159 void WMDestroyMenuItem(WMMenuItem
*item
);
1161 Bool
WMGetMenuItemEnabled(WMMenuItem
*item
);
1163 void WMSetMenuItemEnabled(WMMenuItem
*item
, Bool flag
);
1165 char *WMGetMenuItemShortcut(WMMenuItem
*item
);
1167 unsigned WMGetMenuItemShortcutModifierMask(WMMenuItem
*item
);
1169 void WMSetMenuItemShortcut(WMMenuItem
*item
, char *shortcut
);
1171 void WMSetMenuItemShortcutModifierMask(WMMenuItem
*item
, unsigned mask
);
1173 void *WMGetMenuItemRepresentedObject(WMMenuItem
*item
);
1175 void WMSetMenuItemRepresentedObject(WMMenuItem
*item
, void *object
);
1177 void WMSetMenuItemAction(WMMenuItem
*item
, WMAction
*action
, void *data
);
1179 WMAction
*WMGetMenuItemAction(WMMenuItem
*item
);
1181 void *WMGetMenuItemData(WMMenuItem
*item
);
1183 void WMSetMenuItemTitle(WMMenuItem
*item
, char *title
);
1185 char *WMGetMenuItemTitle(WMMenuItem
*item
);
1187 void WMSetMenuItemState(WMMenuItem
*item
, int state
);
1189 int WMGetMenuItemState(WMMenuItem
*item
);
1191 void WMSetMenuItemPixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1193 WMPixmap
*WMGetMenuItemPixmap(WMMenuItem
*item
);
1195 void WMSetMenuItemOnStatePixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1197 WMPixmap
*WMGetMenuItemOnStatePixmap(WMMenuItem
*item
);
1199 void WMSetMenuItemOffStatePixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1201 WMPixmap
*WMGetMenuItemOffStatePixmap(WMMenuItem
*item
);
1203 void WMSetMenuItemMixedStatePixmap(WMMenuItem
*item
, WMPixmap
*pixmap
);
1205 WMPixmap
*WMGetMenuItemMixedStatePixmap(WMMenuItem
*item
);
1207 /*void WMSetMenuItemSubmenu(WMMenuItem *item, WMMenu *submenu);
1210 WMMenu *WMGetMenuItemSubmenu(WMMenuItem *item);
1212 Bool WMGetMenuItemHasSubmenu(WMMenuItem *item);
1215 /* ....................................................................... */
1217 WMPopUpButton
*WMCreatePopUpButton(WMWidget
*parent
);
1219 void WMSetPopUpButtonAction(WMPopUpButton
*sPtr
, WMAction
*action
,
1222 void WMSetPopUpButtonPullsDown(WMPopUpButton
*bPtr
, Bool flag
);
1224 WMMenuItem
*WMAddPopUpButtonItem(WMPopUpButton
*bPtr
, char *title
);
1226 WMMenuItem
*WMInsertPopUpButtonItem(WMPopUpButton
*bPtr
, int index
,
1229 void WMRemovePopUpButtonItem(WMPopUpButton
*bPtr
, int index
);
1231 void WMSetPopUpButtonItemEnabled(WMPopUpButton
*bPtr
, int index
, Bool flag
);
1233 Bool
WMGetPopUpButtonItemEnabled(WMPopUpButton
*bPtr
, int index
);
1235 void WMSetPopUpButtonSelectedItem(WMPopUpButton
*bPtr
, int index
);
1237 int WMGetPopUpButtonSelectedItem(WMPopUpButton
*bPtr
);
1239 void WMSetPopUpButtonText(WMPopUpButton
*bPtr
, char *text
);
1241 /* don't free the returned data */
1242 char *WMGetPopUpButtonItem(WMPopUpButton
*bPtr
, int index
);
1244 WMMenuItem
*WMGetPopUpButtonMenuItem(WMPopUpButton
*bPtr
, int index
);
1247 int WMGetPopUpButtonNumberOfItems(WMPopUpButton
*bPtr
);
1249 void WMSetPopUpButtonEnabled(WMPopUpButton
*bPtr
, Bool flag
);
1251 Bool
WMGetPopUpButtonEnabled(WMPopUpButton
*bPtr
);
1253 /* ....................................................................... */
1255 WMProgressIndicator
*WMCreateProgressIndicator(WMWidget
*parent
);
1257 void WMSetProgressIndicatorMinValue(WMProgressIndicator
*progressindicator
, int value
);
1259 void WMSetProgressIndicatorMaxValue(WMProgressIndicator
*progressindicator
, int value
);
1261 void WMSetProgressIndicatorValue(WMProgressIndicator
*progressindicator
, int value
);
1263 int WMGetProgressIndicatorMinValue(WMProgressIndicator
*progressindicator
);
1265 int WMGetProgressIndicatorMaxValue(WMProgressIndicator
*progressindicator
);
1267 int WMGetProgressIndicatorValue(WMProgressIndicator
*progressindicator
);
1270 /* ....................................................................... */
1272 WMColorPanel
*WMGetColorPanel(WMScreen
*scrPtr
);
1274 void WMFreeColorPanel(WMColorPanel
*panel
);
1276 void WMShowColorPanel(WMColorPanel
*panel
);
1278 void WMCloseColorPanel(WMColorPanel
*panel
);
1280 void WMSetColorPanelColor(WMColorPanel
*panel
, WMColor
*color
);
1282 WMColor
*WMGetColorPanelColor(WMColorPanel
*panel
);
1284 void WMSetColorPanelPickerMode(WMColorPanel
*panel
, WMColorPanelMode mode
);
1286 void WMSetColorPanelAction(WMColorPanel
*panel
, WMAction2
*action
, void *data
);
1288 extern char *WMColorPanelColorChangedNotification
;
1290 /* ....................................................................... */
1292 WMColorWell
*WMCreateColorWell(WMWidget
*parent
);
1294 void WMSetColorWellColor(WMColorWell
*cPtr
, WMColor
*color
);
1296 WMColor
*WMGetColorWellColor(WMColorWell
*cPtr
);
1298 void WSetColorWellBordered(WMColorWell
*cPtr
, Bool flag
);
1301 extern char *WMColorWellDidChangeNotification
;
1304 /* ...................................................................... */
1306 WMScrollView
*WMCreateScrollView(WMWidget
*parent
);
1308 void WMResizeScrollViewContent(WMScrollView
*sPtr
, unsigned int width
,
1309 unsigned int height
);
1311 void WMSetScrollViewHasHorizontalScroller(WMScrollView
*sPtr
, Bool flag
);
1313 void WMSetScrollViewHasVerticalScroller(WMScrollView
*sPtr
, Bool flag
);
1315 void WMSetScrollViewContentView(WMScrollView
*sPtr
, WMView
*view
);
1317 void WMSetScrollViewRelief(WMScrollView
*sPtr
, WMReliefType type
);
1319 void WMSetScrollViewContentView(WMScrollView
*sPtr
, WMView
*view
);
1321 WMScroller
*WMGetScrollViewHorizontalScroller(WMScrollView
*sPtr
);
1323 WMScroller
*WMGetScrollViewVerticalScroller(WMScrollView
*sPtr
);
1325 void WMSetScrollViewLineScroll(WMScrollView
*sPtr
, int amount
);
1327 void WMSetScrollViewPageScroll(WMScrollView
*sPtr
, int amount
);
1329 /* ....................................................................... */
1331 WMSlider
*WMCreateSlider(WMWidget
*parent
);
1333 int WMGetSliderMinValue(WMSlider
*slider
);
1335 int WMGetSliderMaxValue(WMSlider
*slider
);
1337 int WMGetSliderValue(WMSlider
*slider
);
1339 void WMSetSliderMinValue(WMSlider
*slider
, int value
);
1341 void WMSetSliderMaxValue(WMSlider
*slider
, int value
);
1343 void WMSetSliderValue(WMSlider
*slider
, int value
);
1345 void WMSetSliderContinuous(WMSlider
*slider
, Bool flag
);
1347 void WMSetSliderAction(WMSlider
*slider
, WMAction
*action
, void *data
);
1349 void WMSetSliderKnobThickness(WMSlider
*sPtr
, int thickness
);
1351 void WMSetSliderImage(WMSlider
*sPtr
, WMPixmap
*pixmap
);
1353 /* ....................................................................... */
1356 WMSplitView
*WMCreateSplitView(WMWidget
*parent
);
1357 Bool
WMGetSplitViewVertical(WMSplitView
*sPtr
);
1358 void WMSetSplitViewVertical(WMSplitView
*sPtr
, Bool flag
);
1360 int WMGetSplitViewSubviewsCount(WMSplitView
*sPtr
); /* ??? remove ??? */
1362 WMView
*WMGetSplitViewSubviewAt(WMSplitView
*sPtr
, int index
);
1364 /* remove the first subview == view */
1365 void WMRemoveSplitViewSubview(WMSplitView
*sPtr
, WMView
*view
);
1367 void WMRemoveSplitViewSubviewAt(WMSplitView
*sPtr
, int index
);
1370 void WMAddSplitViewSubview(WMSplitView
*sPtr
, WMView
*subview
);
1372 void WMAdjustSplitViewSubviews(WMSplitView
*sPtr
);
1374 void WMSetSplitViewConstrainProc(WMSplitView
*sPtr
,
1375 WMSplitViewConstrainProc
*proc
);
1378 void WMSetSplitViewResizeSubviewsProc(WMSplitView *sPtr,
1379 WMSplitViewResizeSubviewsProc *proc);
1382 int WMGetSplitViewDividerThickness(WMSplitView
*sPtr
);
1384 /* ...................................................................... */
1387 WMRuler
*WMCreateRuler(WMWidget
*parent
);
1389 void WMShowRulerTabs(WMRuler
*rPtr
, Bool Show
);
1391 int WMGetRulerMargin(WMRuler
*rPtr
, int which
);
1393 int WMGetReleasedRulerMargin(WMRuler
*rPtr
);
1395 int WMGetGrabbedRulerMargin(WMRuler
*rPtr
);
1397 int WMGetRulerOffset(WMRuler
*rPtr
);
1399 void WMSetRulerOffset(WMRuler
*rPtr
, int pixels
);
1401 void WMSetRulerMargin(WMRuler
*rPtr
, int which
, int pixels
);
1403 void WMSetRulerAction(WMRuler
*rPtr
, WMAction
*action
, void *clientData
);
1405 void WMSetRulerMoveAction(WMRuler
*rPtr
, WMAction
*action
, void *clientData
);
1408 /* ....................................................................... */
1410 WMText
*WMCreateText(WMWidget
*parent
);
1412 int WMGetTextParagraphs(WMText
*tPtr
);
1413 int WMGetTextCurrentParagraph(WMText
*tPtr
);
1414 void WMSetTextCurrentParagraph(WMText
*tPtr
, int current
);
1415 void WMRemoveTextParagraph(WMText
*tPtr
, int which
);
1417 int WMGetTextChunks(WMText
*tPtr
);
1418 int WMGetTextCurrentChunk(WMText
*tPtr
);
1419 void WMRemoveTextChunk(WMText
*tPtr
, int which
);
1420 void WMSetTextCurrentChunk(WMText
*tPtr
, int current
);
1422 void W_InsertText(WMText
*tPtr
, void *data
, int position
);/* position = -1||0*/
1423 #define WMAppendTextStream(t, d) W_InsertText(t, d, -1)
1424 #define WMPrependTextStream(t, d) W_InsertText(t, d, 0)
1427 void WMSetTextParser(WMText
*tPtr
, WMParseAction
*parser
);
1428 WMParserActions
WMGetTextParserActions(WMText
*tPtr
);
1431 WDPCreateParagraph
=0,
1432 WDPInsertParagraph
=1,
1437 void WMDoTextParse(WMText
*tPtr
, short action
);
1440 char * WMGetTextAll(WMText
*tPtr
);
1441 void WMSetTextWriter(WMText
*tPtr
, WMParseAction
*writer
);
1443 void WMSetTextHasHorizontalScroller(WMText
*tPtr
, Bool flag
);
1444 void WMSetTextHasVerticalScroller(WMText
*tPtr
, Bool flag
);
1446 void WMRefreshText(WMText
*tPtr
, int vpos
, int hpos
);
1447 void WMFreezeText(WMText
*tPtr
);
1448 void WMThawText(WMText
*tPtr
);
1450 void WMSetTextMonoFont(WMText
*tPtr
, Bool mono
);
1451 Bool
WMGetTextMonoFont(WMText
*tPtr
);
1452 void WMSetTextEditable(WMText
*tPtr
, Bool editable
);
1453 Bool
WMGetTextEditable(WMText
*tPtr
);
1454 void WMForceTextFocus(WMText
*tPtr
);
1456 void WMSetTextAlignment(WMText
*tPtr
, WMAlignment alignment
);
1457 void WMIgnoreTextNewline(WMText
*tPtr
, Bool ignore
);
1460 Bool
WMScrollText(WMText
*tPtr
, int amount
);
1461 Bool
WMPageText(WMText
*tPtr
, Bool scrollUp
);
1464 void WMShowTextRuler(WMText
*tPtr
, Bool show
);
1465 Bool
WMGetTextRulerShown(WMText
*tPtr
);
1466 void WMShowTextRulerTabs(WMText
*tPtr
, Bool show
);
1467 void WMSetTextRulerMargin(WMText
*tPtr
, char which
, short pixels
);
1468 short WMGetTextRulerMargin(WMText
*tPtr
, char which
);
1470 void WMSetTextUseFixedPitchFont(WMText
*tPtr
, Bool fixed
);
1471 void WMSetTextDefaultColor(WMText
*tPtr
, WMColor
*color
);
1472 void WMSetTextDefaultFont(WMText
*tPtr
, WMFont
*font
);
1473 void WMSetTextDefaultAlignment(WMText
*tPtr
, WMAlignment alignment
);
1474 void WMSetTextBackgroundColor(WMText
*tPtr
, WMColor
*color
);
1478 /* ....................................................................... */
1481 WMTabView
*WMCreateTabView(WMWidget
*parent
);
1483 void WMSetTabViewFont(WMTabView
*tPtr
, WMFont
*font
);
1485 void WMAddItemInTabView(WMTabView
*tPtr
, WMTabViewItem
*item
);
1487 void WMInsertItemInTabView(WMTabView
*tPtr
, int index
, WMTabViewItem
*item
);
1489 void WMRemoveTabViewItem(WMTabView
*tPtr
, WMTabViewItem
*item
);
1491 WMTabViewItem
*WMTabViewItemAtPoint(WMTabView
*tPtr
, int x
, int y
);
1493 void WMSelectFirstTabViewItem(WMTabView
*tPtr
);
1495 void WMSelectLastTabViewItem(WMTabView
*tPtr
);
1497 void WMSelectNextTabViewItem(WMTabView
*tPtr
);
1499 void WMSelectPreviousTabViewItem(WMTabView
*tPtr
);
1501 WMTabViewItem
*WMGetSelectedTabViewItem(WMTabView
*tPtr
);
1503 void WMSelectTabViewItem(WMTabView
*tPtr
, WMTabViewItem
*item
);
1505 void WMSelectTabViewItemAtIndex(WMTabView
*tPtr
, int index
);
1507 void WMSetTabViewDelegate(WMTabView
*tPtr
, WMTabViewDelegate
*delegate
);
1510 WMTabViewItem
*WMCreateTabViewItemWithIdentifier(int identifier
);
1512 int WMGetTabViewItemIdentifier(WMTabViewItem
*item
);
1514 void WMSetTabViewItemLabel(WMTabViewItem
*item
, char *label
);
1516 char *WMGetTabViewItemLabel(WMTabViewItem
*item
);
1518 void WMSetTabViewItemView(WMTabViewItem
*item
, WMView
*view
);
1520 WMView
*WMGetTabViewItemView(WMTabViewItem
*item
);
1522 void WMDestroyTabViewItem(WMTabViewItem
*item
);
1524 /* ....................................................................... */
1526 int WMRunAlertPanel(WMScreen
*app
, WMWindow
*owner
, char *title
, char *msg
,
1527 char *defaultButton
, char *alternateButton
,
1530 /* you can free the returned string */
1531 char *WMRunInputPanel(WMScreen
*app
, WMWindow
*owner
, char *title
, char *msg
,
1532 char *defaultText
, char *okButton
, char *cancelButton
);
1534 WMAlertPanel
*WMCreateAlertPanel(WMScreen
*app
, WMWindow
*owner
, char *title
,
1535 char *msg
, char *defaultButton
,
1536 char *alternateButton
, char *otherButton
);
1538 WMInputPanel
*WMCreateInputPanel(WMScreen
*app
, WMWindow
*owner
, char *title
,
1539 char *msg
, char *defaultText
, char *okButton
,
1540 char *cancelButton
);
1542 void WMDestroyAlertPanel(WMAlertPanel
*panel
);
1544 void WMDestroyInputPanel(WMInputPanel
*panel
);
1546 /* ....................................................................... */
1548 /* only 1 instance per WMScreen */
1549 WMOpenPanel
*WMGetOpenPanel(WMScreen
*scrPtr
);
1551 WMSavePanel
*WMGetSavePanel(WMScreen
*scrPtr
);
1553 void WMSetFilePanelCanChooseDirectories(WMFilePanel
*panel
, Bool flag
);
1555 void WMSetFilePanelCanChooseFiles(WMFilePanel
*panel
, Bool flag
);
1557 void WMSetFilePanelAutoCompletion(WMFilePanel
*panel
, Bool flag
);
1559 void WMSetFilePanelDirectory(WMFilePanel
*panel
, char *path
);
1561 /* you can free the returned string */
1562 char *WMGetFilePanelFileName(WMFilePanel
*panel
);
1564 void WMFreeFilePanel(WMFilePanel
*panel
);
1566 int WMRunModalFilePanelForDirectory(WMFilePanel
*panel
, WMWindow
*owner
,
1567 char *path
, char *name
, char **fileTypes
);
1569 void WMSetFilePanelAccessoryView(WMFilePanel
*panel
, WMView
*view
);
1571 WMView
*WMGetFilePanelAccessoryView(WMFilePanel
*panel
);
1574 /* ...................................................................... */
1576 /* only 1 instance per WMScreen */
1577 WMFontPanel
*WMGetFontPanel(WMScreen
*scr
);
1579 void WMShowFontPanel(WMFontPanel
*panel
);
1581 void WMHideFontPanel(WMFontPanel
*panel
);
1583 void WMSetFontPanelFont(WMFontPanel
*panel
, WMFont
*font
);
1585 /* you can free the returned string */
1586 char *WMGetFontPanelFontName(WMFontPanel
*panel
);
1588 WMFont
*WMGetFontPanelFont(WMFontPanel
*panel
);
1592 #endif /* __cplusplus */