void praat_showLogo (int autoPopDown) { #if gtk static const gchar *authors [3] = { "Paul Boersma", "David Weenink", NULL }; GuiObject dialog = gtk_about_dialog_new (); #define xstr(s) str(s) #define str(s) #s gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (dialog), xstr (PRAAT_VERSION_STR)); gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (dialog), "Copyright © 1992–" xstr(PRAAT_YEAR) " by Paul Boersma and David Weenink"); gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (dialog), "GPL"); gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), "http://www.praat.org"); //gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (dialog), authors); g_signal_connect (GTK_DIALOG (dialog), "response", G_CALLBACK (gtk_widget_destroy), NULL); gtk_dialog_run (GTK_DIALOG (dialog)); #else if (theCurrentPraatApplication -> batch || ! theLogo.draw) return; if (! theLogo.dia) { int width = theLogo.width_mm / 25.4 * Gui_getResolution (NULL); int height = theLogo.height_mm / 25.4 * Gui_getResolution (NULL); theLogo.dia = GuiDialog_create (theCurrentPraatApplication -> topShell, 100, 100, width, height, U"About", gui_cb_goAway, NULL, 0); theLogo.form = theLogo.dia; theLogo.drawingArea = GuiDrawingArea_createShown (theLogo.form, 0, width, 0, height, gui_drawingarea_cb_expose, gui_drawingarea_cb_click, NULL, NULL, NULL, 0); } GuiThing_show (theLogo.form); GuiThing_show (theLogo.dia); #if motif if (autoPopDown) GuiAddTimeOut (2000, logo_timeOut, (XtPointer) NULL); #endif #endif }
void structArtwordEditor :: v_createChildren () { int dy = Machine_getMenuBarHeight (); GuiLabel_createShown (d_windowForm, 40, 100, dy + 3, dy + 3 + Gui_LABEL_HEIGHT, L"Targets:", 0); GuiLabel_createShown (d_windowForm, 5, 65, dy + 20, dy + 20 + Gui_LABEL_HEIGHT, L"Times:", 0); GuiLabel_createShown (d_windowForm, 80, 140, dy + 20, dy + 20 + Gui_LABEL_HEIGHT, L"Values:", 0); list = GuiList_createShown (d_windowForm, 0, 140, dy + 40, dy + 340, true, NULL); GuiButton_createShown (d_windowForm, 10, 130, dy + 410, dy + 410 + Gui_PUSHBUTTON_HEIGHT, L"Remove target", gui_button_cb_removeTarget, this, 0); drawingArea = GuiDrawingArea_createShown (d_windowForm, 170, 470, dy + 10, dy + 310, gui_drawingarea_cb_expose, gui_drawingarea_cb_click, NULL, NULL, this, 0); GuiLabel_createShown (d_windowForm, 220, 270, dy + 340, dy + 340 + Gui_LABEL_HEIGHT, L"Time:", 0); time = GuiText_createShown (d_windowForm, 270, 370, dy + 340, dy + 340 + Gui_TEXTFIELD_HEIGHT, 0); GuiLabel_createShown (d_windowForm, 220, 270, dy + 370, dy + 370 + Gui_LABEL_HEIGHT, L"Value:", 0); value = GuiText_createShown (d_windowForm, 270, 370, dy + 370, dy + 370 + Gui_TEXTFIELD_HEIGHT, 0); GuiButton_createShown (d_windowForm, 240, 360, dy + 410, dy + 410 + Gui_PUSHBUTTON_HEIGHT, L"Add target", gui_button_cb_addTarget, this, GuiButton_DEFAULT); dy = Machine_getMenuBarHeight (); GuiRadioGroup_begin (); for (int i = 1; i <= kArt_muscle_MAX; i ++) { button [i] = GuiRadioButton_createShown (d_windowForm, 480, 0, dy, dy + Gui_RADIOBUTTON_HEIGHT, kArt_muscle_getText (i), gui_radiobutton_cb_toggle, this, 0); dy += Gui_RADIOBUTTON_HEIGHT + Gui_RADIOBUTTON_SPACING - 2; } GuiRadioGroup_end (); feature = 1; GuiRadioButton_set (button [feature]); }
void structTableEditor :: v_createChildren () { Table table = static_cast<Table> (data); int y = Machine_getMenuBarHeight () + 4, scrollWidth = Machine_getScrollBarWidth (); our text = GuiText_createShown (our d_windowForm, 0, 0, y, y + Machine_getTextHeight (), 0); GuiText_setChangedCallback (our text, gui_text_cb_changed, this); y += Machine_getTextHeight () + 4; our drawingArea = GuiDrawingArea_createShown (our d_windowForm, 0, - scrollWidth, y, - scrollWidth, gui_drawingarea_cb_expose, gui_drawingarea_cb_click, NULL, gui_drawingarea_cb_resize, this, 0); our verticalScrollBar = GuiScrollBar_createShown (our d_windowForm, - scrollWidth, 0, y, - scrollWidth, 1, table -> rows.size + 1, 1, 1, 1, 10, gui_cb_scrollVertical, this, 0); our horizontalScrollBar = GuiScrollBar_createShown (our d_windowForm, 0, - scrollWidth, - scrollWidth, 0, 1, table -> numberOfColumns + 1, 1, 1, 1, 3, gui_cb_scrollHorizontal, this, GuiScrollBar_HORIZONTAL); GuiDrawingArea_setSwipable (our drawingArea, our horizontalScrollBar, our verticalScrollBar); }
void structRunnerMFC :: v_createChildren () { d_drawingArea = GuiDrawingArea_createShown (d_windowForm, 0, 0, Machine_getMenuBarHeight (), 0, gui_drawingarea_cb_expose, gui_drawingarea_cb_click, gui_drawingarea_cb_key, gui_drawingarea_cb_resize, this, 0); }