See general-class-diagram.dia
main.py defines the application, which has:
- implementations of CLI handling methods
- some
GioActions - a preferences window (
preferences.py) - a menubar (hidden with most layouts)
- an appmenu (for GNOME Shell ≤ 3.30)
- dialogs (about, shortcuts)
- several windows
window.py defines a GtkApplicationWindow:
- some
GioActions - a window's decorations can change quite a lot, which is mostly handled by
deco_manager.py. Three classes are defined in this file:DrDecoManagerMenubarjust hides or shows the menubar. Most of its methods are empty.DrDecoManagerToolbarloads a toolbar from an UI file. This class extendsDrDecoManagerMenubar, and will manage a small "hamburger menu" at the end of the toolbar if the menubar is hidden.DrDecoManagerHeaderbarloads a headerbar from an UI file. This class extendsDrDecoManagerMenubarbut the menubar will always stay hidden. It handles how widgets are shown or hidden depending on the size of the window, and will display various menus depending on the visibility of the buttons, to ensure all features are always available.
- a window has several tools. They're initialized in a dedicated class (see
tools_initializer.py) for no good reason. - a window has several images
minimap.pyfor the minimap, which shows a thumbnail of the currently opened image.- each window has an options_manager (
options_manager.py). It will display the correct bottom bar (= the one required by the current tool) and manage tools' options. All bottom options bars can be found in the sub-directories ofsrc/optionsbars/, and are specialized fromsrc/optionsbars/abstract_optionsbar.py - the saving_manager encapsulates all various methods to save or export a
Gdk.Pixbufas a file, with modal dialog windows to ask for confirmation, to replace transparency according to the settings, etc.
image.py defines an image (= a tab), which contains:
- a
GdkPixbuf.Pixbuf(as an attribute), namedmain_pixbuf, which corresponds to the current state of the edited image. - a file (
Gio.File) which can beNone(if it's a new image never saved). - a history, managed by
history_manager.py - a selection, managed by
selection_manager.py - methods to manage the zoom and the scroll.
- methods to manage printing.
- methods to receive signals from the mouse, and transmit them to the tools.