mediocre9 / menus Goto Github PK
View Code? Open in Web Editor NEWa borland inspired ascii console graphics library.
License: MIT License
a borland inspired ascii console graphics library.
License: MIT License
Vertical represents y-plane, while horizontal should represent x-plane.
tree / maps
data structure implementation to handle the menus heirarchy and data flow
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;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.