本文整理汇总了C++中TextEditor::addValueChangeListener方法的典型用法代码示例。如果您正苦于以下问题:C++ TextEditor::addValueChangeListener方法的具体用法?C++ TextEditor::addValueChangeListener怎么用?C++ TextEditor::addValueChangeListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextEditor
的用法示例。
在下文中一共展示了TextEditor::addValueChangeListener方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Window
MenuWindow::MenuWindow(AmobaApplication &app, int x, int y) : Window (x, y), _app(app) {
StaticText *text = new StaticText(170, 50, 100,30, "Amöba");
widgets.push_back(text);
ClickButton *kilepesGomb = new ClickButton([&]() { kilepesClicked(); }, 40, 320, 100, 35);
widgets.push_back(kilepesGomb);
StaticText *exit = new StaticText(70, 330, 40, 20, "EXIT");
widgets.push_back(exit);
ClickButton *jatekGomb = new ClickButton([&]() { jatekClicked(); }, 260, 320, 100, 35);
widgets.push_back(jatekGomb);
StaticText *kek = new StaticText(40, 180, 100, 35, "Kék játékos:");
widgets.push_back(kek);
TextEditor *ed = new TextEditor(40, 200, 100, 35, _app.players[0]);
ed->addValueChangeListener([&](ValueChangedEvent event) { textEditorChanged(event); });
widgets.push_back(ed);
StaticText *play = new StaticText(290, 330, 40, 20, "PLAY");
widgets.push_back(play);
StaticText *piros = new StaticText(260, 180, 100, 35, "Piros játékos:");
widgets.push_back(piros);
TextEditor *ed2 = new TextEditor(260, 200, 100, 35, _app.players[1]);
ed2->addValueChangeListener([&](ValueChangedEvent event) { textEditorChanged2(event); });
widgets.push_back(ed2);
}