mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-30 13:04:13 +00:00
rename downcast helpers
This commit is contained in:
parent
e24667785a
commit
4b33ba874a
@ -49,7 +49,7 @@ Tab::Tab(
|
|||||||
{
|
{
|
||||||
if (n == 2) // double click
|
if (n == 2) // double click
|
||||||
{
|
{
|
||||||
get_tabLabel(
|
tabLabel(
|
||||||
get_current_page()
|
get_current_page()
|
||||||
)->pin();
|
)->pin();
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ int Tab::session_restore(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Restore children components
|
// Restore children components
|
||||||
get_tabLabel(
|
tabLabel(
|
||||||
PAGE_NUMBER
|
PAGE_NUMBER
|
||||||
)->session_restore(
|
)->session_restore(
|
||||||
sqlite3_column_int64(
|
sqlite3_column_int64(
|
||||||
@ -108,7 +108,7 @@ int Tab::session_restore(
|
|||||||
)
|
)
|
||||||
); // maybe not much reasons to restore as page title in use @TODO
|
); // maybe not much reasons to restore as page title in use @TODO
|
||||||
|
|
||||||
get_tabPage(
|
tabPage(
|
||||||
PAGE_NUMBER
|
PAGE_NUMBER
|
||||||
)->session_restore(
|
)->session_restore(
|
||||||
sqlite3_column_int64(
|
sqlite3_column_int64(
|
||||||
@ -147,13 +147,13 @@ void Tab::session_save(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Delegate save actions to children components
|
// Delegate save actions to children components
|
||||||
get_tabLabel(
|
tabLabel(
|
||||||
page_number
|
page_number
|
||||||
)->session_save(
|
)->session_save(
|
||||||
APP_BROWSER_MAIN_TAB__SESSION__ID
|
APP_BROWSER_MAIN_TAB__SESSION__ID
|
||||||
);
|
);
|
||||||
|
|
||||||
get_tabPage(
|
tabPage(
|
||||||
page_number
|
page_number
|
||||||
)->session_save(
|
)->session_save(
|
||||||
APP_BROWSER_MAIN_TAB__SESSION__ID
|
APP_BROWSER_MAIN_TAB__SESSION__ID
|
||||||
@ -166,7 +166,7 @@ void Tab::update(
|
|||||||
const int & PAGE_NUMBER
|
const int & PAGE_NUMBER
|
||||||
) {
|
) {
|
||||||
// Get tab page
|
// Get tab page
|
||||||
const auto TAB_PAGE = get_tabPage(
|
const auto TAB_PAGE = tabPage(
|
||||||
PAGE_NUMBER
|
PAGE_NUMBER
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ void Tab::update(
|
|||||||
TAB_PAGE->update();
|
TAB_PAGE->update();
|
||||||
|
|
||||||
// Update tab label component
|
// Update tab label component
|
||||||
get_tabLabel(
|
tabLabel(
|
||||||
PAGE_NUMBER
|
PAGE_NUMBER
|
||||||
)->update(
|
)->update(
|
||||||
TAB_PAGE->get_title()
|
TAB_PAGE->get_title()
|
||||||
@ -233,7 +233,7 @@ int Tab::append(
|
|||||||
void Tab::pin(
|
void Tab::pin(
|
||||||
const int & PAGE_NUMBER
|
const int & PAGE_NUMBER
|
||||||
) {
|
) {
|
||||||
get_tabLabel(
|
tabLabel(
|
||||||
PAGE_NUMBER
|
PAGE_NUMBER
|
||||||
)->pin();
|
)->pin();
|
||||||
}
|
}
|
||||||
@ -269,7 +269,7 @@ void Tab::page_navigation_reload(
|
|||||||
const int & PAGE_NUMBER,
|
const int & PAGE_NUMBER,
|
||||||
const bool & ADD_HISTORY
|
const bool & ADD_HISTORY
|
||||||
) {
|
) {
|
||||||
get_tabPage(
|
tabPage(
|
||||||
PAGE_NUMBER
|
PAGE_NUMBER
|
||||||
)->navigation_reload(
|
)->navigation_reload(
|
||||||
ADD_HISTORY
|
ADD_HISTORY
|
||||||
@ -279,7 +279,7 @@ void Tab::page_navigation_reload(
|
|||||||
void Tab::page_navigation_history_back(
|
void Tab::page_navigation_history_back(
|
||||||
const int & PAGE_NUMBER
|
const int & PAGE_NUMBER
|
||||||
) {
|
) {
|
||||||
get_tabPage(
|
tabPage(
|
||||||
PAGE_NUMBER
|
PAGE_NUMBER
|
||||||
)->navigation_history_back();
|
)->navigation_history_back();
|
||||||
}
|
}
|
||||||
@ -287,7 +287,7 @@ void Tab::page_navigation_history_back(
|
|||||||
void Tab::page_navigation_history_forward(
|
void Tab::page_navigation_history_forward(
|
||||||
const int & PAGE_NUMBER
|
const int & PAGE_NUMBER
|
||||||
) {
|
) {
|
||||||
get_tabPage(
|
tabPage(
|
||||||
PAGE_NUMBER
|
PAGE_NUMBER
|
||||||
)->navigation_history_forward();
|
)->navigation_history_forward();
|
||||||
}
|
}
|
||||||
@ -296,7 +296,7 @@ void Tab::page_navigation_history_forward(
|
|||||||
Glib::ustring Tab::get_page_title(
|
Glib::ustring Tab::get_page_title(
|
||||||
const int & PAGE_NUMBER
|
const int & PAGE_NUMBER
|
||||||
) {
|
) {
|
||||||
return get_tabPage(
|
return tabPage(
|
||||||
PAGE_NUMBER
|
PAGE_NUMBER
|
||||||
)->get_title();
|
)->get_title();
|
||||||
};
|
};
|
||||||
@ -304,12 +304,12 @@ Glib::ustring Tab::get_page_title(
|
|||||||
Glib::ustring Tab::get_page_description(
|
Glib::ustring Tab::get_page_description(
|
||||||
const int & PAGE_NUMBER
|
const int & PAGE_NUMBER
|
||||||
) {
|
) {
|
||||||
return get_tabPage(
|
return tabPage(
|
||||||
PAGE_NUMBER
|
PAGE_NUMBER
|
||||||
)->get_description();
|
)->get_description();
|
||||||
};
|
};
|
||||||
|
|
||||||
tab::Label * Tab::get_tabLabel(
|
tab::Label * Tab::tabLabel(
|
||||||
const int & PAGE_NUMBER
|
const int & PAGE_NUMBER
|
||||||
) {
|
) {
|
||||||
// Get page pointer to find label widget
|
// Get page pointer to find label widget
|
||||||
@ -345,7 +345,7 @@ tab::Label * Tab::get_tabLabel(
|
|||||||
return TAB_LABEL;
|
return TAB_LABEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
tab::Page * Tab::get_tabPage(
|
tab::Page * Tab::tabPage(
|
||||||
const int & PAGE_NUMBER
|
const int & PAGE_NUMBER
|
||||||
) {
|
) {
|
||||||
// Get page widget
|
// Get page widget
|
||||||
|
@ -145,11 +145,12 @@ namespace app::browser::main
|
|||||||
const int & PAGE_NUMBER
|
const int & PAGE_NUMBER
|
||||||
);
|
);
|
||||||
|
|
||||||
tab::Label * get_tabLabel(
|
// Downcast
|
||||||
|
tab::Label * tabLabel(
|
||||||
const int & PAGE_NUMBER
|
const int & PAGE_NUMBER
|
||||||
);
|
);
|
||||||
|
|
||||||
tab::Page * get_tabPage(
|
tab::Page * tabPage(
|
||||||
const int & PAGE_NUMBER
|
const int & PAGE_NUMBER
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user