We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class based component pattern to build the app.
class RootComponent : public IApplicationController { public: // construct window application from here . . . RootComponent() : IApplicationController("My First App", Dimension(500, 500), eng::Color.AQUA_BLACK), v_menu_(nullptr), frame_(nullptr) { v_menu_ = new VerticalMenu(); frame_ = new Frame(); } // setup gui object values . . . void setup() override { // for menu items_ = { {" New ", HIGHLIGHT}, {" File ", DEFAULT}, {" Edit ", DEFAULT}, {" View ", DEFAULT}, }; v_menu_->addItems(items_); v_menu_->setTheme({DEFAULT, HIGHLIGHT}); v_menu_->setPosition({0, 0}); // for window frame frame_->setDimension({10, 25}); frame_->setPosition({1, 3}); frame_->enableShadow(true); frame_->setBorderType(AbstractWindow::Border::PIPE); } // update callback method . . . void controller() override { while (!v_menu_->isItemSelected()) { v_menu_->render(); } v_menu_->restart(); switch (v_menu_->getItemPosition()) { case 1: frame_->render(); break; } } ~RootComponent() { delete v_menu_; delete frame_; } private: std::vector<MenuItem> items_; Window* frame_; MenuBar* v_menu_; }; int main() { RootComponent root; root.init(std::bind(&RootComponent::controller, &root)); return 0; }
The text was updated successfully, but these errors were encountered:
mediocre9
No branches or pull requests
Class based component pattern to build the app.
Proposed Design Architectural Style
The text was updated successfully, but these errors were encountered: