1#ifndef CHAMELEON_NOTEBOOK__H
2#define CHAMELEON_NOTEBOOK__H
7#include <wx/aui/auibook.h>
24 const wxPoint& pos = wxDefaultPosition,
25 const wxSize& size = wxDefaultSize,
long style = 0);
32 void SetTabText(
size_t nTab,
const wxString& text);
37 void split(
size_t pageNum,
bool horizontal);
39 bool isSplit(
size_t pageNum)
const;
47 void OnTabMove(wxAuiNotebookEvent& event);
50 void OnEnter(wxMouseEvent& event);
51 void OnLeave(wxMouseEvent& event);
53 void OnSize(wxSizeEvent &event);
This class represents the notebook containing all editors of one main pane.
void SetTabText(size_t nTab, const wxString &text)
Set a text for the selected editor tab. Note that this function expects a filepath.
void OnTabScroll(wxMouseEvent &event)
Scrolls through the notebook pages, if the user hovers over the tabs and uses the mouse wheel.
void OnSize(wxSizeEvent &event)
Size event handling function.
void OnUnsplit(wxSplitterEvent &event)
Event handler, if the user drags the sash to the outermost edge.
void OnLeave(wxMouseEvent &event)
Deactivates the internal mouse focus state.
void OnTabRightClicked(wxAuiNotebookEvent &event)
Shows the context menu for the current tab.
void split(size_t pageNum, bool horizontal)
Split the current editor horizontally or vertically (depending on the flag), if it is not already spl...
void OnEnter(wxMouseEvent &event)
Focuses the tabs, if the user hovers over them.
bool isSplit(size_t pageNum) const
Check, whether the editor is currently splitted.
void OnButtonClicked(wxAuiNotebookEvent &event)
Executes the closing command, if the user clickes with the middle mouse button on a tab.
void SetShowPathsOrIconsOnTabs(bool showText, bool showIcons)
This member function enables/disables the relative paths or icons on the tab and refreshes the tab te...
void OnTabMiddleClicked(wxAuiNotebookEvent &event)
Executes the closing command, if the user clickes on the button of a tab.
NumeReEditor * getEditor(size_t pageNum, bool secondary=false)
Returns a pointer to the embedded editor instance. Will return the left or top editor pointer or the ...
void unsplit(size_t pageNum)
Remove the splitted view.
NumeReWindow * m_top_parent
NumeReEditor * createEditor(const wxString &text)
Create a new editor and add it to a new tab automatically. The passed text is used for the tab name.
NumeReEditor * getCurrentEditor(bool secondary=false)
Returns a pointer to the current viewed editor in this notebook. Will return the left or top editor o...
~EditorNotebook()
Empty destructor.
int FindPagePosition(wxNotebookPage *page)
void OnTabMove(wxAuiNotebookEvent &event)
This event handler fixes the issue that the control does not correctly update the selected page durin...
void SetTopParent(NumeReWindow *window)
int GetTabFromPoint(const wxPoint &pt)
Returns the tab at the defined absolute coordinates. Actually more or less the same than the generic ...
EditorNotebook(wxWindow *parent, wxWindowID id, IconManager *icons, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
Constructor.
NumeReEditor * getFocusedEditor()
Returns a pointer to the current focused editor. This will automatically return the secondary editor,...
The class of the editor window.
This class is the actual NumeRe main frame. The application's logic is implemented here.