| 1 | #cxx . . $ `<file>/sys/Gui.h`/ifndef _Gui_h_ |
| 2 | #define _Gui_h_cxx . . $ `sys/Gui.h:2:9`! |
| 3 | /* Gui.h |
| 4 | * |
| 5 | * Copyright (C) 1993-2026 Paul Boersma, 2013 Tom Naughton |
| 6 | * |
| 7 | * This code is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 3 of the License, or (at |
| 10 | * your option) any later version. |
| 11 | * |
| 12 | * This code is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 15 | * See the GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | /* |
| 22 | Determine the widget set, honouring the compiler switch NO_GUI |
| 23 | and/or the compiler switch NO_GRAPHICS, which entails NO_GUI. |
| 24 | */ |
| 25 | #if defined (NO_GRAPHICS) && ! defined (NO_GUI) |
| 26 | #define NO_GUI |
| 27 | #endif |
| 28 | #if defined (NO_GUI) |
| 29 | #define gtk 0 |
| 30 | #define motif 0 |
| 31 | #define cocoa 0 |
| 32 | #elif defined (UNIXcxx . . $ `<built-in>:479:9`!) |
| 33 | #define gtkcxx . . $ `sys/Gui.h:33:10`! 1 |
| 34 | #define motifcxx . . $ `sys/Gui.h:34:10`! 0 |
| 35 | #define cocoacxx . . $ `sys/Gui.h:35:10`! 0 |
| 36 | #elif defined (_WIN32) |
| 37 | #define gtk 0 |
| 38 | #define motif 1 |
| 39 | #define cocoa 0 |
| 40 | #elif defined (macintosh) |
| 41 | #define gtk 0 |
| 42 | #define motif 0 |
| 43 | #define cocoa 1 |
| 44 | #else |
| 45 | /* |
| 46 | Unknown platforms have no GUI. |
| 47 | */ |
| 48 | #define gtk 0 |
| 49 | #define motif 0 |
| 50 | #define cocoa 0 |
| 51 | #endif |
| 52 | |
| 53 | constexpr bool theCommandKeyIsToTheLeftOfTheOptionKeycxx . . $ theCommandKeyIsToTheLeftOfTheOptionKey. = |
| 54 | #if defined (macintosh) |
| 55 | false; |
| 56 | #else |
| 57 | true; |
| 58 | #endif |
| 59 | |
| 60 | #include "Collection.h"cxx . . $ `<file>/sys/Collection.h`/ |
| 61 | |
| 62 | #if defined (UNIXcxx . . $ `<built-in>:479:9`!) |
| 63 | #if gtkcxx . . $ `sys/Gui.h:33:10`! |
| 64 | #include <gtk/gtk.h> |
| 65 | #include <gdk/gdk.h> |
| 66 | #endif |
| 67 | #if ! defined (NO_GRAPHICS) |
| 68 | #include <cairo/cairo.h> |
| 69 | #include <pango/pango.h> |
| 70 | #include <pango/pangocairo.h> |
| 71 | #endif |
| 72 | #elif defined (macintosh) |
| 73 | #include "macport_on.h" |
| 74 | #include <Cocoa/Cocoa.h> |
| 75 | #include "macport_off.h" |
| 76 | #elif defined (_WIN32) |
| 77 | #include "winport_on.h" |
| 78 | #include <windows.h> |
| 79 | #include <windowsx.h> |
| 80 | #include "winport_off.h" |
| 81 | #endif |
| 82 | |
| 83 | #include "machine.h"cxx . . $ `<file>/sys/machine.h`/ |
| 84 | |
| 85 | #define Gui_LEFT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:85:9`! 20 |
| 86 | #define Gui_RIGHT_DIALOG_SPACINGcxx . . $ `sys/Gui.h:86:9`! 20 |
| 87 | #if defined (chrome) |
| 88 | #define Gui_TOP_DIALOG_SPACING 34 |
| 89 | #else |
| 90 | #define Gui_TOP_DIALOG_SPACINGcxx . . $ `sys/Gui.h:90:10`! 14 |
| 91 | #endif |
| 92 | #define Gui_BOTTOM_DIALOG_SPACINGcxx . . $ `sys/Gui.h:92:9`! 20 |
| 93 | #define Gui_HORIZONTAL_DIALOG_SPACINGcxx . . $ `sys/Gui.h:93:9`! 12 |
| 94 | #define Gui_VERTICAL_DIALOG_SPACING_SAMEcxx . . $ `sys/Gui.h:94:9`! 12 |
| 95 | #define Gui_VERTICAL_DIALOG_SPACING_DIFFERENTcxx . . $ `sys/Gui.h:95:9`! 20 |
| 96 | #define Gui_TEXTFIELD_HEIGHTcxx . . $ `sys/Gui.h:96:9`! Machine_getTextHeight () |
| 97 | #define Gui_LABEL_HEIGHTcxx . . $ `sys/Gui.h:97:9`! 16 |
| 98 | #define Gui_RADIOBUTTON_HEIGHTcxx . . $ `sys/Gui.h:98:9`! 18 |
| 99 | #define Gui_RADIOBUTTON_SPACINGcxx . . $ `sys/Gui.h:99:9`! 8 |
| 100 | #define Gui_CHECKBUTTON_HEIGHTcxx . . $ `sys/Gui.h:100:9`! 20 |
| 101 | #define Gui_LABEL_SPACINGcxx . . $ `sys/Gui.h:101:9`! 8 |
| 102 | #define Gui_OPTIONMENU_HEIGHTcxx . . $ `sys/Gui.h:102:9`! 20 |
| 103 | #define Gui_PUSHBUTTON_HEIGHTcxx . . $ `sys/Gui.h:103:9`! Machine_getButtonHeight () |
| 104 | #define Gui_OK_BUTTON_WIDTHcxx . . $ `sys/Gui.h:104:9`! 69 |
| 105 | #define Gui_CANCEL_BUTTON_WIDTHcxx . . $ `sys/Gui.h:105:9`! 69 |
| 106 | #define Gui_APPLY_BUTTON_WIDTHcxx . . $ `sys/Gui.h:106:9`! 69 |
| 107 | |
| 108 | #define Gui_HOMOGENEOUScxx . . $ `sys/Gui.h:108:9`! 1 |
| 109 | |
| 110 | #if gtkcxx . . $ `sys/Gui.h:33:10`! |
| 111 | typedef void *GuiObjectcxx . . $ GuiObject#; |
| 112 | #elif cocoa |
| 113 | Thing_declare (GuiThing); |
| 114 | @protocol GuiCocoaAny |
| 115 | - (GuiThing) getUserData; |
| 116 | - (void) setUserData: (GuiThing) userData; |
| 117 | @end |
| 118 | typedef NSObject <GuiCocoaAny> *GuiObject; |
| 119 | @interface GuiCocoaApplication : NSApplication @end |
| 120 | @interface GuiCocoaButton : NSButton <GuiCocoaAny> @end |
| 121 | @interface GuiCocoaCheckButton : NSButton <GuiCocoaAny> @end |
| 122 | @interface GuiCocoaDrawingArea : NSView <GuiCocoaAny> @end |
| 123 | @interface GuiCocoaLabel : NSTextField <GuiCocoaAny> @end |
| 124 | @interface GuiCocoaList : NSView <GuiCocoaAny, NSTableViewDataSource, NSTableViewDelegate> @end |
| 125 | @interface GuiCocoaMenu : NSMenu <GuiCocoaAny> @end |
| 126 | @interface GuiCocoaMenuButton : NSPopUpButton <GuiCocoaAny> @end |
| 127 | @interface GuiCocoaMenuItem : NSMenuItem <GuiCocoaAny> @end |
| 128 | @interface GuiCocoaOptionMenu : NSPopUpButton <GuiCocoaAny> @end |
| 129 | @interface GuiCocoaProgressBar : NSProgressIndicator <GuiCocoaAny> @end |
| 130 | @interface GuiCocoaRadioButton : NSButton <GuiCocoaAny> @end |
| 131 | @interface GuiCocoaScale : NSProgressIndicator <GuiCocoaAny> @end |
| 132 | @interface GuiCocoaScrollBar : NSScroller <GuiCocoaAny> |
| 133 | - (void) scrollBy: (double) step; |
| 134 | - (void) magnifyBy: (double) step; |
| 135 | @end |
| 136 | @interface GuiCocoaScrolledWindow : NSScrollView <GuiCocoaAny> @end |
| 137 | @interface GuiCocoaShell : NSWindow <GuiCocoaAny> |
| 138 | - (void) setDistinctiveBackGround; // slightly darker than Tahoe's background, in order to still see text widgets |
| 139 | @end |
| 140 | @interface GuiCocoaShellDelegate : NSObject <NSWindowDelegate> |
| 141 | @end |
| 142 | @interface GuiCocoaTextField : NSTextField <GuiCocoaAny> @end |
| 143 | @interface GuiCocoaTextView : NSTextView <GuiCocoaAny, NSTextViewDelegate> @end |
| 144 | #elif motif |
| 145 | typedef class structGuiObject *GuiObject; // opaque |
| 146 | |
| 147 | /* |
| 148 | * Definitions of X11 types. |
| 149 | */ |
| 150 | typedef MSG XEvent; |
| 151 | typedef unsigned char Boolean; |
| 152 | typedef integer Cardinal; |
| 153 | typedef unsigned int Dimension; |
| 154 | typedef int Position; |
| 155 | typedef void *Window; |
| 156 | typedef char *String; |
| 157 | typedef struct Display Display; |
| 158 | /*typedef integer Time;*/ |
| 159 | typedef integer Atom; |
| 160 | typedef struct { int /* elsewhere: char* */ name; integer value; } Arg, *ArgList; |
| 161 | |
| 162 | /* |
| 163 | * Declarations of X11 functions. |
| 164 | */ |
| 165 | void XMapRaised (int displayDummy, Window window); |
| 166 | #define DefaultScreenOfDisplay(d) 0 |
| 167 | int WidthOfScreen (int screen); |
| 168 | int HeightOfScreen (int screen); |
| 169 | |
| 170 | /* |
| 171 | * Definitions of Xt types. |
| 172 | */ |
| 173 | typedef void *XtPointer; |
| 174 | typedef GuiObject *GuiObjectList; |
| 175 | typedef integer XtWorkProcId, XtIntervalId; |
| 176 | typedef void (*XtCallbackProc) (GuiObject w, XtPointer client_data, XtPointer call_data); |
| 177 | typedef bool (*XtWorkProc) (void *client_data); |
| 178 | typedef void (*XtTimerCallbackProc) (XtPointer, XtIntervalId *); |
| 179 | typedef uinteger WidgetClass; |
| 180 | #define False 0 |
| 181 | #define True 1 |
| 182 | |
| 183 | /* |
| 184 | * Declarations of Xt functions. |
| 185 | */ |
| 186 | void XtAddCallback (GuiObject w, int kind, XtCallbackProc proc, XtPointer closure); |
| 187 | XtIntervalId XtAddTimeOut (uinteger interval, |
| 188 | XtTimerCallbackProc timerProc, XtPointer closure); |
| 189 | XtWorkProcId XtAddWorkProc (XtWorkProc workProc, XtPointer closure); |
| 190 | void GuiMainLoop (); |
| 191 | void GuiNextEvent (XEvent *event); |
| 192 | #define XtCalloc Melder_calloc |
| 193 | #define XtClass(w) (w) -> widgetClass |
| 194 | void XtDestroyWidget (GuiObject w); |
| 195 | void XtDispatchEvent (XEvent *event); |
| 196 | #define XtDisplay(w) 0 |
| 197 | Boolean XtIsManaged (GuiObject w); |
| 198 | Boolean XtIsShell (GuiObject w); |
| 199 | void XtManageChild (GuiObject w); |
| 200 | void XtManageChildren (GuiObjectList children, Cardinal num_children); |
| 201 | void XtMapWidget (GuiObject w); |
| 202 | void XtNextEvent (XEvent *event); |
| 203 | void XtRemoveTimeOut (XtIntervalId id); |
| 204 | void XtRemoveWorkProc (XtWorkProcId id); |
| 205 | void XtSetKeyboardFocus (GuiObject tree, GuiObject descendant); |
| 206 | void XtSetSensitive (GuiObject w, Boolean value); |
| 207 | void XtUnmanageChild (GuiObject self); |
| 208 | void XtUnmanageChildren (GuiObjectList children, Cardinal num_children); |
| 209 | void * GuiWin_initialize1 (conststring32 name); |
| 210 | void GuiWin_initialize2 (unsigned int argc, char **argv); |
| 211 | void GuiApp_setApplicationShell (GuiObject shell); |
| 212 | GuiObject XtVaCreateWidget (const char *name, int widgetClass, GuiObject parent, ...); |
| 213 | GuiObject XtVaCreateManagedWidget (const char *name, int widgetClass, GuiObject parent, ...); |
| 214 | void XtVaGetValues (GuiObject w, ...); |
| 215 | void XtVaSetValues (GuiObject w, ...); |
| 216 | Window XtWindow (GuiObject w); |
| 217 | integer Gui_getNumberOfMotifWidgets (); |
| 218 | |
| 219 | /* |
| 220 | * Xm widget classes. |
| 221 | */ |
| 222 | #define xmBulletinBoardWidgetClass 0x0000'0001 |
| 223 | #define xmDrawingAreaWidgetClass 0x0000'0002 |
| 224 | #define xmFormWidgetClass 0x0000'0004 |
| 225 | #define xmFrameWidgetClass 0x0000'0008 |
| 226 | #define xmLabelWidgetClass 0x0000'0010 |
| 227 | #define xmListWidgetClass 0x0000'0020 |
| 228 | #define xmMenuBarWidgetClass 0x0000'0040 |
| 229 | #define xmPulldownMenuWidgetClass 0x0000'0100 |
| 230 | #define xmPushButtonWidgetClass 0x0000'0200 |
| 231 | #define xmRowColumnWidgetClass 0x0000'0400 |
| 232 | #define xmScaleWidgetClass 0x0000'0800 |
| 233 | #define xmScrollBarWidgetClass 0x0000'1000 |
| 234 | #define xmScrolledWindowWidgetClass 0x0000'2000 |
| 235 | #define xmSeparatorWidgetClass 0x0000'4000 |
| 236 | #define xmShellWidgetClass 0x0000'8000 |
| 237 | #define xmTextWidgetClass 0x0001'0000 |
| 238 | #define xmToggleButtonWidgetClass 0x0002'0000 |
| 239 | #define xmCascadeButtonWidgetClass 0x0004'0000 |
| 240 | #define xmPushButtonGadgetClass xmPushButtonWidgetClass |
| 241 | #define xmCascadeButtonGadgetClass xmCascadeButtonWidgetClass |
| 242 | #define xmSeparatorGadgetClass xmSeparatorWidgetClass |
| 243 | #define xmToggleButtonGadgetClass xmToggleButtonWidgetClass |
| 244 | |
| 245 | /* |
| 246 | * Xm resource names. |
| 247 | */ |
| 248 | enum { |
| 249 | XmNnull, |
| 250 | #define motif_RESOURCE(xxx) xxx, |
| 251 | #include "motifEmulator_resources.h" |
| 252 | #undef motif_RESOURCE |
| 253 | XmNend |
| 254 | }; |
| 255 | |
| 256 | /* |
| 257 | * Xm enumerated types. |
| 258 | * All start at 1, because we have to reserve zero for the dynamic default value. |
| 259 | * This is important for the resources set during creation. |
| 260 | */ |
| 261 | enum /* dialog styles */ { XmDIALOG_MODELESS = 1, XmDIALOG_FULL_APPLICATION_MODAL }; |
| 262 | enum /* orientation */ { XmVERTICAL = 1, XmHORIZONTAL }; |
| 263 | enum /* attachment */ { XmATTACH_NONE = 1, XmATTACH_FORM, XmATTACH_POSITION }; |
| 264 | enum /* rowColumn types */ { XmWORK_AREA = 1, XmMENU_BAR }; |
| 265 | enum /* delete responses */ { XmDESTROY = 1, XmUNMAP, XmDO_NOTHING }; |
| 266 | enum /* indicator types */ { XmONE_OF_MANY = 1, XmN_OF_MANY }; |
| 267 | |
| 268 | /* |
| 269 | * Declarations of Xm functions. |
| 270 | */ |
| 271 | void XmAddWMProtocolCallback (GuiObject shell, Atom protocol, XtCallbackProc callback, char *closure); |
| 272 | GuiObject XmCreateBulletinBoard (GuiObject, const char *, ArgList, int); |
| 273 | GuiObject XmCreateBulletinBoardDialog (GuiObject, const char *, ArgList, int); |
| 274 | GuiObject XmCreateCascadeButton (GuiObject, const char *, ArgList, int); |
| 275 | GuiObject XmCreateCascadeButtonGadget (GuiObject, const char *, ArgList, int); |
| 276 | GuiObject XmCreateDialogShell (GuiObject, const char *, ArgList, int); |
| 277 | GuiObject XmCreateForm (GuiObject, const char *, ArgList, int); |
| 278 | GuiObject XmCreateFormDialog (GuiObject, const char *, ArgList, int); |
| 279 | GuiObject XmCreateMenuBar (GuiObject, const char *, ArgList, int); |
| 280 | GuiObject XmCreatePulldownMenu (GuiObject, const char *, ArgList, int); |
| 281 | GuiObject XmCreateRadioBox (GuiObject, const char *, ArgList, int); |
| 282 | GuiObject XmCreateRowColumn (GuiObject, const char *, ArgList, int); |
| 283 | GuiObject XmCreateScale (GuiObject, const char *, ArgList, int); |
| 284 | GuiObject XmCreateScrolledWindow (GuiObject, const char *, ArgList, int); |
| 285 | GuiObject XmCreateScrollBar (GuiObject, const char *, ArgList, int); |
| 286 | GuiObject XmCreateSeparator (GuiObject, const char *, ArgList, int); |
| 287 | GuiObject XmCreateSeparatorGadget (GuiObject, const char *, ArgList, int); |
| 288 | GuiObject XmCreateShell (GuiObject, const char *, ArgList, int); |
| 289 | GuiObject XmCreateToggleButton (GuiObject, const char *, ArgList, int); |
| 290 | GuiObject XmCreateToggleButtonGadget (GuiObject, const char *, ArgList, int); |
| 291 | void XmScaleGetValue (GuiObject widget, int *value_return); |
| 292 | void XmScaleSetValue (GuiObject widget, int value); |
| 293 | void XmScrollBarGetValues (GuiObject me, int *value, int *sliderSize, int *increment, int *pageIncrement); |
| 294 | void XmScrollBarSetValues (GuiObject me, int value, int sliderSize, int increment, int pageIncrement, Boolean notify); |
| 295 | Boolean XmToggleButtonGadgetGetState (GuiObject widget); |
| 296 | #define XmToggleButtonGetState XmToggleButtonGadgetGetState |
| 297 | void XmToggleButtonGadgetSetState (GuiObject widget, Boolean value, Boolean notify); |
| 298 | #define XmToggleButtonSetState XmToggleButtonGadgetSetState |
| 299 | |
| 300 | void motif_win_setUserMessageCallback (int (*userMessageCallback) (void)); |
| 301 | |
| 302 | constexpr UINT WM_APP_WORK_PROC = WM_APP + 0x5C; // like "script" |
| 303 | struct GuiWinWorkProcWrapper_base { |
| 304 | virtual void run () = 0; |
| 305 | virtual ~GuiWinWorkProcWrapper_base () { } |
| 306 | }; |
| 307 | template <typename F> |
| 308 | struct GuiWinWorkProcWrapper_derived : GuiWinWorkProcWrapper_base { |
| 309 | F function; |
| 310 | GuiWinWorkProcWrapper_derived (F&& f): function (std::move (f)) { } |
| 311 | void run () override { |
| 312 | function (); |
| 313 | } |
| 314 | }; |
| 315 | #else |
| 316 | typedef void *GuiObject; |
| 317 | #endif |
| 318 | |
| 319 | /* |
| 320 | `Gui_addWorkProc` can post any lambda to be scheduled during an idle moment in the main event loop. |
| 321 | |
| 322 | Example of usage: |
| 323 | autostring32 clickedText = ...; |
| 324 | Gui_addWorkProc ( |
| 325 | [clickedText = std::move (clickedText)] () mutable { // transfer ownership of clickedText to the lambda |
| 326 | try { |
| 327 | autoPraatBackground background; |
| 328 | Interpreter_resume (thePauseForm_interpreterReference); |
| 329 | } catch (MelderError) { |
| 330 | if (thePauseForm_clicked == theCancelContinueButton) |
| 331 | Melder_throw (U"This happened after you cancelled the pause form."); |
| 332 | else |
| 333 | Melder_throw (U"This happened after you clicked “", clickedText.get(), U"” in the pause form."); |
| 334 | } |
| 335 | } |
| 336 | ); |
| 337 | */ |
| 338 | template <typename F> |
| 339 | static void Gui_addWorkProccxx . . $ Gui_addWorkProc(fe7a8a4d1eddb70). (F&& function) { |
| 340 | #if gtkcxx . . $ `sys/Gui.h:33:10`! |
| 341 | auto *functionOnTheHeap = new stdcxx . . $ std/::decay_t <F> (stdcxx . . $ std/::forwardcxx . . $ std/forward(f56228ea88711827). <F> (function)); |
| 342 | g_idle_add ( |
| 343 | [] (gpointer closure) -> gboolean { |
| 344 | auto *functionOnTheHeapFromClosure = static_cast <stdcxx . . $ std/::decay_t <F>*> (closure); |
| 345 | try { |
| 346 | (*functionOnTheHeapFromClosure) (); |
| 347 | } catch (MelderErrorcxx . . $ MelderError#) { |
| 348 | Melder_flushErrorcxx . . $ Melder_flushError(49f6e7a06ebc5aa8). (); // no error message should leave the event loop |
| 349 | } |
| 350 | delete functionOnTheHeapFromClosure; // called even if there was an exception |
| 351 | return G_SOURCE_REMOVEcxx . . $ `<external>/1856471541377536744/gmain.h:475:9`!; |
| 352 | }, |
| 353 | functionOnTheHeap |
| 354 | ); |
| 355 | #elif cocoa |
| 356 | auto *functionOnTheHeap = new std::decay_t <F> (std::forward <F> (function)); |
| 357 | CFRunLoopPerformBlock ( |
| 358 | CFRunLoopGetMain (), |
| 359 | kCFRunLoopCommonModes, |
| 360 | ^{ |
| 361 | try { |
| 362 | (*functionOnTheHeap) (); |
| 363 | } catch (MelderError) { |
| 364 | Melder_flushError (); // no error message should leave the event loop |
| 365 | } |
| 366 | delete functionOnTheHeap; // called even if there was an exception |
| 367 | } |
| 368 | ); |
| 369 | CFRunLoopWakeUp (CFRunLoopGetMain ()); |
| 370 | #elif motif |
| 371 | auto *functionWrapper = new GuiWinWorkProcWrapper_derived <F> (std::forward <F> (function)); |
| 372 | PostMessage (HWND (nullptr), WM_APP_WORK_PROC, 0, reinterpret_cast <LPARAM> (functionWrapper)); |
| 373 | #elif defined (NO_GUI) |
| 374 | #else |
| 375 | #error The function `Gui_addWorkProc`() is not implemented for this platform. |
| 376 | #endif |
| 377 | } |
| 378 | |
| 379 | int Gui_getResolutioncxx . . $ Gui_getResolution(dedf1e9b1c614a07). (GuiObjectcxx . . $ GuiObject# widget); |
| 380 | void Gui_getWindowPositioningBoundscxx . . $ Gui_getWindowPositioningBounds(dec26d86168e59a). (double *x, double *y, double *width, double *height); |
| 381 | |
| 382 | Thing_declarecxx . . $ GuiDrawingAreaHandle# (GuiDrawingArea); |
| 383 | Thing_declarecxx . . $ mutableGuiForm# (GuiForm); |
| 384 | Thing_declarecxx . . $ mutableGuiMenu# (GuiMenu); |
| 385 | Thing_declarecxx . . $ SomeThingHandle# (GuiScrolledWindow); |
| 386 | Thing_declarecxx . . $ mutableGuiShell# (GuiShell); |
| 387 | Thing_declarecxx . . $ GuiWindowHandle# (GuiWindow); |
| 388 | |
| 389 | Thing_definecxx . . $ classGuiThing. (GuiThing, Thing) { |
| 390 | GuiShellcxx . . $ GuiShell# d_shellcxx . . $ structGuiThing#d_shell.; |
| 391 | GuiThingcxx . . $ GuiThing# d_parentcxx . . $ structGuiThing#d_parent.; |
| 392 | GuiObjectcxx . . $ GuiObject# d_widgetcxx . . $ structGuiThing#d_widget.; |
| 393 | |
| 394 | virtual void v_showcxx . . $ structGuiThing#v_show(49f6e7a06ebc5aa8). (); |
| 395 | virtual void v_hidecxx . . $ structGuiThing#v_hide(49f6e7a06ebc5aa8). (); |
| 396 | virtual void v_setSensitivecxx . . $ structGuiThing#v_setSensitive(b45ddcbc8423892c). (bool sensitive); |
| 397 | }; |
| 398 | |
| 399 | void GuiThing_showcxx . . $ GuiThing_show(20e88c25f0ba841). (GuiThingcxx . . $ GuiThing# me); |
| 400 | void GuiThing_hidecxx . . $ GuiThing_hide(20e88c25f0ba841). (GuiThingcxx . . $ GuiThing# me); |
| 401 | void GuiThing_setSensitivecxx . . $ GuiThing_setSensitive(99178548e0926398). (GuiThingcxx . . $ GuiThing# me, bool sensitive); |
| 402 | |
| 403 | Thing_definecxx . . $ autoGuiControl# (GuiControl, GuiThing) { |
| 404 | int d_leftcxx . . $ structGuiControl#d_left., d_rightcxx . . $ structGuiControl#d_right., d_topcxx . . $ structGuiControl#d_top., d_bottomcxx . . $ structGuiControl#d_bottom.; |
| 405 | bool d_blockValueChangedCallbackscxx . . $ structGuiControl#d_blockValueChangedCallbacks.; |
| 406 | |
| 407 | virtual void v_positionInFormcxx . . $ structGuiControl#v_positionInForm(6e76d3e0dab57625). (GuiObjectcxx . . $ GuiObject# widget, int left, int right, int top, int bottom, GuiFormcxx . . $ GuiForm# parent); |
| 408 | virtual void v_positionInScrolledWindowcxx . . $ structGuiControl#v_positionInScrolledWindow(bd0f8bf0b668f63a). (GuiObjectcxx . . $ GuiObject# widget, int width, int height, GuiScrolledWindowcxx . . $ GuiScrolledWindow# parent); |
| 409 | }; |
| 410 | |
| 411 | int GuiControl_getXcxx . . $ GuiControl_getX(1227891e76fac374). (GuiControlcxx . . $ GuiControl# me); |
| 412 | int GuiControl_getYcxx . . $ GuiControl_getY(1227891e76fac374). (GuiControlcxx . . $ GuiControl# me); |
| 413 | int GuiControl_getWidthcxx . . $ GuiControl_getWidth(1227891e76fac374). (GuiControlcxx . . $ GuiControl# me); |
| 414 | int GuiControl_getHeightcxx . . $ GuiControl_getHeight(1227891e76fac374). (GuiControlcxx . . $ GuiControl# me); |
| 415 | void GuiControl_movecxx . . $ GuiControl_move(8866d61c560ae333). (GuiControlcxx . . $ GuiControl# me, int x, int y); |
| 416 | void GuiControl_setSizecxx . . $ GuiControl_setSize(8866d61c560ae333). (GuiControlcxx . . $ GuiControl# me, int width, int height); |
| 417 | |
| 418 | Thing_definecxx . . $ ClassInfo# (GuiForm, GuiControl) { |
| 419 | }; |
| 420 | |
| 421 | using GuiShell_GoAwayCallbackcxx . . $ GuiShell_GoAwayCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */>; |
| 422 | |
| 423 | Thing_definecxx . . $ autoSomeThing# (GuiShell, GuiForm) { |
| 424 | int d_widthcxx . . $ structGuiShell#d_width., d_heightcxx . . $ structGuiShell#d_height.; |
| 425 | #if gtkcxx . . $ `sys/Gui.h:33:10`! |
| 426 | GtkWindow *d_gtkWindowcxx . . $ structGuiShell#d_gtkWindow.; |
| 427 | #if defined (chrome) |
| 428 | GtkWidget *chrome_surrogateShellTitleLabelWidget; |
| 429 | #endif |
| 430 | #elif cocoa |
| 431 | GuiCocoaShell *d_cocoaShell; |
| 432 | #elif motif |
| 433 | GuiObject d_xmShell; |
| 434 | #endif |
| 435 | GuiShell_GoAwayCallbackcxx . . $ GuiShell_GoAwayCallback# d_goAwayCallbackcxx . . $ structGuiShell#d_goAwayCallback.; |
| 436 | Thingcxx . . $ Thing# d_goAwayBosscxx . . $ structGuiShell#d_goAwayBoss.; |
| 437 | GuiDrawingAreacxx . . $ GuiDrawingArea# drawingAreacxx . . $ structGuiShell#drawingArea.; |
| 438 | |
| 439 | void v9_destroycxx . . $ structGuiShell#v9_destroy(ced63f7c635d850d). () noexcept |
| 440 | override; |
| 441 | }; |
| 442 | |
| 443 | int GuiShell_getShellWidthcxx . . $ GuiShell_getShellWidth(3bad2b66b67ca74d). (GuiShellcxx . . $ GuiShell# me); // needed because GuiControl_getWidth yields the width of the inner form |
| 444 | int GuiShell_getShellHeightcxx . . $ GuiShell_getShellHeight(3bad2b66b67ca74d). (GuiShellcxx . . $ GuiShell# me); |
| 445 | void GuiShell_setTitlecxx . . $ GuiShell_setTitle(3a9df304850abc11). (GuiShellcxx . . $ GuiShell# me, conststring32cxx . . $ conststring32# title /* cattable */); |
| 446 | void GuiShell_draincxx . . $ GuiShell_drain(429b5b6a2695f0d7). (GuiShellcxx . . $ GuiShell# me, bool waitUntilItHasHappened, bool allowOtherEvents); // force display of update regions (forces the handling of an expose event) |
| 447 | |
| 448 | /********** GuiButton **********/ |
| 449 | |
| 450 | Thing_declarecxx . . $ `sys/Thing.h:51:9`! (GuiButton); |
| 451 | |
| 452 | typedef struct structGuiButtonEventcxx . . $ structGuiButtonEvent# { |
| 453 | GuiButtoncxx . . $ GuiButton# buttoncxx . . $ structGuiButtonEvent#button.; |
| 454 | bool shiftKeyPressedcxx . . $ structGuiButtonEvent#shiftKeyPressed., commandKeyPressedcxx . . $ structGuiButtonEvent#commandKeyPressed., optionKeyPressedcxx . . $ structGuiButtonEvent#optionKeyPressed.; |
| 455 | } *GuiButtonEventcxx . . $ GuiButtonEvent#; |
| 456 | |
| 457 | using GuiButton_ActivateCallbackcxx . . $ GuiButton_ActivateCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiButtonEventcxx . . $ GuiButtonEvent#>; |
| 458 | |
| 459 | Thing_definecxx . . $ GuiButtonHandle# (GuiButton, GuiControl) { |
| 460 | GuiButton_ActivateCallbackcxx . . $ GuiButton_ActivateCallback# d_activateCallbackcxx . . $ structGuiButton#d_activateCallback.; |
| 461 | Thingcxx . . $ Thing# d_activateBosscxx . . $ structGuiButton#d_activateBoss.; |
| 462 | GuiMenucxx . . $ GuiMenu# d_menucxx . . $ structGuiButton#d_menu.; // for cascade buttons |
| 463 | integercxx . . $ integer# d_sequentalIdInDialogcxx . . $ structGuiButton#d_sequentalIdInDialog.; |
| 464 | }; |
| 465 | |
| 466 | /* GuiButton creation flags: */ |
| 467 | #define GuiButton_DEFAULTcxx . . $ `sys/Gui.h:467:9`! 1 |
| 468 | #define GuiButton_CANCELcxx . . $ `sys/Gui.h:468:9`! 2 |
| 469 | #define GuiButton_INSENSITIVEcxx . . $ `sys/Gui.h:469:9`! 4 |
| 470 | #define GuiButton_ATTRACTIVEcxx . . $ `sys/Gui.h:470:9`! 8 |
| 471 | #define GuiButton_MULTILINEcxx . . $ `sys/Gui.h:471:9`! 16 |
| 472 | GuiButtoncxx . . $ GuiButton# GuiButton_createcxx . . $ GuiButton_create(653ed9987c16d9c1). (GuiFormcxx . . $ GuiForm# parent, |
| 473 | int left, int right, int top, int bottom, |
| 474 | conststring32cxx . . $ conststring32# text, |
| 475 | GuiButton_ActivateCallbackcxx . . $ GuiButton_ActivateCallback# activateCallback, Thingcxx . . $ Thing# boss, |
| 476 | uint32cxx . . $ uint32# flags |
| 477 | ); |
| 478 | GuiButtoncxx . . $ GuiButton# GuiButton_createShowncxx . . $ GuiButton_createShown(653ed9987c16d9c1). (GuiFormcxx . . $ GuiForm# parent, |
| 479 | int left, int right, int top, int bottom, |
| 480 | conststring32cxx . . $ conststring32# text, |
| 481 | GuiButton_ActivateCallbackcxx . . $ GuiButton_ActivateCallback# activateCallback, Thingcxx . . $ Thing# boss, |
| 482 | uint32cxx . . $ uint32# flags |
| 483 | ); |
| 484 | |
| 485 | void GuiButton_setTextcxx . . $ GuiButton_setText(42a3d8c158c8d112). (GuiButtoncxx . . $ GuiButton# me, conststring32cxx . . $ conststring32# text /* cattable */); |
| 486 | |
| 487 | /********** GuiCheckButton **********/ |
| 488 | |
| 489 | Thing_declarecxx . . $ autoGuiCheckButton# (GuiCheckButton); |
| 490 | |
| 491 | typedef struct structGuiCheckButtonEventcxx . . $ structGuiCheckButtonEvent# { |
| 492 | GuiCheckButtoncxx . . $ GuiCheckButton# togglecxx . . $ structGuiCheckButtonEvent#toggle.; |
| 493 | } *GuiCheckButtonEventcxx . . $ GuiCheckButtonEvent#; |
| 494 | |
| 495 | using GuiCheckButton_ValueChangedCallbackcxx . . $ GuiCheckButton_ValueChangedCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiCheckButtonEventcxx . . $ GuiCheckButtonEvent#>; |
| 496 | |
| 497 | Thing_definecxx . . $ classGuiCheckButton. (GuiCheckButton, GuiControl) { |
| 498 | GuiCheckButton_ValueChangedCallbackcxx . . $ GuiCheckButton_ValueChangedCallback# d_valueChangedCallbackcxx . . $ structGuiCheckButton#d_valueChangedCallback.; |
| 499 | Thingcxx . . $ Thing# d_valueChangedBosscxx . . $ structGuiCheckButton#d_valueChangedBoss.; |
| 500 | }; |
| 501 | |
| 502 | /* GuiCheckButton creation flags: */ |
| 503 | #define GuiCheckButton_SETcxx . . $ `sys/Gui.h:503:9`! 1 |
| 504 | #define GuiCheckButton_INSENSITIVEcxx . . $ `sys/Gui.h:504:9`! 2 |
| 505 | GuiCheckButtoncxx . . $ GuiCheckButton# GuiCheckButton_createcxx . . $ GuiCheckButton_create(623a0757f24fe0b2). (GuiFormcxx . . $ GuiForm# parent, |
| 506 | int left, int right, int top, int bottom, |
| 507 | conststring32cxx . . $ conststring32# text, |
| 508 | GuiCheckButton_ValueChangedCallbackcxx . . $ GuiCheckButton_ValueChangedCallback# valueChangedCallback, Thingcxx . . $ Thing# boss, |
| 509 | uint32cxx . . $ uint32# flags |
| 510 | ); |
| 511 | GuiCheckButtoncxx . . $ GuiCheckButton# GuiCheckButton_createShowncxx . . $ GuiCheckButton_createShown(623a0757f24fe0b2). (GuiFormcxx . . $ GuiForm# parent, |
| 512 | int left, int right, int top, int bottom, |
| 513 | conststring32cxx . . $ conststring32# text, |
| 514 | GuiCheckButton_ValueChangedCallbackcxx . . $ GuiCheckButton_ValueChangedCallback# valueChangedCallback, Thingcxx . . $ Thing# boss, |
| 515 | uint32cxx . . $ uint32# flags |
| 516 | ); |
| 517 | |
| 518 | bool GuiCheckButton_getValuecxx . . $ GuiCheckButton_getValue(a8338fe19a656ed0). (GuiCheckButtoncxx . . $ GuiCheckButton# me); |
| 519 | void GuiCheckButton_setValuecxx . . $ GuiCheckButton_setValue(7c4273eb49c3ef26). (GuiCheckButtoncxx . . $ GuiCheckButton# me, bool value); |
| 520 | |
| 521 | /********** GuiDialog **********/ |
| 522 | |
| 523 | using GuiDialog_DefaultCallbackcxx . . $ GuiDialog_DefaultCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */>; |
| 524 | |
| 525 | Thing_definecxx . . $ autoSomeThing# (GuiDialog, GuiShell) { |
| 526 | GuiDialog_DefaultCallbackcxx . . $ GuiDialog_DefaultCallback# d_defaultCallbackcxx . . $ structGuiDialog#d_defaultCallback.; |
| 527 | Thingcxx . . $ Thing# d_defaultBosscxx . . $ structGuiDialog#d_defaultBoss.; |
| 528 | integercxx . . $ integer# latestCreatedButtonIdcxx . . $ structGuiDialog#latestCreatedButtonId., clickedButtonIdcxx . . $ structGuiDialog#clickedButtonId., defaultButtonIdcxx . . $ structGuiDialog#defaultButtonId.; // especially if the dialog is blocking |
| 529 | GuiButtoncxx . . $ GuiButton# defaultButtoncxx . . $ structGuiDialog#defaultButton.; |
| 530 | }; |
| 531 | |
| 532 | /* GuiDialog creation flags: */ |
| 533 | enum class GuiDialog_Modalitycxx . . $ GuiDialog_Modality# { MODELESScxx . . $ GuiDialog_Modality#MODELESS. = 0, MODALcxx . . $ GuiDialog_Modality#MODAL. = 1, BLOCKINGcxx . . $ GuiDialog_Modality#BLOCKING. = 2 }; |
| 534 | GuiDialogcxx . . $ GuiDialog# GuiDialog_createcxx . . $ GuiDialog_create(9df51e4563bc0c17). (GuiWindowcxx . . $ GuiWindow# parent, |
| 535 | int x, int y, int width, int height, |
| 536 | conststring32cxx . . $ conststring32# title, |
| 537 | GuiShell_GoAwayCallbackcxx . . $ GuiShell_GoAwayCallback# goAwayCallback, Thingcxx . . $ Thing# goAwayBoss, |
| 538 | GuiDialog_Modalitycxx . . $ GuiDialog_Modality# modality |
| 539 | ); |
| 540 | |
| 541 | void GuiDialog_setDefaultCallbackcxx . . $ GuiDialog_setDefaultCallback(4348c95d8f00ecbd). (GuiDialogcxx . . $ GuiDialog# me, GuiDialog_DefaultCallbackcxx . . $ GuiDialog_DefaultCallback# callback, Thingcxx . . $ Thing# boss); |
| 542 | |
| 543 | integercxx . . $ integer# GuiDialog_runcxx . . $ GuiDialog_run(4d616838d2dacc91). (GuiDialogcxx . . $ GuiDialog# me); |
| 544 | /* |
| 545 | Only for blocking dialogs. |
| 546 | Return value: |
| 547 | - if she clicked a button (with text), the sequentual id of the clicked button (1, 2, 3...) is returned |
| 548 | - if she clicked the Close button of the window, 0 is returned |
| 549 | - if she typed Enter, and there was a default button, the sequentual id of the default button is returned |
| 550 | - if she typed Enter and there was no default button, 0 is returned (i.e. this is the same as clicking the Close button) |
| 551 | */ |
| 552 | |
| 553 | /********** GuiDrawingArea **********/ |
| 554 | |
| 555 | Thing_declarecxx . . $ GuiDrawingAreaHandle# (GuiDrawingArea); |
| 556 | Thing_declarecxx . . $ classGuiScrollBar. (GuiScrollBar); |
| 557 | |
| 558 | typedef struct structGuiDrawingArea_ExposeEventcxx . . $ structGuiDrawingArea_ExposeEvent# { |
| 559 | GuiDrawingAreacxx . . $ GuiDrawingArea# widgetcxx . . $ structGuiDrawingArea_ExposeEvent#widget.; |
| 560 | int xcxx . . $ structGuiDrawingArea_ExposeEvent#x., ycxx . . $ structGuiDrawingArea_ExposeEvent#y., widthcxx . . $ structGuiDrawingArea_ExposeEvent#width., heightcxx . . $ structGuiDrawingArea_ExposeEvent#height.; |
| 561 | } *GuiDrawingArea_ExposeEventcxx . . $ GuiDrawingArea_ExposeEvent#; |
| 562 | |
| 563 | typedef struct structGuiDrawingArea_MouseEventcxx . . $ structGuiDrawingArea_MouseEvent# { |
| 564 | GuiDrawingAreacxx . . $ GuiDrawingArea# widgetcxx . . $ structGuiDrawingArea_MouseEvent#widget.; |
| 565 | int xcxx . . $ structGuiDrawingArea_MouseEvent#x., ycxx . . $ structGuiDrawingArea_MouseEvent#y.; |
| 566 | enum class Phasecxx . . $ structGuiDrawingArea_MouseEvent#Phase# { CLICKcxx . . $ structGuiDrawingArea_MouseEvent#Phase#CLICK., DRAGcxx . . $ structGuiDrawingArea_MouseEvent#Phase#DRAG., DROPcxx . . $ structGuiDrawingArea_MouseEvent#Phase#DROP. } phasecxx . . $ structGuiDrawingArea_MouseEvent#phase.; |
| 567 | bool isClickcxx . . $ structGuiDrawingArea_MouseEvent#isClick(50ce9a9e25b4a850).() const { return ourcxx . . $ `melder/melder.h:42:9`! phasecxx . . $ structGuiDrawingArea_MouseEvent#phase. == Phasecxx . . $ structGuiDrawingArea_MouseEvent#Phase#::CLICKcxx . . $ structGuiDrawingArea_MouseEvent#Phase#CLICK.; } |
| 568 | bool isDragcxx . . $ structGuiDrawingArea_MouseEvent#isDrag(50ce9a9e25b4a850).() const { return ourcxx . . $ `melder/melder.h:42:9`! phasecxx . . $ structGuiDrawingArea_MouseEvent#phase. == Phasecxx . . $ structGuiDrawingArea_MouseEvent#Phase#::DRAGcxx . . $ structGuiDrawingArea_MouseEvent#Phase#DRAG.; } |
| 569 | bool isDropcxx . . $ structGuiDrawingArea_MouseEvent#isDrop(50ce9a9e25b4a850).() const { return ourcxx . . $ `melder/melder.h:42:9`! phasecxx . . $ structGuiDrawingArea_MouseEvent#phase. == Phasecxx . . $ structGuiDrawingArea_MouseEvent#Phase#::DROPcxx . . $ structGuiDrawingArea_MouseEvent#Phase#DROP.; } |
| 570 | bool shiftKeyPressedcxx . . $ structGuiDrawingArea_MouseEvent#shiftKeyPressed., commandKeyPressedcxx . . $ structGuiDrawingArea_MouseEvent#commandKeyPressed., optionKeyPressedcxx . . $ structGuiDrawingArea_MouseEvent#optionKeyPressed.; |
| 571 | bool isLeftBottomFunctionKeyPressedcxx . . $ structGuiDrawingArea_MouseEvent#isLeftBottomFunctionKeyPressed(50ce9a9e25b4a850). () const { |
| 572 | return theCommandKeyIsToTheLeftOfTheOptionKeycxx . . $ theCommandKeyIsToTheLeftOfTheOptionKey. ? ourcxx . . $ `melder/melder.h:42:9`! commandKeyPressedcxx . . $ structGuiDrawingArea_MouseEvent#commandKeyPressed. : ourcxx . . $ `melder/melder.h:42:9`! optionKeyPressedcxx . . $ structGuiDrawingArea_MouseEvent#optionKeyPressed.; |
| 573 | } |
| 574 | bool isRightBottomFunctionKeyPressedcxx . . $ structGuiDrawingArea_MouseEvent#isRightBottomFunctionKeyPressed(50ce9a9e25b4a850). () const { |
| 575 | return theCommandKeyIsToTheLeftOfTheOptionKeycxx . . $ theCommandKeyIsToTheLeftOfTheOptionKey. ? ourcxx . . $ `melder/melder.h:42:9`! optionKeyPressedcxx . . $ structGuiDrawingArea_MouseEvent#optionKeyPressed. : ourcxx . . $ `melder/melder.h:42:9`! commandKeyPressedcxx . . $ structGuiDrawingArea_MouseEvent#commandKeyPressed.; |
| 576 | } |
| 577 | } *GuiDrawingArea_MouseEventcxx . . $ GuiDrawingArea_MouseEvent#; |
| 578 | |
| 579 | typedef struct structGuiDrawingArea_KeyEventcxx . . $ structGuiDrawingArea_KeyEvent# { |
| 580 | GuiDrawingAreacxx . . $ GuiDrawingArea# widgetcxx . . $ structGuiDrawingArea_KeyEvent#widget.; |
| 581 | char32cxx . . $ char32# keycxx . . $ structGuiDrawingArea_KeyEvent#key.; |
| 582 | bool shiftKeyPressedcxx . . $ structGuiDrawingArea_KeyEvent#shiftKeyPressed., commandKeyPressedcxx . . $ structGuiDrawingArea_KeyEvent#commandKeyPressed., optionKeyPressedcxx . . $ structGuiDrawingArea_KeyEvent#optionKeyPressed.; |
| 583 | } *GuiDrawingArea_KeyEventcxx . . $ GuiDrawingArea_KeyEvent#; |
| 584 | |
| 585 | typedef struct structGuiDrawingArea_ResizeEventcxx . . $ structGuiDrawingArea_ResizeEvent# { |
| 586 | GuiDrawingAreacxx . . $ GuiDrawingArea# widgetcxx . . $ structGuiDrawingArea_ResizeEvent#widget.; |
| 587 | int widthcxx . . $ structGuiDrawingArea_ResizeEvent#width., heightcxx . . $ structGuiDrawingArea_ResizeEvent#height.; |
| 588 | } *GuiDrawingArea_ResizeEventcxx . . $ GuiDrawingArea_ResizeEvent#; |
| 589 | |
| 590 | typedef struct structGuiDrawingArea_ZoomEventcxx . . $ structGuiDrawingArea_ZoomEvent# { |
| 591 | GuiDrawingAreacxx . . $ GuiDrawingArea# widgetcxx . . $ structGuiDrawingArea_ZoomEvent#widget.; |
| 592 | double deltacxx . . $ structGuiDrawingArea_ZoomEvent#delta.; // positive means enlarge (zoom in), negative means shrink (zoom out) |
| 593 | } *GuiDrawingArea_ZoomEventcxx . . $ GuiDrawingArea_ZoomEvent#; |
| 594 | |
| 595 | using GuiDrawingArea_ExposeCallbackcxx . . $ GuiDrawingArea_ExposeCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiDrawingArea_ExposeEventcxx . . $ GuiDrawingArea_ExposeEvent#>; |
| 596 | using GuiDrawingArea_MouseCallbackcxx . . $ GuiDrawingArea_MouseCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiDrawingArea_MouseEventcxx . . $ GuiDrawingArea_MouseEvent# >; |
| 597 | using GuiDrawingArea_KeyCallbackcxx . . $ GuiDrawingArea_KeyCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiDrawingArea_KeyEventcxx . . $ GuiDrawingArea_KeyEvent# >; |
| 598 | using GuiDrawingArea_ResizeCallbackcxx . . $ GuiDrawingArea_ResizeCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiDrawingArea_ResizeEventcxx . . $ GuiDrawingArea_ResizeEvent#>; |
| 599 | using GuiDrawingArea_ZoomCallbackcxx . . $ GuiDrawingArea_ZoomCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiDrawingArea_ZoomEventcxx . . $ GuiDrawingArea_ZoomEvent# >; |
| 600 | |
| 601 | Thing_definecxx . . $ constGuiDrawingArea# (GuiDrawingArea, GuiControl) { |
| 602 | GuiScrollBarcxx . . $ GuiScrollBar# d_horizontalScrollBarcxx . . $ structGuiDrawingArea#d_horizontalScrollBar., d_verticalScrollBarcxx . . $ structGuiDrawingArea#d_verticalScrollBar.; // for swiping |
| 603 | GuiDrawingArea_ExposeCallbackcxx . . $ GuiDrawingArea_ExposeCallback# d_exposeCallbackcxx . . $ structGuiDrawingArea#d_exposeCallback.; |
| 604 | Thingcxx . . $ Thing# d_exposeBosscxx . . $ structGuiDrawingArea#d_exposeBoss.; |
| 605 | GuiDrawingArea_MouseCallbackcxx . . $ GuiDrawingArea_MouseCallback# mouseCallbackcxx . . $ structGuiDrawingArea#mouseCallback.; |
| 606 | Thingcxx . . $ Thing# mouseBosscxx . . $ structGuiDrawingArea#mouseBoss.; |
| 607 | GuiDrawingArea_KeyCallbackcxx . . $ GuiDrawingArea_KeyCallback# d_keyCallbackcxx . . $ structGuiDrawingArea#d_keyCallback.; |
| 608 | Thingcxx . . $ Thing# d_keyBosscxx . . $ structGuiDrawingArea#d_keyBoss.; |
| 609 | GuiDrawingArea_ResizeCallbackcxx . . $ GuiDrawingArea_ResizeCallback# d_resizeCallbackcxx . . $ structGuiDrawingArea#d_resizeCallback.; |
| 610 | Thingcxx . . $ Thing# d_resizeBosscxx . . $ structGuiDrawingArea#d_resizeBoss.; |
| 611 | GuiDrawingArea_ZoomCallbackcxx . . $ GuiDrawingArea_ZoomCallback# d_zoomCallbackcxx . . $ structGuiDrawingArea#d_zoomCallback.; |
| 612 | Thingcxx . . $ Thing# d_zoomBosscxx . . $ structGuiDrawingArea#d_zoomBoss.; |
| 613 | integercxx . . $ integer# numberOfGraphicsescxx . . $ structGuiDrawingArea#numberOfGraphicses.; |
| 614 | constexpr static integercxx . . $ integer# MAXIMUM_NUMBER_OF_GRAPHICSEScxx . . $ structGuiDrawingArea#MAXIMUM_NUMBER_OF_GRAPHICSES. = 10; |
| 615 | Graphicscxx . . $ Graphics# graphicsescxx . . $ structGuiDrawingArea#graphicses. [1+MAXIMUM_NUMBER_OF_GRAPHICSEScxx . . $ structGuiDrawingArea#MAXIMUM_NUMBER_OF_GRAPHICSES.]; |
| 616 | |
| 617 | void v9_destroycxx . . $ structGuiDrawingArea#v9_destroy(ced63f7c635d850d). () noexcept |
| 618 | override; |
| 619 | }; |
| 620 | |
| 621 | /* GuiDrawingArea creation flags: */ |
| 622 | #define GuiDrawingArea_BORDERcxx . . $ `sys/Gui.h:622:9`! 1 |
| 623 | GuiDrawingAreacxx . . $ GuiDrawingArea# GuiDrawingArea_createcxx . . $ GuiDrawingArea_create(5a210e61ba6a237d). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, |
| 624 | GuiDrawingArea_ExposeCallbackcxx . . $ GuiDrawingArea_ExposeCallback# exposeCallback, |
| 625 | GuiDrawingArea_MouseCallbackcxx . . $ GuiDrawingArea_MouseCallback# mouseCallback, |
| 626 | GuiDrawingArea_KeyCallbackcxx . . $ GuiDrawingArea_KeyCallback# keyCallback, |
| 627 | GuiDrawingArea_ResizeCallbackcxx . . $ GuiDrawingArea_ResizeCallback# resizeCallback, |
| 628 | GuiDrawingArea_ZoomCallbackcxx . . $ GuiDrawingArea_ZoomCallback# zoomCallback, Thingcxx . . $ Thing# boss, |
| 629 | uint32cxx . . $ uint32# flags); |
| 630 | GuiDrawingAreacxx . . $ GuiDrawingArea# GuiDrawingArea_createShowncxx . . $ GuiDrawingArea_createShown(5a210e61ba6a237d). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, |
| 631 | GuiDrawingArea_ExposeCallbackcxx . . $ GuiDrawingArea_ExposeCallback# exposeCallback, |
| 632 | GuiDrawingArea_MouseCallbackcxx . . $ GuiDrawingArea_MouseCallback# mouseCallback, |
| 633 | GuiDrawingArea_KeyCallbackcxx . . $ GuiDrawingArea_KeyCallback# keyCallback, |
| 634 | GuiDrawingArea_ResizeCallbackcxx . . $ GuiDrawingArea_ResizeCallback# resizeCallback, |
| 635 | GuiDrawingArea_ZoomCallbackcxx . . $ GuiDrawingArea_ZoomCallback# zoomCallback, Thingcxx . . $ Thing# boss, |
| 636 | uint32cxx . . $ uint32# flags); |
| 637 | GuiDrawingAreacxx . . $ GuiDrawingArea# GuiDrawingArea_createcxx . . $ GuiDrawingArea_create(90010d40394de761). (GuiScrolledWindowcxx . . $ GuiScrolledWindow# parent, int width, int height, |
| 638 | GuiDrawingArea_ExposeCallbackcxx . . $ GuiDrawingArea_ExposeCallback# exposeCallback, |
| 639 | GuiDrawingArea_MouseCallbackcxx . . $ GuiDrawingArea_MouseCallback# mouseCallback, |
| 640 | GuiDrawingArea_KeyCallbackcxx . . $ GuiDrawingArea_KeyCallback# keyCallback, |
| 641 | GuiDrawingArea_ResizeCallbackcxx . . $ GuiDrawingArea_ResizeCallback# resizeCallback, |
| 642 | GuiDrawingArea_ZoomCallbackcxx . . $ GuiDrawingArea_ZoomCallback# zoomCallback, Thingcxx . . $ Thing# boss, |
| 643 | uint32cxx . . $ uint32# flags); |
| 644 | GuiDrawingAreacxx . . $ GuiDrawingArea# GuiDrawingArea_createShowncxx . . $ GuiDrawingArea_createShown(90010d40394de761). (GuiScrolledWindowcxx . . $ GuiScrolledWindow# parent, int width, int height, |
| 645 | GuiDrawingArea_ExposeCallbackcxx . . $ GuiDrawingArea_ExposeCallback# exposeCallback, |
| 646 | GuiDrawingArea_MouseCallbackcxx . . $ GuiDrawingArea_MouseCallback# mouseCallback, |
| 647 | GuiDrawingArea_KeyCallbackcxx . . $ GuiDrawingArea_KeyCallback# keyCallback, |
| 648 | GuiDrawingArea_ResizeCallbackcxx . . $ GuiDrawingArea_ResizeCallback# resizeCallback, |
| 649 | GuiDrawingArea_ZoomCallbackcxx . . $ GuiDrawingArea_ZoomCallback# zoomCallback, Thingcxx . . $ Thing# boss, |
| 650 | uint32cxx . . $ uint32# flags); |
| 651 | |
| 652 | void GuiDrawingArea_setSwipablecxx . . $ GuiDrawingArea_setSwipable(7e7a359b55bf9e27). (GuiDrawingAreacxx . . $ GuiDrawingArea# me, GuiScrollBarcxx . . $ GuiScrollBar# horizontalScrollBar, GuiScrollBarcxx . . $ GuiScrollBar# verticalScrollBar); |
| 653 | void GuiDrawingArea_setExposeCallbackcxx . . $ GuiDrawingArea_setExposeCallback(a33fb5a9b9a36a6c). (GuiDrawingAreacxx . . $ GuiDrawingArea# me, GuiDrawingArea_ExposeCallbackcxx . . $ GuiDrawingArea_ExposeCallback# callback, Thingcxx . . $ Thing# boss); |
| 654 | void GuiDrawingArea_setMouseCallbackcxx . . $ GuiDrawingArea_setMouseCallback(766d4929d482e652). (GuiDrawingAreacxx . . $ GuiDrawingArea# me, GuiDrawingArea_MouseCallbackcxx . . $ GuiDrawingArea_MouseCallback# callback, Thingcxx . . $ Thing# boss); |
| 655 | void GuiDrawingArea_setResizeCallbackcxx . . $ GuiDrawingArea_setResizeCallback(aa4956f4008e2588). (GuiDrawingAreacxx . . $ GuiDrawingArea# me, GuiDrawingArea_ResizeCallbackcxx . . $ GuiDrawingArea_ResizeCallback# callback, Thingcxx . . $ Thing# boss); |
| 656 | void GuiDrawingArea_setZoomCallbackcxx . . $ GuiDrawingArea_setZoomCallback(15a7b1d70535470). (GuiDrawingAreacxx . . $ GuiDrawingArea# me, GuiDrawingArea_ZoomCallbackcxx . . $ GuiDrawingArea_ZoomCallback# callback, Thingcxx . . $ Thing# boss); |
| 657 | |
| 658 | /********** GuiFileSelect **********/ |
| 659 | |
| 660 | autoStringSetcxx . . $ autoStringSet# GuiFileSelect_getInfileNamescxx . . $ GuiFileSelect_getInfileNames(5a0c946482488abf). (GuiWindowcxx . . $ GuiWindow# optionalParent, conststring32cxx . . $ conststring32# title, bool allowMultipleFiles); |
| 661 | autostring32cxx . . $ autostring32# GuiFileSelect_getOutfileNamecxx . . $ GuiFileSelect_getOutfileName(575be6c40acafffe). (GuiWindowcxx . . $ GuiWindow# optionalParent, conststring32cxx . . $ conststring32# title, conststring32cxx . . $ conststring32# defaultName); |
| 662 | autostring32cxx . . $ autostring32# GuiFileSelect_getFolderNamecxx . . $ GuiFileSelect_getFolderName(5af1513ecf60daff). (GuiWindowcxx . . $ GuiWindow# optionalParent, conststring32cxx . . $ conststring32# title); |
| 663 | |
| 664 | /********** GuiForm **********/ |
| 665 | |
| 666 | GuiFormcxx . . $ GuiForm# GuiForm_createInScrolledWindowcxx . . $ GuiForm_createInScrolledWindow(fb3bf907f314f2d8). (GuiScrolledWindowcxx . . $ GuiScrolledWindow# parent); |
| 667 | |
| 668 | /********** GuiLabel **********/ |
| 669 | |
| 670 | //Thing_declare (GuiLabel); |
| 671 | |
| 672 | Thing_definecxx . . $ SomeThingHandle# (GuiLabel, GuiControl) { |
| 673 | }; |
| 674 | |
| 675 | /* GuiLabel creation flags: */ |
| 676 | #define GuiLabel_CENTREcxx . . $ `sys/Gui.h:676:9`! 1 |
| 677 | #define GuiLabel_RIGHTcxx . . $ `sys/Gui.h:677:9`! 2 |
| 678 | #define GuiLabel_BOLDcxx . . $ `sys/Gui.h:678:9`! 4 |
| 679 | #define GuiLabel_MULTILINEcxx . . $ `sys/Gui.h:679:9`! 8 |
| 680 | GuiLabelcxx . . $ GuiLabel# GuiLabel_createcxx . . $ GuiLabel_create(39026c9008a6a07). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, |
| 681 | conststring32cxx . . $ conststring32# text, uint32cxx . . $ uint32# flags); |
| 682 | GuiLabelcxx . . $ GuiLabel# GuiLabel_createShowncxx . . $ GuiLabel_createShown(39026c9008a6a07). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, |
| 683 | conststring32cxx . . $ conststring32# text, uint32cxx . . $ uint32# flags); |
| 684 | |
| 685 | void GuiLabel_setTextcxx . . $ GuiLabel_setText(8fd1a6a47d1f7702). (GuiLabelcxx . . $ GuiLabel# me, conststring32cxx . . $ conststring32# text /* cattable */); |
| 686 | |
| 687 | /********** GuiList **********/ |
| 688 | |
| 689 | Thing_declarecxx . . $ `sys/Thing.h:51:9`! (GuiList); |
| 690 | Thing_declarecxx . . $ GuiScrolledWindow# (GuiScrolledWindow); |
| 691 | |
| 692 | typedef struct structGuiList_SelectionChangedEventcxx . . $ structGuiList_SelectionChangedEvent# { |
| 693 | GuiListcxx . . $ GuiList# listcxx . . $ structGuiList_SelectionChangedEvent#list.; |
| 694 | } *GuiList_SelectionChangedEventcxx . . $ GuiList_SelectionChangedEvent#; |
| 695 | using GuiList_SelectionChangedCallbackcxx . . $ GuiList_SelectionChangedCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiList_SelectionChangedEventcxx . . $ GuiList_SelectionChangedEvent#>; |
| 696 | |
| 697 | typedef struct structGuiList_DoubleClickEventcxx . . $ structGuiList_DoubleClickEvent# { |
| 698 | GuiListcxx . . $ GuiList# listcxx . . $ structGuiList_DoubleClickEvent#list.; |
| 699 | } *GuiList_DoubleClickEventcxx . . $ GuiList_DoubleClickEvent#; |
| 700 | using GuiList_DoubleClickCallbackcxx . . $ GuiList_DoubleClickCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiList_DoubleClickEventcxx . . $ GuiList_DoubleClickEvent#>; |
| 701 | |
| 702 | typedef struct structGuiList_ScrollEventcxx . . $ structGuiList_ScrollEvent# { |
| 703 | GuiListcxx . . $ GuiList# listcxx . . $ structGuiList_ScrollEvent#list.; |
| 704 | } *GuiList_ScrollEventcxx . . $ GuiList_ScrollEvent#; |
| 705 | using GuiList_ScrollCallbackcxx . . $ GuiList_ScrollCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiList_ScrollEventcxx . . $ GuiList_ScrollEvent#>; |
| 706 | |
| 707 | Thing_definecxx . . $ mutableGuiList# (GuiList, GuiControl) { |
| 708 | bool d_allowMultipleSelectioncxx . . $ structGuiList#d_allowMultipleSelection.; |
| 709 | GuiList_SelectionChangedCallbackcxx . . $ GuiList_SelectionChangedCallback# d_selectionChangedCallbackcxx . . $ structGuiList#d_selectionChangedCallback.; |
| 710 | Thingcxx . . $ Thing# d_selectionChangedBosscxx . . $ structGuiList#d_selectionChangedBoss.; |
| 711 | GuiList_DoubleClickCallbackcxx . . $ GuiList_DoubleClickCallback# d_doubleClickCallbackcxx . . $ structGuiList#d_doubleClickCallback.; |
| 712 | Thingcxx . . $ Thing# d_doubleClickBosscxx . . $ structGuiList#d_doubleClickBoss.; |
| 713 | GuiList_ScrollCallbackcxx . . $ GuiList_ScrollCallback# d_scrollCallbackcxx . . $ structGuiList#d_scrollCallback.; |
| 714 | Thingcxx . . $ Thing# d_scrollBosscxx . . $ structGuiList#d_scrollBoss.; |
| 715 | #if gtkcxx . . $ `sys/Gui.h:33:10`! |
| 716 | GtkListStore *d_liststorecxx . . $ structGuiList#d_liststore.; |
| 717 | #endif |
| 718 | }; |
| 719 | |
| 720 | GuiListcxx . . $ GuiList# GuiList_createcxx . . $ GuiList_create(88aee17cb4a88a62). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, bool allowMultipleSelection, conststring32cxx . . $ conststring32# header); |
| 721 | GuiListcxx . . $ GuiList# GuiList_createShowncxx . . $ GuiList_createShown(88aee17cb4a88a62). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, bool allowMultipleSelection, conststring32cxx . . $ conststring32# header); |
| 722 | |
| 723 | void GuiList_deleteAllItemscxx . . $ GuiList_deleteAllItems(bb293b59cc37ad76). (GuiListcxx . . $ GuiList# me); |
| 724 | void GuiList_deleteItemcxx . . $ GuiList_deleteItem(f9b5f8b1da8fd2dd). (GuiListcxx . . $ GuiList# me, integercxx . . $ integer# position); |
| 725 | void GuiList_deselectAllItemscxx . . $ GuiList_deselectAllItems(bb293b59cc37ad76). (GuiListcxx . . $ GuiList# me); |
| 726 | void GuiList_deselectItemcxx . . $ GuiList_deselectItem(f9b5f8b1da8fd2dd). (GuiListcxx . . $ GuiList# me, integercxx . . $ integer# position); |
| 727 | integercxx . . $ integer# GuiList_getBottomPositioncxx . . $ GuiList_getBottomPosition(699f1c5434bb2ea9). (GuiListcxx . . $ GuiList# me); |
| 728 | integercxx . . $ integer# GuiList_getNumberOfItemscxx . . $ GuiList_getNumberOfItems(699f1c5434bb2ea9). (GuiListcxx . . $ GuiList# me); |
| 729 | autoINTVECcxx . . $ autoINTVEC# GuiList_getSelectedPositionscxx . . $ GuiList_getSelectedPositions(21bc371a31941fa7). (GuiListcxx . . $ GuiList# me); |
| 730 | integercxx . . $ integer# GuiList_getTopPositioncxx . . $ GuiList_getTopPosition(699f1c5434bb2ea9). (GuiListcxx . . $ GuiList# me); |
| 731 | |
| 732 | /** |
| 733 | Inserts a new item into a GuiList at a given position. |
| 734 | @param me |
| 735 | The GuiList into which the new item is inserted. |
| 736 | @param itemText |
| 737 | The text of the new item. Cattable. |
| 738 | @param position |
| 739 | The position of the new item in the list after insertion. |
| 740 | A value of 1 therefore puts the new item at the top of the list. |
| 741 | A value of 0 is special: the item is put at the bottom of the list. |
| 742 | */ |
| 743 | void GuiList_insertItemcxx . . $ GuiList_insertItem(896610c612ff86cf). (GuiListcxx . . $ GuiList# me, conststring32cxx . . $ conststring32# itemText /* cattable */, integercxx . . $ integer# position); |
| 744 | |
| 745 | void GuiList_replaceItemcxx . . $ GuiList_replaceItem(896610c612ff86cf). (GuiListcxx . . $ GuiList# me, conststring32cxx . . $ conststring32# itemText /* cattable */, integercxx . . $ integer# position); |
| 746 | void GuiList_setTopPositioncxx . . $ GuiList_setTopPosition(f9b5f8b1da8fd2dd). (GuiListcxx . . $ GuiList# me, integercxx . . $ integer# topPosition); |
| 747 | void GuiList_selectItemcxx . . $ GuiList_selectItem(f9b5f8b1da8fd2dd). (GuiListcxx . . $ GuiList# me, integercxx . . $ integer# position); |
| 748 | void GuiList_setSelectionChangedCallbackcxx . . $ GuiList_setSelectionChangedCallback(4a4684c95b017ef2). (GuiListcxx . . $ GuiList# me, GuiList_SelectionChangedCallbackcxx . . $ GuiList_SelectionChangedCallback# callback, Thingcxx . . $ Thing# boss); |
| 749 | void GuiList_setDoubleClickCallbackcxx . . $ GuiList_setDoubleClickCallback(1ef636283ce6f16). (GuiListcxx . . $ GuiList# me, GuiList_DoubleClickCallbackcxx . . $ GuiList_DoubleClickCallback# callback, Thingcxx . . $ Thing# boss); |
| 750 | void GuiList_setScrollCallbackcxx . . $ GuiList_setScrollCallback(89a218c210a2f369). (GuiListcxx . . $ GuiList# me, GuiList_ScrollCallbackcxx . . $ GuiList_ScrollCallback# callback, Thingcxx . . $ Thing# boss); |
| 751 | |
| 752 | /********** GuiMenu **********/ |
| 753 | |
| 754 | Thing_declarecxx . . $ `sys/Thing.h:51:9`! (GuiMenuItem); |
| 755 | |
| 756 | Thing_definecxx . . $ constGuiMenu# (GuiMenu, GuiThing) { |
| 757 | autoGuiMenuItemcxx . . $ autoGuiMenuItem# d_menuItemcxx . . $ structGuiMenu#d_menuItem.; |
| 758 | autoGuiButtoncxx . . $ autoGuiButton# d_cascadeButtoncxx . . $ structGuiMenu#d_cascadeButton.; |
| 759 | #if gtkcxx . . $ `sys/Gui.h:33:10`! |
| 760 | GtkMenuItem *d_gtkMenuTitlecxx . . $ structGuiMenu#d_gtkMenuTitle.; |
| 761 | #elif cocoa |
| 762 | GuiCocoaMenu *d_cocoaMenu; |
| 763 | GuiCocoaMenuItem *d_cocoaMenuItem; |
| 764 | GuiCocoaMenuButton *d_cocoaMenuButton; |
| 765 | #elif motif |
| 766 | GuiObject d_xmMenuTitle; // in case the menu is in a menu bar |
| 767 | GuiObject d_xmMenuBar; // in case the menu is in a form |
| 768 | #endif |
| 769 | |
| 770 | void v_showcxx . . $ structGuiMenu#v_show(49f6e7a06ebc5aa8). () |
| 771 | override; |
| 772 | void v_hidecxx . . $ structGuiMenu#v_hide(49f6e7a06ebc5aa8). () |
| 773 | override; |
| 774 | void v_setSensitivecxx . . $ structGuiMenu#v_setSensitive(b45ddcbc8423892c). (bool sensitive) |
| 775 | override; |
| 776 | }; |
| 777 | |
| 778 | GuiMenucxx . . $ GuiMenu# GuiMenu_createInWindowcxx . . $ GuiMenu_createInWindow(cfd6777f6dee287d). (GuiWindowcxx . . $ GuiWindow# window, conststring32cxx . . $ conststring32# title, uint32cxx . . $ uint32# flags); |
| 779 | GuiMenucxx . . $ GuiMenu# GuiMenu_createInMenucxx . . $ GuiMenu_createInMenu(d27ae244131fab25). (GuiMenucxx . . $ GuiMenu# supermenu, conststring32cxx . . $ conststring32# title, uint32cxx . . $ uint32# flags); |
| 780 | GuiMenucxx . . $ GuiMenu# GuiMenu_createInFormcxx . . $ GuiMenu_createInForm(8f41118461509362). (GuiFormcxx . . $ GuiForm# form, int left, int right, int top, int bottom, conststring32cxx . . $ conststring32# title, uint32cxx . . $ uint32# flags); |
| 781 | |
| 782 | void GuiMenu_emptycxx . . $ GuiMenu_empty(3b1024a93bb93b13). (GuiMenucxx . . $ GuiMenu# me); |
| 783 | |
| 784 | /********** GuiMenuItem **********/ |
| 785 | |
| 786 | Thing_declarecxx . . $ mutableGuiMenuItem# (GuiMenuItem); |
| 787 | |
| 788 | typedef struct structGuiMenuItemEventcxx . . $ structGuiMenuItemEvent# { |
| 789 | GuiMenuItemcxx . . $ GuiMenuItem# menuItemcxx . . $ structGuiMenuItemEvent#menuItem.; |
| 790 | bool shiftKeyPressedcxx . . $ structGuiMenuItemEvent#shiftKeyPressed., commandKeyPressedcxx . . $ structGuiMenuItemEvent#commandKeyPressed., optionKeyPressedcxx . . $ structGuiMenuItemEvent#optionKeyPressed.; |
| 791 | } *GuiMenuItemEventcxx . . $ GuiMenuItemEvent#; |
| 792 | |
| 793 | using GuiMenuItemCallbackcxx . . $ GuiMenuItemCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiMenuItemEventcxx . . $ GuiMenuItemEvent#>; |
| 794 | |
| 795 | #if cocoacxx . . $ `sys/Gui.h:35:10`! |
| 796 | extern GuiMenuItemCallback theGuiEscapeMenuItemCallback; |
| 797 | extern Thing theGuiEscapeMenuItemBoss; |
| 798 | #endif |
| 799 | |
| 800 | Thing_definecxx . . $ structGuiMenuItem# (GuiMenuItem, GuiThing) { |
| 801 | GuiMenucxx . . $ GuiMenu# d_menucxx . . $ structGuiMenuItem#d_menu.; |
| 802 | GuiMenuItemCallbackcxx . . $ GuiMenuItemCallback# d_callbackcxx . . $ structGuiMenuItem#d_callback.; |
| 803 | Thingcxx . . $ Thing# d_bosscxx . . $ structGuiMenuItem#d_boss.; |
| 804 | #if gtkcxx . . $ `sys/Gui.h:33:10`! |
| 805 | bool d_callbackBlockedcxx . . $ structGuiMenuItem#d_callbackBlocked.; |
| 806 | #endif |
| 807 | }; |
| 808 | |
| 809 | /* Accelerators understood by GuiMenuItem: */ |
| 810 | #define GuiMenu_OPTIONcxx . . $ `sys/Gui.h:810:9`! (1 << 24) |
| 811 | #define GuiMenu_SHIFTcxx . . $ `sys/Gui.h:811:9`! (1 << 25) |
| 812 | #define GuiMenu_COMMANDcxx . . $ `sys/Gui.h:812:9`! (1 << 26) |
| 813 | #if cocoacxx . . $ `sys/Gui.h:35:10`! |
| 814 | #define GuiMenu_COMMAND_EXTRA (GuiMenu_OPTION | GuiMenu_COMMAND) /* standard on the Mac (where the keys are next to each other) */ |
| 815 | #else |
| 816 | #define GuiMenu_COMMAND_EXTRAcxx . . $ `sys/Gui.h:816:10`! (GuiMenu_SHIFT | GuiMenu_COMMAND) /* standard on Windows (where the keys are next to each other, *and* Ctrl-Alt can mean Alt-GR) */ |
| 817 | #endif |
| 818 | // 1 is the short form of GuiMenu_DEPTH_1 |
| 819 | // 2 is the short form of GuiMenu_DEPTH_2 |
| 820 | // 3 is the short form of GuiMenu_DEPTH_3 |
| 821 | #define GuiMenu_LEFT_ARROWcxx . . $ `sys/Gui.h:821:9`! 4 |
| 822 | #define GuiMenu_RIGHT_ARROWcxx . . $ `sys/Gui.h:822:9`! 5 |
| 823 | #define GuiMenu_UP_ARROWcxx . . $ `sys/Gui.h:823:9`! 6 |
| 824 | #define GuiMenu_DOWN_ARROWcxx . . $ `sys/Gui.h:824:9`! 7 |
| 825 | #define GuiMenu_PAUSEcxx . . $ `sys/Gui.h:825:9`! 8 |
| 826 | #define GuiMenu_DELETEcxx . . $ `sys/Gui.h:826:9`! 9 |
| 827 | #define GuiMenu_INSERTcxx . . $ `sys/Gui.h:827:9`! 10 |
| 828 | #define GuiMenu_BACKSPACEcxx . . $ `sys/Gui.h:828:9`! 11 |
| 829 | #define GuiMenu_TABcxx . . $ `sys/Gui.h:829:9`! 12 |
| 830 | #define GuiMenu_LINEFEEDcxx . . $ `sys/Gui.h:830:9`! 13 |
| 831 | #define GuiMenu_HOMEcxx . . $ `sys/Gui.h:831:9`! 14 |
| 832 | #define GuiMenu_ENDcxx . . $ `sys/Gui.h:832:9`! 15 |
| 833 | #define GuiMenu_ENTERcxx . . $ `sys/Gui.h:833:9`! 16 |
| 834 | #define GuiMenu_PAGE_UPcxx . . $ `sys/Gui.h:834:9`! 17 |
| 835 | #define GuiMenu_PAGE_DOWNcxx . . $ `sys/Gui.h:835:9`! 18 |
| 836 | #define GuiMenu_ESCAPEcxx . . $ `sys/Gui.h:836:9`! 19 |
| 837 | #define GuiMenu_F1cxx . . $ `sys/Gui.h:837:9`! 20 |
| 838 | #define GuiMenu_F2cxx . . $ `sys/Gui.h:838:9`! 21 |
| 839 | #define GuiMenu_F3cxx . . $ `sys/Gui.h:839:9`! 22 |
| 840 | #define GuiMenu_F4cxx . . $ `sys/Gui.h:840:9`! 23 |
| 841 | #define GuiMenu_F5cxx . . $ `sys/Gui.h:841:9`! 24 |
| 842 | #define GuiMenu_F6cxx . . $ `sys/Gui.h:842:9`! 25 |
| 843 | #define GuiMenu_F7cxx . . $ `sys/Gui.h:843:9`! 26 |
| 844 | #define GuiMenu_F8cxx . . $ `sys/Gui.h:844:9`! 27 |
| 845 | #define GuiMenu_F9cxx . . $ `sys/Gui.h:845:9`! 28 |
| 846 | #define GuiMenu_F10cxx . . $ `sys/Gui.h:846:9`! 29 |
| 847 | #define GuiMenu_F11cxx . . $ `sys/Gui.h:847:9`! 30 |
| 848 | #define GuiMenu_F12cxx . . $ `sys/Gui.h:848:9`! 31 |
| 849 | // or any ASCII character (preferably a letter or digit) between 32 and 126 |
| 850 | |
| 851 | /* Button layout and state understood by GuiMenuItem: */ |
| 852 | #define GuiMenu_INSENSITIVEcxx . . $ `sys/Gui.h:852:9`! (1 << 8) |
| 853 | #define GuiMenu_CHECKBUTTONcxx . . $ `sys/Gui.h:853:9`! (1 << 9) |
| 854 | #define GuiMenu_TOGGLE_ONcxx . . $ `sys/Gui.h:854:9`! (1 << 10) |
| 855 | #define GuiMenu_ATTRACTIVEcxx . . $ `sys/Gui.h:855:9`! (1 << 11) |
| 856 | #define GuiMenu_UNDERLINEDcxx . . $ `sys/Gui.h:856:9`! (1 << 12) |
| 857 | #define GuiMenu_RADIO_FIRSTcxx . . $ `sys/Gui.h:857:9`! (1 << 13) |
| 858 | #define GuiMenu_RADIO_NEXTcxx . . $ `sys/Gui.h:858:9`! (1 << 14) |
| 859 | #define GuiMenu_BUTTON_STATE_MASKcxx . . $ `sys/Gui.h:859:9`! (GuiMenu_INSENSITIVE|GuiMenu_CHECKBUTTON|GuiMenu_TOGGLE_ON|GuiMenu_ATTRACTIVE|GuiMenu_UNDERLINED|GuiMenu_RADIO_FIRST|GuiMenu_RADIO_NEXT) |
| 860 | |
| 861 | /* These are ingored by GuiMenu_addItem, but can be used by higher-level command logic: */ |
| 862 | #define GuiMenu_DEPTH_1cxx . . $ `sys/Gui.h:862:9`! 0x0001'0000 /* 1<<16 */ |
| 863 | #define GuiMenu_DEPTH_2cxx . . $ `sys/Gui.h:863:9`! 0x0002'0000 /* 1<<17 */ |
| 864 | #define GuiMenu_DEPTH_3cxx . . $ `sys/Gui.h:864:9`! 0x0003'0000 |
| 865 | #define GuiMenu_DEPTH_4cxx . . $ `sys/Gui.h:865:9`! 0x0004'0000 /* 1<<18 */ |
| 866 | #define GuiMenu_DEPTH_5cxx . . $ `sys/Gui.h:866:9`! 0x0005'0000 |
| 867 | #define GuiMenu_DEPTH_6cxx . . $ `sys/Gui.h:867:9`! 0x0006'0000 |
| 868 | #define GuiMenu_DEPTH_7cxx . . $ `sys/Gui.h:868:9`! 0x0007'0000 |
| 869 | #define GuiMenu_HIDDENcxx . . $ `sys/Gui.h:869:9`! 0x0008'0000 /* 1<<19 */ |
| 870 | #define GuiMenu_UNHIDABLEcxx . . $ `sys/Gui.h:870:9`! 0x0010'0000 /* 1<<20 */ |
| 871 | #define GuiMenu_NO_APIcxx . . $ `sys/Gui.h:871:9`! 0x0020'0000 /* 1<<21 */ |
| 872 | #define GuiMenu_FORCE_APIcxx . . $ `sys/Gui.h:872:9`! 0x0040'0000 /* 1<<22 */ |
| 873 | #define GuiMenu_DEPRECATEDcxx . . $ `sys/Gui.h:873:9`! (0x0080'0000 /* 1<<23 */ | GuiMenu_HIDDEN) |
| 874 | #define GuiMenu_DEPRECATED_2004cxx . . $ `sys/Gui.h:874:9`! (0x0400'0000 | GuiMenu_DEPRECATED) |
| 875 | #define GuiMenu_DEPRECATED_2005cxx . . $ `sys/Gui.h:875:9`! (0x0500'0000 | GuiMenu_DEPRECATED) |
| 876 | #define GuiMenu_DEPRECATED_2006cxx . . $ `sys/Gui.h:876:9`! (0x0600'0000 | GuiMenu_DEPRECATED) |
| 877 | #define GuiMenu_DEPRECATED_2007cxx . . $ `sys/Gui.h:877:9`! (0x0700'0000 | GuiMenu_DEPRECATED) |
| 878 | #define GuiMenu_DEPRECATED_2008cxx . . $ `sys/Gui.h:878:9`! (0x0800'0000 | GuiMenu_DEPRECATED) |
| 879 | #define GuiMenu_DEPRECATED_2009cxx . . $ `sys/Gui.h:879:9`! (0x0900'0000 | GuiMenu_DEPRECATED) |
| 880 | #define GuiMenu_DEPRECATED_2010cxx . . $ `sys/Gui.h:880:9`! (0x0A00'0000 | GuiMenu_DEPRECATED) |
| 881 | #define GuiMenu_DEPRECATED_2011cxx . . $ `sys/Gui.h:881:9`! (0x0B00'0000 | GuiMenu_DEPRECATED) |
| 882 | #define GuiMenu_DEPRECATED_2012cxx . . $ `sys/Gui.h:882:9`! (0x0C00'0000 | GuiMenu_DEPRECATED) |
| 883 | #define GuiMenu_DEPRECATED_2013cxx . . $ `sys/Gui.h:883:9`! (0x0D00'0000 | GuiMenu_DEPRECATED) |
| 884 | #define GuiMenu_DEPRECATED_2014cxx . . $ `sys/Gui.h:884:9`! (0x0E00'0000 | GuiMenu_DEPRECATED) |
| 885 | #define GuiMenu_DEPRECATED_2015cxx . . $ `sys/Gui.h:885:9`! (0x0F00'0000 | GuiMenu_DEPRECATED) |
| 886 | #define GuiMenu_DEPRECATED_2016cxx . . $ `sys/Gui.h:886:9`! (0x1000'0000 | GuiMenu_DEPRECATED) |
| 887 | #define GuiMenu_DEPRECATED_2017cxx . . $ `sys/Gui.h:887:9`! (0x1100'0000 | GuiMenu_DEPRECATED) |
| 888 | #define GuiMenu_DEPRECATED_2018cxx . . $ `sys/Gui.h:888:9`! (0x1200'0000 | GuiMenu_DEPRECATED) |
| 889 | #define GuiMenu_DEPRECATED_2019cxx . . $ `sys/Gui.h:889:9`! (0x1300'0000 | GuiMenu_DEPRECATED) |
| 890 | #define GuiMenu_DEPRECATED_2020cxx . . $ `sys/Gui.h:890:9`! (0x1400'0000 | GuiMenu_DEPRECATED) |
| 891 | #define GuiMenu_DEPRECATED_2021cxx . . $ `sys/Gui.h:891:9`! (0x1500'0000 | GuiMenu_DEPRECATED) |
| 892 | #define GuiMenu_DEPRECATED_2022cxx . . $ `sys/Gui.h:892:9`! (0x1600'0000 | GuiMenu_DEPRECATED) |
| 893 | #define GuiMenu_DEPRECATED_2023cxx . . $ `sys/Gui.h:893:9`! (0x1700'0000 | GuiMenu_DEPRECATED) |
| 894 | #define GuiMenu_DEPRECATED_2024cxx . . $ `sys/Gui.h:894:9`! (0x1800'0000 | GuiMenu_DEPRECATED) |
| 895 | #define GuiMenu_DEPRECATED_2025cxx . . $ `sys/Gui.h:895:9`! (0x1900'0000 | GuiMenu_DEPRECATED) |
| 896 | #define GuiMenu_DEPRECATED_2026cxx . . $ `sys/Gui.h:896:9`! (0x1A00'0000 | GuiMenu_DEPRECATED) |
| 897 | #define GuiMenu_DEPRECATED_2027cxx . . $ `sys/Gui.h:897:9`! (0x1B00'0000 | GuiMenu_DEPRECATED) |
| 898 | #define GuiMenu_DEPRECATED_2028cxx . . $ `sys/Gui.h:898:9`! (0x1C00'0000 | GuiMenu_DEPRECATED) |
| 899 | #define GuiMenu_DEPRECATED_2029cxx . . $ `sys/Gui.h:899:9`! (0x1D00'0000 | GuiMenu_DEPRECATED) |
| 900 | #define GuiMenu_DEPRECATED_2030cxx . . $ `sys/Gui.h:900:9`! (0x1E00'0000 | GuiMenu_DEPRECATED) |
| 901 | #define GuiMenu_DEPRECATED_2031cxx . . $ `sys/Gui.h:901:9`! (0x1F00'0000 | GuiMenu_DEPRECATED) |
| 902 | #define GuiMenu_DEPRECATED_2032cxx . . $ `sys/Gui.h:902:9`! (0x2000'0000 | GuiMenu_DEPRECATED) |
| 903 | #define GuiMenu_DEPRECATED_2033cxx . . $ `sys/Gui.h:903:9`! (0x2100'0000 | GuiMenu_DEPRECATED) |
| 904 | #define GuiMenu_DEPRECATED_2034cxx . . $ `sys/Gui.h:904:9`! (0x2200'0000 | GuiMenu_DEPRECATED) |
| 905 | #define GuiMenu_DEPRECATED_2035cxx . . $ `sys/Gui.h:905:9`! (0x2300'0000 | GuiMenu_DEPRECATED) |
| 906 | #define GuiMenu_DEPRECATED_2036cxx . . $ `sys/Gui.h:906:9`! (0x2400'0000 | GuiMenu_DEPRECATED) |
| 907 | #define GuiMenu_DEPRECATED_2037cxx . . $ `sys/Gui.h:907:9`! (0x2500'0000 | GuiMenu_DEPRECATED) |
| 908 | #define GuiMenu_DEPRECATED_2038cxx . . $ `sys/Gui.h:908:9`! (0x2600'0000 | GuiMenu_DEPRECATED) |
| 909 | #define GuiMenu_DEPRECATED_2039cxx . . $ `sys/Gui.h:909:9`! (0x2700'0000 | GuiMenu_DEPRECATED) |
| 910 | #define GuiMenu_DEPRECATED_2040cxx . . $ `sys/Gui.h:910:9`! (0x2800'0000 | GuiMenu_DEPRECATED) |
| 911 | #define GuiMenu_DEPRECATED_2041cxx . . $ `sys/Gui.h:911:9`! (0x2900'0000 | GuiMenu_DEPRECATED) |
| 912 | #define GuiMenu_DEPRECATED_2042cxx . . $ `sys/Gui.h:912:9`! (0x2A00'0000 | GuiMenu_DEPRECATED) |
| 913 | #define GuiMenu_DEPRECATED_2043cxx . . $ `sys/Gui.h:913:9`! (0x2B00'0000 | GuiMenu_DEPRECATED) |
| 914 | #define GuiMenu_DEPRECATED_2044cxx . . $ `sys/Gui.h:914:9`! (0x2C00'0000 | GuiMenu_DEPRECATED) |
| 915 | #define GuiMenu_DEPRECATED_2045cxx . . $ `sys/Gui.h:915:9`! (0x2D00'0000 | GuiMenu_DEPRECATED) |
| 916 | #define GuiMenu_DEPRECATED_2046cxx . . $ `sys/Gui.h:916:9`! (0x2E00'0000 | GuiMenu_DEPRECATED) |
| 917 | #define GuiMenu_DEPRECATED_2047cxx . . $ `sys/Gui.h:917:9`! (0x2F00'0000 | GuiMenu_DEPRECATED) |
| 918 | #define GuiMenu_DEPRECATED_2048cxx . . $ `sys/Gui.h:918:9`! (0x3000'0000 | GuiMenu_DEPRECATED) |
| 919 | #define GuiMenu_DEPRECATED_2049cxx . . $ `sys/Gui.h:919:9`! (0x3100'0000 | GuiMenu_DEPRECATED) |
| 920 | #define GuiMenu_DEPRECATED_2050cxx . . $ `sys/Gui.h:920:9`! (0x3200'0000 | GuiMenu_DEPRECATED) |
| 921 | #define GuiMenu_DEPRECATED_2051cxx . . $ `sys/Gui.h:921:9`! (0x3300'0000 | GuiMenu_DEPRECATED) |
| 922 | #define GuiMenu_DEPRECATED_2052cxx . . $ `sys/Gui.h:922:9`! (0x3400'0000 | GuiMenu_DEPRECATED) |
| 923 | #define GuiMenu_DEPRECATED_2053cxx . . $ `sys/Gui.h:923:9`! (0x3500'0000 | GuiMenu_DEPRECATED) |
| 924 | #define GuiMenu_DEPRECATED_2054cxx . . $ `sys/Gui.h:924:9`! (0x3600'0000 | GuiMenu_DEPRECATED) |
| 925 | #define GuiMenu_DEPRECATED_2055cxx . . $ `sys/Gui.h:925:9`! (0x3700'0000 | GuiMenu_DEPRECATED) |
| 926 | #define GuiMenu_DEPRECATED_2056cxx . . $ `sys/Gui.h:926:9`! (0x3800'0000 | GuiMenu_DEPRECATED) |
| 927 | #define GuiMenu_DEPRECATED_2057cxx . . $ `sys/Gui.h:927:9`! (0x3900'0000 | GuiMenu_DEPRECATED) |
| 928 | #define GuiMenu_DEPRECATED_2058cxx . . $ `sys/Gui.h:928:9`! (0x3A00'0000 | GuiMenu_DEPRECATED) |
| 929 | #define GuiMenu_DEPRECATED_2059cxx . . $ `sys/Gui.h:929:9`! (0x3B00'0000 | GuiMenu_DEPRECATED) |
| 930 | #define GuiMenu_DEPRECATED_2060cxx . . $ `sys/Gui.h:930:9`! (0x3C00'0000 | GuiMenu_DEPRECATED) |
| 931 | #define GuiMenu_DEPRECATED_2061cxx . . $ `sys/Gui.h:931:9`! (0x3D00'0000 | GuiMenu_DEPRECATED) |
| 932 | #define GuiMenu_DEPRECATED_2062cxx . . $ `sys/Gui.h:932:9`! (0x3E00'0000 | GuiMenu_DEPRECATED) |
| 933 | #define GuiMenu_DEPRECATED_2063cxx . . $ `sys/Gui.h:933:9`! (0x3F00'0000 | GuiMenu_DEPRECATED) |
| 934 | #define GuiMenu_DEPRECATED_2064cxx . . $ `sys/Gui.h:934:9`! (0x4000'0000 | GuiMenu_DEPRECATED) |
| 935 | #define GuiMenu_DEPRECATED_2065cxx . . $ `sys/Gui.h:935:9`! (0x4100'0000 | GuiMenu_DEPRECATED) |
| 936 | #define GuiMenu_DEPRECATED_2066cxx . . $ `sys/Gui.h:936:9`! (0x4200'0000 | GuiMenu_DEPRECATED) |
| 937 | |
| 938 | GuiMenuItemcxx . . $ GuiMenuItem# GuiMenu_addItemcxx . . $ GuiMenu_addItem(c4b605a971e4b555). (GuiMenucxx . . $ GuiMenu# menu, conststring32cxx . . $ conststring32# title, uint32cxx . . $ uint32# flags, |
| 939 | GuiMenuItemCallbackcxx . . $ GuiMenuItemCallback# callback, Thingcxx . . $ Thing# boss); |
| 940 | /* Flags is a combination of the above defines (both layout and accelerators). */ |
| 941 | GuiMenuItemcxx . . $ GuiMenuItem# GuiMenu_addSeparatorcxx . . $ GuiMenu_addSeparator(d5bd5aafbfbb56aa). (GuiMenucxx . . $ GuiMenu# menu); |
| 942 | |
| 943 | void GuiMenuItem_checkcxx . . $ GuiMenuItem_check(9c76b7451f460a69). (GuiMenuItemcxx . . $ GuiMenuItem# me, bool check); |
| 944 | void GuiMenuItem_setTextcxx . . $ GuiMenuItem_setText(ca20014d6c2b902c). (GuiMenuItemcxx . . $ GuiMenuItem# me, conststring32cxx . . $ conststring32# text); |
| 945 | |
| 946 | /********** GuiOptionMenu **********/ |
| 947 | |
| 948 | Thing_definecxx . . $ autoGuiOptionMenu# (GuiOptionMenu, GuiControl) { |
| 949 | int d_valuecxx . . $ structGuiOptionMenu#d_value.; |
| 950 | OrderedOfcxx . . $ OrderedOf#<structGuiMenuItemcxx . . $ structGuiMenuItem#> d_optionscxx . . $ structGuiOptionMenu#d_options.; |
| 951 | #if gtkcxx . . $ `sys/Gui.h:33:10`! |
| 952 | //GtkComboBox *d_gtkCascadeButton; |
| 953 | #elif cocoa |
| 954 | #elif motif |
| 955 | GuiObject d_xmMenuBar, d_xmCascadeButton; |
| 956 | #endif |
| 957 | |
| 958 | void v_showcxx . . $ structGuiOptionMenu#v_show(49f6e7a06ebc5aa8). () |
| 959 | override; |
| 960 | }; |
| 961 | |
| 962 | void GuiOptionMenu_initcxx . . $ GuiOptionMenu_init(4af4a830f4edfcb4). (GuiOptionMenucxx . . $ GuiOptionMenu# me, GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, uint32cxx . . $ uint32# flags); |
| 963 | GuiOptionMenucxx . . $ GuiOptionMenu# GuiOptionMenu_createcxx . . $ GuiOptionMenu_create(10957ba5007081ba). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, uint32cxx . . $ uint32# flags); |
| 964 | GuiOptionMenucxx . . $ GuiOptionMenu# GuiOptionMenu_createShowncxx . . $ GuiOptionMenu_createShown(10957ba5007081ba). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, uint32cxx . . $ uint32# flags); |
| 965 | |
| 966 | void GuiOptionMenu_addOptioncxx . . $ GuiOptionMenu_addOption(fceebdf82f762738). (GuiOptionMenucxx . . $ GuiOptionMenu# me, conststring32cxx . . $ conststring32# text); |
| 967 | int GuiOptionMenu_getValuecxx . . $ GuiOptionMenu_getValue(946f35f31f8751a1). (GuiOptionMenucxx . . $ GuiOptionMenu# me); |
| 968 | void GuiOptionMenu_setValuecxx . . $ GuiOptionMenu_setValue(cf6045fb1035e11f). (GuiOptionMenucxx . . $ GuiOptionMenu# me, int value); |
| 969 | |
| 970 | /********** GuiProgressBar **********/ |
| 971 | |
| 972 | Thing_declarecxx . . $ GuiProgressBarHandle# (GuiProgressBar); |
| 973 | |
| 974 | Thing_definecxx . . $ ClassInfo# (GuiProgressBar, GuiControl) { |
| 975 | #if cocoacxx . . $ `sys/Gui.h:35:10`! |
| 976 | GuiCocoaProgressBar *d_cocoaProgressBar; |
| 977 | #endif |
| 978 | }; |
| 979 | |
| 980 | GuiProgressBarcxx . . $ GuiProgressBar# GuiProgressBar_createcxx . . $ GuiProgressBar_create(4389e933ae743354). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, uint32cxx . . $ uint32# flags); |
| 981 | GuiProgressBarcxx . . $ GuiProgressBar# GuiProgressBar_createShowncxx . . $ GuiProgressBar_createShown(4389e933ae743354). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, uint32cxx . . $ uint32# flags); |
| 982 | |
| 983 | void GuiProgressBar_setValuecxx . . $ GuiProgressBar_setValue(3b26fd3168755f19). (GuiProgressBarcxx . . $ GuiProgressBar# me, double value); // between 0.0 and 1.0 |
| 984 | |
| 985 | /********** GuiRadioButton **********/ |
| 986 | |
| 987 | Thing_declarecxx . . $ GuiRadioButton# (GuiRadioButton); |
| 988 | |
| 989 | typedef struct structGuiRadioButtonEventcxx . . $ structGuiRadioButtonEvent# { |
| 990 | GuiRadioButtoncxx . . $ GuiRadioButton# togglecxx . . $ structGuiRadioButtonEvent#toggle.; |
| 991 | int positioncxx . . $ structGuiRadioButtonEvent#position.; |
| 992 | } *GuiRadioButtonEventcxx . . $ GuiRadioButtonEvent#; |
| 993 | |
| 994 | using GuiRadioButtonCallbackcxx . . $ GuiRadioButtonCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiRadioButtonEventcxx . . $ GuiRadioButtonEvent#>; |
| 995 | |
| 996 | Thing_definecxx . . $ classGuiRadioButton. (GuiRadioButton, GuiControl) { |
| 997 | GuiRadioButtoncxx . . $ GuiRadioButton# d_previouscxx . . $ structGuiRadioButton#d_previous., d_nextcxx . . $ structGuiRadioButton#d_next.; // there's a linked list of grouped radio buttons |
| 998 | GuiRadioButtonCallbackcxx . . $ GuiRadioButtonCallback# d_valueChangedCallbackcxx . . $ structGuiRadioButton#d_valueChangedCallback.; |
| 999 | Thingcxx . . $ Thing# d_valueChangedBosscxx . . $ structGuiRadioButton#d_valueChangedBoss.; |
| 1000 | #if cocoacxx . . $ `sys/Gui.h:35:10`! |
| 1001 | GuiCocoaRadioButton *d_cocoaRadioButton; |
| 1002 | #endif |
| 1003 | }; |
| 1004 | |
| 1005 | /* GuiRadioButton creation flags: */ |
| 1006 | #define GuiRadioButton_SETcxx . . $ `sys/Gui.h:1006:9`! 1 |
| 1007 | #define GuiRadioButton_INSENSITIVEcxx . . $ `sys/Gui.h:1007:9`! 2 |
| 1008 | GuiRadioButtoncxx . . $ GuiRadioButton# GuiRadioButton_createcxx . . $ GuiRadioButton_create(6b1e2d4d89108d7e). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, |
| 1009 | conststring32cxx . . $ conststring32# buttonText, GuiRadioButtonCallbackcxx . . $ GuiRadioButtonCallback# valueChangedCallback, Thingcxx . . $ Thing# valueChangedBoss, uint32cxx . . $ uint32# flags); |
| 1010 | GuiRadioButtoncxx . . $ GuiRadioButton# GuiRadioButton_createShowncxx . . $ GuiRadioButton_createShown(6b1e2d4d89108d7e). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, |
| 1011 | conststring32cxx . . $ conststring32# buttonText, GuiRadioButtonCallbackcxx . . $ GuiRadioButtonCallback# valueChangedCallback, Thingcxx . . $ Thing# valueChangedBoss, uint32cxx . . $ uint32# flags); |
| 1012 | |
| 1013 | void GuiRadioGroup_begincxx . . $ GuiRadioGroup_begin(49f6e7a06ebc5aa8). (); |
| 1014 | void GuiRadioGroup_endcxx . . $ GuiRadioGroup_end(49f6e7a06ebc5aa8). (); |
| 1015 | |
| 1016 | bool GuiRadioButton_getValuecxx . . $ GuiRadioButton_getValue(529b6fd83844103f). (GuiRadioButtoncxx . . $ GuiRadioButton# me); |
| 1017 | void GuiRadioButton_setcxx . . $ GuiRadioButton_set(669e3d212ae3e4fb). (GuiRadioButtoncxx . . $ GuiRadioButton# me); |
| 1018 | |
| 1019 | /********** GuiScale **********/ |
| 1020 | |
| 1021 | Thing_declarecxx . . $ autoSomeThing# (GuiScale); |
| 1022 | |
| 1023 | Thing_definecxx . . $ structGuiScale# (GuiScale, GuiControl) { public: |
| 1024 | #if cocoacxx . . $ `sys/Gui.h:35:10`! |
| 1025 | GuiCocoaScale *d_cocoaScale; |
| 1026 | #endif |
| 1027 | }; |
| 1028 | |
| 1029 | GuiScalecxx . . $ GuiScale# GuiScale_createcxx . . $ GuiScale_create(daad5ee70c84b419). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, |
| 1030 | int minimum, int maximum, int value, uint32cxx . . $ uint32# flags); |
| 1031 | GuiScalecxx . . $ GuiScale# GuiScale_createShowncxx . . $ GuiScale_createShown(daad5ee70c84b419). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, |
| 1032 | int minimum, int maximum, int value, uint32cxx . . $ uint32# flags); |
| 1033 | |
| 1034 | int GuiScale_getValuecxx . . $ GuiScale_getValue(e3834f5e4ed16300). (GuiScalecxx . . $ GuiScale# me); |
| 1035 | void GuiScale_setValuecxx . . $ GuiScale_setValue(f95d34e17396363e). (GuiScalecxx . . $ GuiScale# me, int value); |
| 1036 | |
| 1037 | /********** GuiScrollBar **********/ |
| 1038 | |
| 1039 | Thing_declarecxx . . $ GuiScrollBar# (GuiScrollBar); |
| 1040 | |
| 1041 | typedef struct structGuiScrollBarEventcxx . . $ structGuiScrollBarEvent# { |
| 1042 | GuiScrollBarcxx . . $ GuiScrollBar# scrollBarcxx . . $ structGuiScrollBarEvent#scrollBar.; |
| 1043 | } *GuiScrollBarEventcxx . . $ GuiScrollBarEvent#; |
| 1044 | |
| 1045 | using GuiScrollBarCallbackcxx . . $ GuiScrollBarCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiScrollBarEventcxx . . $ GuiScrollBarEvent#>; |
| 1046 | |
| 1047 | Thing_definecxx . . $ mutableGuiScrollBar# (GuiScrollBar, GuiControl) { |
| 1048 | GuiScrollBarCallbackcxx . . $ GuiScrollBarCallback# d_valueChangedCallbackcxx . . $ structGuiScrollBar#d_valueChangedCallback.; |
| 1049 | Thingcxx . . $ Thing# d_valueChangedBosscxx . . $ structGuiScrollBar#d_valueChangedBoss.; |
| 1050 | }; |
| 1051 | |
| 1052 | /* GuiScrollBar creation flags: */ |
| 1053 | #define GuiScrollBar_HORIZONTALcxx . . $ `sys/Gui.h:1053:9`! 1 |
| 1054 | GuiScrollBarcxx . . $ GuiScrollBar# GuiScrollBar_createcxx . . $ GuiScrollBar_create(571c696f46086cf0). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, |
| 1055 | double minimum, double maximum, double value, double sliderSize, double increment, double pageIncrement, |
| 1056 | GuiScrollBarCallbackcxx . . $ GuiScrollBarCallback# valueChangedCallback, Thingcxx . . $ Thing# valueChangedBoss, uint32cxx . . $ uint32# flags); |
| 1057 | GuiScrollBarcxx . . $ GuiScrollBar# GuiScrollBar_createShowncxx . . $ GuiScrollBar_createShown(571c696f46086cf0). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, |
| 1058 | double minimum, double maximum, double value, double sliderSize, double increment, double pageIncrement, |
| 1059 | GuiScrollBarCallbackcxx . . $ GuiScrollBarCallback# valueChangedCallback, Thingcxx . . $ Thing# valueChangedBoss, uint32cxx . . $ uint32# flags); |
| 1060 | |
| 1061 | double GuiScrollBar_getValuecxx . . $ GuiScrollBar_getValue(fa861a4bcb1a88a7). (GuiScrollBarcxx . . $ GuiScrollBar# me); |
| 1062 | double GuiScrollBar_getSliderSizecxx . . $ GuiScrollBar_getSliderSize(fa861a4bcb1a88a7). (GuiScrollBarcxx . . $ GuiScrollBar# me); |
| 1063 | void GuiScrollBar_setcxx . . $ GuiScrollBar_set(bfc251e32db14223). (GuiScrollBarcxx . . $ GuiScrollBar# me, double minimum, double maximum, double value, |
| 1064 | double sliderSize, double increment, double pageIncrement); |
| 1065 | |
| 1066 | /********** GuiScrolledWindow **********/ |
| 1067 | |
| 1068 | Thing_declarecxx . . $ SomeThingHandle# (GuiScrolledWindow); |
| 1069 | |
| 1070 | Thing_definecxx . . $ GuiScrolledWindow# (GuiScrolledWindow, GuiControl) { public: |
| 1071 | }; |
| 1072 | |
| 1073 | GuiScrolledWindowcxx . . $ GuiScrolledWindow# GuiScrolledWindow_createcxx . . $ GuiScrolledWindow_create(b656dcfd6320237e). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, |
| 1074 | int horizontalScrollbarPersistence, int verticalScrollbarPersistence, uint32cxx . . $ uint32# flags); |
| 1075 | GuiScrolledWindowcxx . . $ GuiScrolledWindow# GuiScrolledWindow_createShowncxx . . $ GuiScrolledWindow_createShown(b656dcfd6320237e). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, |
| 1076 | int horizontalScrollbarPersistence, int verticalScrollbarPersistence, uint32cxx . . $ uint32# flags); |
| 1077 | |
| 1078 | /********** GuiText **********/ |
| 1079 | |
| 1080 | Thing_declarecxx . . $ SomeThingHandle# (GuiText); |
| 1081 | |
| 1082 | typedef struct structGuiTextEventcxx . . $ structGuiTextEvent# { |
| 1083 | GuiTextcxx . . $ GuiText# textcxx . . $ structGuiTextEvent#text.; |
| 1084 | } *GuiTextEventcxx . . $ GuiTextEvent#; |
| 1085 | |
| 1086 | using GuiText_ChangedCallbackcxx . . $ GuiText_ChangedCallback# = MelderCallbackcxx . . $ MelderCallback# <void, structThingcxx . . $ structThing# /* boss */, GuiTextEventcxx . . $ GuiTextEvent#>; |
| 1087 | |
| 1088 | #if gtkcxx . . $ `sys/Gui.h:33:10`! |
| 1089 | typedef gchar * history_datacxx . . $ history_data#; |
| 1090 | #else |
| 1091 | typedef char * history_data; |
| 1092 | #endif |
| 1093 | |
| 1094 | struct history_entrycxx . . $ history_entry# { |
| 1095 | history_entrycxx . . $ history_entry# *prevcxx . . $ history_entry#prev., *nextcxx . . $ history_entry#next.; |
| 1096 | integercxx . . $ integer# firstcxx . . $ history_entry#first., lastcxx . . $ history_entry#last.; |
| 1097 | history_datacxx . . $ history_data# textcxx . . $ history_entry#text.; |
| 1098 | bool type_delcxx . . $ history_entry#type_del. : 1; |
| 1099 | }; |
| 1100 | |
| 1101 | Thing_definecxx . . $ mutableGuiText# (GuiText, GuiControl) { |
| 1102 | GuiText_ChangedCallbackcxx . . $ GuiText_ChangedCallback# d_changedCallbackcxx . . $ structGuiText#d_changedCallback.; |
| 1103 | Thingcxx . . $ Thing# d_changedBosscxx . . $ structGuiText#d_changedBoss.; |
| 1104 | uint32cxx . . $ uint32# flagscxx . . $ structGuiText#flags.; |
| 1105 | #if cocoacxx . . $ `sys/Gui.h:35:10`! |
| 1106 | GuiCocoaScrolledWindow *d_cocoaScrollView; |
| 1107 | GuiCocoaTextView *d_cocoaTextView; |
| 1108 | double d_macFontSize; |
| 1109 | #elif defined (macintosh) |
| 1110 | TXNObject d_macMlteObject; |
| 1111 | TXNFrameID d_macMlteFrameId; |
| 1112 | #else |
| 1113 | history_entrycxx . . $ history_entry# *d_prevcxx . . $ structGuiText#d_prev., *d_nextcxx . . $ structGuiText#d_next.; |
| 1114 | GuiMenuItemcxx . . $ GuiMenuItem# d_undo_itemcxx . . $ structGuiText#d_undo_item., d_redo_itemcxx . . $ structGuiText#d_redo_item.; |
| 1115 | bool d_history_changecxx . . $ structGuiText#d_history_change. : 1; |
| 1116 | #endif |
| 1117 | #if motifcxx . . $ `sys/Gui.h:34:10`! |
| 1118 | bool d_editable; |
| 1119 | #endif |
| 1120 | }; |
| 1121 | |
| 1122 | /* GuiText creation flags: */ |
| 1123 | #define GuiText_SCROLLEDcxx . . $ `sys/Gui.h:1123:9`! 1 |
| 1124 | #define GuiText_CHARWRAPcxx . . $ `sys/Gui.h:1124:9`! 2 |
| 1125 | #define GuiText_INKWRAPcxx . . $ `sys/Gui.h:1125:9`! 4 |
| 1126 | #define GuiText_ANYWRAPcxx . . $ `sys/Gui.h:1126:9`! (GuiText_CHARWRAP | GuiText_INKWRAP) |
| 1127 | #define GuiText_NONEDITABLEcxx . . $ `sys/Gui.h:1127:9`! 8 |
| 1128 | GuiTextcxx . . $ GuiText# GuiText_createcxx . . $ GuiText_create(8bcb1f2be7fc31ee). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, uint32cxx . . $ uint32# flags); |
| 1129 | GuiTextcxx . . $ GuiText# GuiText_createShowncxx . . $ GuiText_createShown(8bcb1f2be7fc31ee). (GuiFormcxx . . $ GuiForm# parent, int left, int right, int top, int bottom, uint32cxx . . $ uint32# flags); |
| 1130 | |
| 1131 | void GuiText_copycxx . . $ GuiText_copy(9d8ddf5c89937cf2). (GuiTextcxx . . $ GuiText# me); |
| 1132 | void GuiText_cutcxx . . $ GuiText_cut(9d8ddf5c89937cf2). (GuiTextcxx . . $ GuiText# me); |
| 1133 | autostring32cxx . . $ autostring32# GuiText_getSelectioncxx . . $ GuiText_getSelection(9a61f82c13ba8ebc). (GuiTextcxx . . $ GuiText# me); |
| 1134 | autostring32cxx . . $ autostring32# GuiText_getStringcxx . . $ GuiText_getString(9a61f82c13ba8ebc). (GuiTextcxx . . $ GuiText# me); |
| 1135 | autostring32cxx . . $ autostring32# GuiText_getStringAndSelectionPositioncxx . . $ GuiText_getStringAndSelectionPosition(2d4f5aac9640119d). (GuiTextcxx . . $ GuiText# me, integercxx . . $ integer# *first, integercxx . . $ integer# *last); |
| 1136 | void GuiText_pastecxx . . $ GuiText_paste(9d8ddf5c89937cf2). (GuiTextcxx . . $ GuiText# me); |
| 1137 | void GuiText_redocxx . . $ GuiText_redo(9d8ddf5c89937cf2). (GuiTextcxx . . $ GuiText# me); |
| 1138 | void GuiText_removecxx . . $ GuiText_remove(9d8ddf5c89937cf2). (GuiTextcxx . . $ GuiText# me); |
| 1139 | void GuiText_replacecxx . . $ GuiText_replace(27ef96c8abc2c4e2). (GuiTextcxx . . $ GuiText# me, integercxx . . $ integer# from_pos, integercxx . . $ integer# to_pos, conststring32cxx . . $ conststring32# value); |
| 1140 | void GuiText_scrollToSelectioncxx . . $ GuiText_scrollToSelection(9d8ddf5c89937cf2). (GuiTextcxx . . $ GuiText# me); |
| 1141 | void GuiText_setChangedCallbackcxx . . $ GuiText_setChangedCallback(1197bbfc2caa0b9d). (GuiTextcxx . . $ GuiText# me, GuiText_ChangedCallbackcxx . . $ GuiText_ChangedCallback# changedCallback, Thingcxx . . $ Thing# changedBoss); |
| 1142 | void GuiText_setFontSizecxx . . $ GuiText_setFontSize(c15d57e615da0df1). (GuiTextcxx . . $ GuiText# me, double size); |
| 1143 | void GuiText_setRedoItemcxx . . $ GuiText_setRedoItem(fe305b70bc020e42). (GuiTextcxx . . $ GuiText# me, GuiMenuItemcxx . . $ GuiMenuItem# item); |
| 1144 | void GuiText_setSelectioncxx . . $ GuiText_setSelection(e06f404191ddd8ec). (GuiTextcxx . . $ GuiText# me, integercxx . . $ integer# first, integercxx . . $ integer# last); |
| 1145 | void GuiText_setStringcxx . . $ GuiText_setString(d44acbd60ea2b9be). (GuiTextcxx . . $ GuiText# me, conststring32cxx . . $ conststring32# text, bool undoable = true); |
| 1146 | void GuiText_setUndoItemcxx . . $ GuiText_setUndoItem(fe305b70bc020e42). (GuiTextcxx . . $ GuiText# me, GuiMenuItemcxx . . $ GuiMenuItem# item); |
| 1147 | void GuiText_undocxx . . $ GuiText_undo(9d8ddf5c89937cf2). (GuiTextcxx . . $ GuiText# me); |
| 1148 | |
| 1149 | /********** GuiWindow **********/ |
| 1150 | |
| 1151 | Thing_definecxx . . $ SomeThingHandle# (GuiWindow, GuiShell) { |
| 1152 | #if gtkcxx . . $ `sys/Gui.h:33:10`! |
| 1153 | GtkMenuBar *d_gtkMenuBarcxx . . $ structGuiWindow#d_gtkMenuBar.; |
| 1154 | #elif cocoa |
| 1155 | int d_menuBarWidth; |
| 1156 | GuiMenuItemCallback d_tabCallback; |
| 1157 | Thing d_tabBoss; |
| 1158 | GuiMenuItemCallback d_shiftTabCallback; |
| 1159 | Thing d_shiftTabBoss; |
| 1160 | GuiMenuItemCallback d_enterCallback; |
| 1161 | Thing d_enterBoss; |
| 1162 | GuiMenuItemCallback d_optionBackspaceCallback; |
| 1163 | Thing d_optionBackspaceBoss; |
| 1164 | GuiMenuItemCallback d_escapeCallback; |
| 1165 | Thing d_escapeBoss; |
| 1166 | #elif motif |
| 1167 | GuiObject d_xmMenuBar; |
| 1168 | #endif |
| 1169 | }; |
| 1170 | |
| 1171 | /* GuiWindow creation flags: */ |
| 1172 | #define GuiWindow_FULLSCREENcxx . . $ `sys/Gui.h:1172:9`! 1 |
| 1173 | GuiWindowcxx . . $ GuiWindow# GuiWindow_createcxx . . $ GuiWindow_create(f24bfc1968593561). (int x, int y, int width, int height, int minimumWidth, int minimumHeight, |
| 1174 | conststring32cxx . . $ conststring32# title /* cattable */, GuiShell_GoAwayCallbackcxx . . $ GuiShell_GoAwayCallback# goAwayCallback, Thingcxx . . $ Thing# goAwayBoss, uint32cxx . . $ uint32# flags); |
| 1175 | // returns a Form widget that has a new Shell parent. |
| 1176 | |
| 1177 | void GuiWindow_addMenuBarcxx . . $ GuiWindow_addMenuBar(20efc9fbfef198b1). (GuiWindowcxx . . $ GuiWindow# me); |
| 1178 | bool GuiWindow_setDirtycxx . . $ GuiWindow_setDirty(aed7644c12df6ab). (GuiWindowcxx . . $ GuiWindow# me, bool dirty); |
| 1179 | /* |
| 1180 | Purpose: on OSX you get a little dot in the red close button, |
| 1181 | and the window proxy icon dims. |
| 1182 | Return value: |
| 1183 | `true` if the system supports this feature, `false` if not; |
| 1184 | the point of this is that you can use a different user feedback strategy, like appending |
| 1185 | the text "(modified)" to the window title, if this feature is not supported. |
| 1186 | */ |
| 1187 | void GuiWindow_setFilecxx . . $ GuiWindow_setFile(77e728cca8ff1814). (GuiWindowcxx . . $ GuiWindow# me, MelderFilecxx . . $ MelderFile# file); |
| 1188 | /* |
| 1189 | Purpose: set the window title, and (on MacOS X) the window proxy icon and the window path menu. |
| 1190 | */ |
| 1191 | |
| 1192 | void GuiObject_destroycxx . . $ GuiObject_destroy(5d22bdacc48458e8). (GuiObjectcxx . . $ GuiObject# me); |
| 1193 | |
| 1194 | /********** EVENTS **********/ |
| 1195 | |
| 1196 | #if defined (macintosh) |
| 1197 | void Gui_setOpenDocumentCallback (void (*openDocumentCallback) (MelderFile file), void (*finishedOpeningDocumentsCallback) ()); |
| 1198 | #endif |
| 1199 | |
| 1200 | void Gui_setQuitApplicationCallbackcxx . . $ Gui_setQuitApplicationCallback(964b12a25712bdc3). (void (*quitApplicationCallback) ()); |
| 1201 | void Gui_runQuitApplicationCallbackcxx . . $ Gui_runQuitApplicationCallback(49f6e7a06ebc5aa8). (); |
| 1202 | |
| 1203 | extern uintegercxx . . $ uinteger# theGuiTopLowAcceleratorscxx . . $ theGuiTopLowAccelerators. [8]; |
| 1204 | |
| 1205 | /* |
| 1206 | 'parent' is the top-level widget. |
| 1207 | */ |
| 1208 | void Gui_injectMessageProcscxx . . $ Gui_injectMessageProcs(20efc9fbfef198b1). (GuiWindowcxx . . $ GuiWindow# parent); |
| 1209 | |
| 1210 | /* End of file Gui.h */ |
| 1211 | #endif |