mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
add tab reorderable, focus methods
This commit is contained in:
parent
20766c00f6
commit
530991a48e
2 changed files with 24 additions and 3 deletions
|
|
@ -17,8 +17,26 @@ void Tab::append(
|
||||||
bool open,
|
bool open,
|
||||||
bool focus
|
bool focus
|
||||||
) {
|
) {
|
||||||
append_page( // @TODO
|
Gtk::Label * data = new Gtk::Label("data"); // @TODO
|
||||||
* new Gtk::Label("data"),
|
|
||||||
* new Gtk::Label("tab")
|
append_page(
|
||||||
|
* data,
|
||||||
|
* new Gtk::Label(
|
||||||
|
LABEL
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
set_tab_reorderable(
|
||||||
|
* data,
|
||||||
|
REORDERABLE
|
||||||
|
);
|
||||||
|
|
||||||
|
if (focus)
|
||||||
|
{
|
||||||
|
set_current_page(
|
||||||
|
page_num(
|
||||||
|
* data
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef APP_BROWSER_MAIN_TAB_H
|
#ifndef APP_BROWSER_MAIN_TAB_H
|
||||||
#define APP_BROWSER_MAIN_TAB_H
|
#define APP_BROWSER_MAIN_TAB_H
|
||||||
|
|
||||||
|
#include <glibmm/i18n.h>
|
||||||
#include <gtkmm/notebook.h>
|
#include <gtkmm/notebook.h>
|
||||||
|
|
||||||
namespace app::browser::main
|
namespace app::browser::main
|
||||||
|
|
@ -12,6 +13,8 @@ namespace app::browser::main
|
||||||
const bool SCROLLABLE = true;
|
const bool SCROLLABLE = true;
|
||||||
const bool REORDERABLE = true;
|
const bool REORDERABLE = true;
|
||||||
|
|
||||||
|
const char * LABEL = _("New tab");
|
||||||
|
|
||||||
class Navbar
|
class Navbar
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue