mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
Userland: Add GUI::Window::add_menu() and use it everywhere
Applications previously had to create a GUI::Menubar object, add menus to it, and then call GUI::Window::set_menubar(). This patch introduces GUI::Window::add_menu() which creates the menubar automatically and adds items to it. Application code becomes slightly simpler as a result. :^)
This commit is contained in:
parent
a4fdb7f029
commit
687a12d7fb
58 changed files with 187 additions and 311 deletions
|
@ -42,7 +42,7 @@ public:
|
|||
void set_current_editor_wrapper(RefPtr<EditorWrapper>);
|
||||
|
||||
const String& active_file() const { return m_current_editor_wrapper->filename(); }
|
||||
void initialize_menubar(GUI::Menubar&);
|
||||
void initialize_menubar(GUI::Window&);
|
||||
|
||||
Locator& locator()
|
||||
{
|
||||
|
@ -104,12 +104,12 @@ private:
|
|||
void create_open_files_view(GUI::Widget& parent);
|
||||
void create_toolbar(GUI::Widget& parent);
|
||||
void create_action_tab(GUI::Widget& parent);
|
||||
void create_file_menubar(GUI::Menubar&);
|
||||
void create_project_menubar(GUI::Menubar&);
|
||||
void create_edit_menubar(GUI::Menubar&);
|
||||
void create_build_menubar(GUI::Menubar&);
|
||||
void create_view_menubar(GUI::Menubar&);
|
||||
void create_help_menubar(GUI::Menubar&);
|
||||
void create_file_menu(GUI::Window&);
|
||||
void create_project_menu(GUI::Window&);
|
||||
void create_edit_menu(GUI::Window&);
|
||||
void create_build_menu(GUI::Window&);
|
||||
void create_view_menu(GUI::Window&);
|
||||
void create_help_menu(GUI::Window&);
|
||||
void create_project_tab(GUI::Widget& parent);
|
||||
void configure_project_tree_view();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue