|
wex
v21.04.0
|
Offers a notebook with page access using keys, and that interfaces with wex::managed_frame. More...
#include <wex/notebook.h>
Inherits wxAuiNotebook.
Public Member Functions | |
| notebook (const data::window &data=data::window().style(wxAUI_NB_DEFAULT_STYLE)) | |
| Other methods. More... | |
| wxWindow * | add_page (const data::notebook &data) |
| Adds the page with given key and fills the keys. | |
| const std::string | change_selection (const std::string &key) |
| Changes the selection for the given page, returning the previous selection. More... | |
| void | config_get () |
| Sets the configurable parameters to values currently in config. | |
| const std::string | current_page_key () |
| Returns key for the current page. | |
| bool | delete_page (const std::string &key) |
| Deletes the page with the given key. More... | |
| template<class T > | |
| bool | for_each (int id) |
| Do something for each page in the notebook. More... | |
| wxWindow * | insert_page (const data::notebook &data) |
| Inserts the page with given key and fills the keys. | |
| const std::string | key_by_page (wxWindow *page) const |
| Returns the key specified by the given page. More... | |
| wxWindow * | page_by_key (const std::string &key) const |
| Returns the page specified by the given key. More... | |
| int | page_index_by_key (const std::string &key) const |
| Returns the page index specified by the given key. More... | |
| void | rearrange (int direction) |
| Rearranges all pages. More... | |
| bool | set_page_text (const std::string &key, const std::string &new_key, const std::string &caption, const wxBitmap &bitmap=wxNullBitmap) |
| Sets the pagetext for the given new key, on the page for the given key. More... | |
| wxWindow * | set_selection (const std::string &key) |
| Selects (and returns) the page specified by the given key. More... | |
| bool | split (const std::string &key, int direction) |
| Split performs a split operation programmatically. More... | |
Static Public Member Functions | |
| static int | config_dialog (const data::window &data=data::window()) |
| Static interface. More... | |
Offers a notebook with page access using keys, and that interfaces with wex::managed_frame.
| wex::notebook::notebook | ( | const data::window & | data = data::window().style(wxAUI_NB_DEFAULT_STYLE) | ) |
Other methods.
Default constructor.
| const std::string wex::notebook::change_selection | ( | const std::string & | key | ) |
Changes the selection for the given page, returning the previous selection.
If the key does not exist an empty string is returned.
|
static |
Static interface.
Shows a dialog with options, returns dialog return code. If used modeless, it uses the dialog id as specified, so you can use that id in frame::on_command_item_dialog.
| bool wex::notebook::delete_page | ( | const std::string & | key | ) |
Deletes the page with the given key.
Returns true if page could be deleted.
|
inline |
Do something for each page in the notebook.
The id should be in between ID_ALL_LOWEST and ID_ALL_HIGHEST. Cannot be const as it can call delete_page.
|
inline |
Returns the key specified by the given page.
If the page does not exist or is nullptr an empty string is returned.
|
inline |
Returns the page specified by the given key.
If the key does not exist nullptr is returned.
|
inline |
Returns the page index specified by the given key.
If the key does not exist wxNOT_FOUND is returned.
| void wex::notebook::rearrange | ( | int | direction | ) |
Rearranges all pages.
| direction | Specify where the pane should go. It should be one of the following:
|
| bool wex::notebook::set_page_text | ( | const std::string & | key, |
| const std::string & | new_key, | ||
| const std::string & | caption, | ||
| const wxBitmap & | bitmap = wxNullBitmap |
||
| ) |
Sets the pagetext for the given new key, on the page for the given key.
If the key does not exist false is returned.
| wxWindow* wex::notebook::set_selection | ( | const std::string & | key | ) |
Selects (and returns) the page specified by the given key.
If the key does not exist nullptr is returned.
| bool wex::notebook::split | ( | const std::string & | key, |
| int | direction | ||
| ) |
Split performs a split operation programmatically.
If the key does not exist false is returned.
| key | The page that will be split off. This page will also become the active page after the split. |
| direction | Specify where the pane should go. It should be one of the following:
|