void structButtonEditor :: v_draw () { Graphics_clearWs (our graphics.get()); switch (show) { case 1: for (long i = 1, n = praat_getNumberOfMenuCommands (); i <= n; i ++) { Praat_Command cmd = praat_getMenuCommand (i); if (str32equ (cmd -> window, U"Objects")) drawMenuCommand (this, praat_getMenuCommand (i), i); } break; case 2: for (long i = 1, n = praat_getNumberOfMenuCommands (); i <= n; i ++) { Praat_Command cmd = praat_getMenuCommand (i); if (str32equ (cmd -> window, U"Picture")) drawMenuCommand (this, praat_getMenuCommand (i), i); } break; case 3: for (long i = 1, n = praat_getNumberOfMenuCommands (); i <= n; i ++) { Praat_Command cmd = praat_getMenuCommand (i); if (! str32equ (cmd -> window, U"Objects") && ! str32equ (cmd -> window, U"Picture")) drawMenuCommand (this, praat_getMenuCommand (i), i); } break; case 4: for (long i = 1, n = praat_getNumberOfActions (); i <= n; i ++) { Praat_Command cmd = praat_getAction (i); const char32 *klas = cmd -> class1 -> className; if (str32cmp (klas, U"N") < 0) drawAction (this, praat_getAction (i), i); } break; case 5: for (long i = 1, n = praat_getNumberOfActions (); i <= n; i ++) { Praat_Command cmd = praat_getAction (i); const char32 *klas = cmd -> class1 -> className; if (str32cmp (klas, U"N") >= 0) drawAction (this, praat_getAction (i), i); } break; } }
void ButtonEditor::draw () { Graphics_clearWs (_g); switch (_show) { case 1: for (long i = 1, n = praat_getNumberOfMenuCommands (); i <= n; i ++) { praat_Command cmd = praat_getMenuCommand (i); if (wcsequ (cmd -> window, L"Objects")) drawMenuCommand (praat_getMenuCommand (i), i); } break; case 2: for (long i = 1, n = praat_getNumberOfMenuCommands (); i <= n; i ++) { praat_Command cmd = praat_getMenuCommand (i); if (wcsequ (cmd -> window, L"Picture")) drawMenuCommand (praat_getMenuCommand (i), i); } break; case 3: for (long i = 1, n = praat_getNumberOfMenuCommands (); i <= n; i ++) { praat_Command cmd = praat_getMenuCommand (i); if (! wcsequ (cmd -> window, L"Objects") && ! wcsequ (cmd -> window, L"Picture")) drawMenuCommand (praat_getMenuCommand (i), i); } break; case 4: for (long i = 1, n = praat_getNumberOfActions (); i <= n; i ++) { praat_Command cmd = praat_getAction (i); const wchar_t *klas = ((Data_Table) cmd -> class1) -> _className; if (wcscmp (klas, L"N") < 0) drawAction (praat_getAction (i), i); } break; case 5: for (long i = 1, n = praat_getNumberOfActions (); i <= n; i ++) { praat_Command cmd = praat_getAction (i); const wchar_t *klas = ((Data_Table) cmd -> class1) -> _className; if (wcscmp (klas, L"N") >= 0) drawAction (praat_getAction (i), i); } break; } }