/* * Copyright (c) 2021-2022, Mustafa Quraish * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "Guide.h" #include "HistogramWidget.h" #include "IconBag.h" #include "Image.h" #include "ImageEditor.h" #include "Layer.h" #include "LayerListWidget.h" #include "LayerPropertiesWidget.h" #include "PaletteWidget.h" #include "ProjectLoader.h" #include "ToolPropertiesWidget.h" #include "ToolboxWidget.h" #include "Tools/Tool.h" #include #include #include #include #include #include #include namespace PixelPaint { extern IconBag g_icon_bag; class MainWidget : public GUI::Widget { C_OBJECT(MainWidget); public: virtual ~MainWidget() {}; void initialize_menubar(GUI::Window&); void open_image(Core::File&); void create_default_image(); bool request_close(); private: MainWidget(); ImageEditor* current_image_editor(); ImageEditor& create_new_editor(NonnullRefPtr); void create_image_from_clipboard(); void image_editor_did_update_undo_stack(); void set_actions_enabled(bool enabled); virtual void drop_event(GUI::DropEvent&) override; ProjectLoader m_loader; RefPtr m_toolbox; RefPtr m_palette_widget; RefPtr m_histogram_widget; RefPtr m_layer_list_widget; RefPtr m_layer_properties_widget; RefPtr m_tool_properties_widget; RefPtr m_tab_widget; RefPtr m_statusbar; RefPtr m_zoom_combobox; RefPtr m_export_submenu; RefPtr m_edit_menu; RefPtr m_view_menu; RefPtr m_tool_menu; RefPtr m_image_menu; RefPtr m_layer_menu; RefPtr m_filter_menu; RefPtr m_new_image_action; RefPtr m_new_image_from_clipboard_action; RefPtr m_open_image_action; RefPtr m_save_image_action; RefPtr m_save_image_as_action; RefPtr m_close_image_action; RefPtr m_levels_dialog_action; RefPtr m_cut_action; RefPtr m_copy_action; RefPtr m_copy_merged_action; RefPtr m_paste_action; RefPtr m_undo_action; RefPtr m_redo_action; RefPtr m_zoom_in_action; RefPtr m_zoom_out_action; RefPtr m_reset_zoom_action; RefPtr m_add_guide_action; RefPtr m_show_guides_action; RefPtr m_show_rulers_action; RefPtr m_show_active_layer_boundary_action; }; }