Open the app:
- Entry.cpp creates the app and call
NewWindow()
in MainWindow.cpp.
NewWindow()
in MainWindow.cpp store the App in Core.cpp with SetApp()
and get the AppWindow object in Core.cpp with GetAppWindow()
, then assign variables.
NewWindow()
creates a FilePanel and initialize it with FilePanel->init()
method
NewWindow()
creates an EditAreaHolder and initialize it with EditAreaHolder->init()
method
NewWindow()
Construct HeaderBar with LoadHeaderBar()
function
NewWindow()
Sets the offset of FilePanel, load css, and other properties
NewWindow()
Creates a new EditArea that doesn't open any file by calling NewEditArea()
from Core.cpp with nullptr
as parameter. Then show the EditArea in EditAreaHolder
Open a folder:
- Click on
File
button at the left-hand side of the headerbar. It will show a drop-down menu. Click Open folder and LoadFolderClicked()
in HeaderBar.cpp will be triggered.
LoadFolderClicked()
calls OpenFileChooser()
with parameter false
. Now a FileDialog is opened and wait for user to choose a folder.
- After chosen,
FolderSelected()
will be called. And run ReadAsRootFolder()
.
ReadAsRootFolder()
creates a FPFolderButton
by NewFolderButton()
from Core.cpp and initialize it. Then call FilePanel->AddNewRootFolder()
to show it as root folder
- When user expand the content of the folder button by triggering
ToggleFolder()
, it will call ReadFolder()
from FileManager.cpp and add FPFileButton/FPFolderButton under GtkBox *Content
Open a file:
- Click on
File
button at the left-hand side of the headerbar. It will show a drop-down menu. Click Open file and LoadFileClicked()
in HeaderBar.cpp will be triggered.
LoadFileClicked()
calls OpenFileChooser()
with parameter true
. Now a FileDialog is opened and wait for user to choose a file.
- After chosen,
FileSelected()
will be called and run OpenFile()
.