Created
September 2, 2017 14:37
-
-
Save sysint64/135c5c60e47ebd4f77bd88a15bdbbac1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyView : View { | |
@ViewWidget Button okButton; | |
@ViewWidget Panel testPanel; | |
@ViewWidget("cancelButton") Button myButton; | |
@GroupViewWidgets Button[3] buttons; | |
int a = 0; | |
this(Manager manager, in string laytoutFileName, in string shortcutsFileName) { | |
super(manager, laytoutFileName, shortcutsFileName); | |
// testPanel.freezeUI(false); | |
} | |
@OnClickListener("okButton") | |
void onOkButtonClick(Widget widget) { | |
writeln("Hello world! a = ", a); | |
a += 1; | |
okButton.caption = "YAY!"; | |
myButton.caption = "WORK!"; | |
buttons[2].caption = "YES!"; | |
} | |
@Shortcut("TestGroup.cancel") | |
void someShortcutAction() { | |
writeln("Wow! shortcut was executed!"); | |
} | |
@OnClickListener("closeButton") | |
@OnClickListener("cancelButton") | |
void onCancelButtonClick(Widget widget) { | |
writeln("Close!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment