+ wxMenu *menuText = new wxMenu;
+ menuText->Append(TEXT_ADD_SOME, "&Append some text\tCtrl-A");
+ menuText->Append(TEXT_ADD_FREEZE, "&Append text with freeze/thaw\tShift-Ctrl-A");
+ menuText->Append(TEXT_REMOVE, "&Remove first 10 characters\tCtrl-X");
+ menuText->Append(TEXT_SET, "&Set the first text zone value\tCtrl-E");
+ menuText->AppendSeparator();
+ menuText->Append(TEXT_MOVE_ENDTEXT, "Move cursor to the end of &text");
+ menuText->Append(TEXT_MOVE_ENDENTRY, "Move cursor to the end of &entry");
+ menuText->Append(TEXT_SET_EDITABLE, "Toggle &editable state", "", TRUE);
+ menuText->Append(TEXT_SET_ENABLED, "Toggle e&nabled state", "", TRUE);
+ menuText->Check(TEXT_SET_EDITABLE, TRUE);
+ menuText->Check(TEXT_SET_ENABLED, TRUE);
+ menuText->AppendSeparator();
+ menuText->Append(TEXT_LINE_DOWN, "Scroll text one line down");
+ menuText->Append(TEXT_LINE_UP, "Scroll text one line up");
+ menuText->Append(TEXT_PAGE_DOWN, "Scroll text one page down");
+ menuText->Append(TEXT_PAGE_DOWN, "Scroll text one page up");
+ menu_bar->Append(menuText, "Te&xt");
+
+ wxMenu *menuLog = new wxMenu;
+ menuLog->Append(TEXT_LOG_KEY, "Log &key events", "", TRUE);
+ menuLog->Append(TEXT_LOG_CHAR, "Log &char events", "", TRUE);
+ menuLog->Append(TEXT_LOG_MOUSE, "Log &mouse events", "", TRUE);
+ menuLog->Append(TEXT_LOG_TEXT, "Log &text events", "", TRUE);
+ menuLog->Append(TEXT_LOG_FOCUS, "Log &focus events", "", TRUE);
+ menuLog->AppendSeparator();
+ menuLog->Append(TEXT_CLEAR, "&Clear the log\tCtrl-C",
+ "Clear the log window contents");
+
+ // select only the interesting events by default
+#if 0
+ menuLog->Check(TEXT_LOG_KEY, TRUE);
+ menuLog->Check(TEXT_LOG_CHAR, TRUE);
+ menuLog->Check(TEXT_LOG_TEXT, TRUE);
+
+ MyTextCtrl::ms_logKey =
+ MyTextCtrl::ms_logChar =
+ MyTextCtrl::ms_logText = TRUE;
+#else
+ menuLog->Check(TEXT_LOG_FOCUS, TRUE);
+ MyTextCtrl::ms_logFocus = TRUE;
+#endif
+ menu_bar->Append(menuLog, "&Log");