MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / OnIdle

Method OnIdle

src/toolbar.cpp:78–85  ·  view source on GitHub ↗

Enable/disable the toolbar buttons

Source from the content-addressed store, hash-verified

76
77 /// Enable/disable the toolbar buttons
78 void OnIdle(wxIdleEvent &) {
79 for (size_t i = 0; i < commands.size(); ++i) {
80 if (commands[i]->Type() & cmd::COMMAND_VALIDATE)
81 EnableTool(TOOL_ID_BASE + i, commands[i]->Validate(context));
82 if (commands[i]->Type() & cmd::COMMAND_TOGGLE || commands[i]->Type() & cmd::COMMAND_RADIO)
83 ToggleTool(TOOL_ID_BASE + i, commands[i]->IsActive(context));
84 }
85 }
86
87 /// Toolbar button click handler
88 void OnClick(wxCommandEvent &evt) {

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.45
TypeMethod · 0.45
ValidateMethod · 0.45
IsActiveMethod · 0.45

Tested by

no test coverage detected