mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
CComponentsForm/CComponentsWindow: add page scroll handling
This provides page scroll with up/down, left/right or combined. Usage of exec() methods with implemented signals allows a generic implematation of button or other message handling with signal/slot solutions. still to do: page cache
This commit is contained in:
@@ -153,6 +153,8 @@ void CComponentsWindow::initVarWindow( const int& x_pos, const int& y_pos, const
|
||||
ccw_show_r_sideber = false;
|
||||
ccw_w_sidebar = 40;
|
||||
|
||||
page_scroll_mode = PG_SCROLL_M_OFF; //permanent disabled here, only in body used!
|
||||
|
||||
initCCWItems();
|
||||
initParent(parent);
|
||||
}
|
||||
@@ -370,11 +372,26 @@ u_int8_t CComponentsWindow::getCurrentPage()
|
||||
return ccw_body->getCurrentPage();
|
||||
}
|
||||
|
||||
|
||||
bool CComponentsWindow::isPageChanged()
|
||||
{
|
||||
for(size_t i=0; i<ccw_body->size(); i++){
|
||||
if (ccw_body->getCCItem(i)->getPageNumber() != getCurrentPage())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void CComponentsWindow::setScrollBarWidth(const int& scrollbar_width)
|
||||
{
|
||||
ccw_body->setScrollBarWidth(scrollbar_width);
|
||||
}
|
||||
|
||||
void CComponentsWindow::enablePageScroll(const int& mode)
|
||||
{
|
||||
ccw_body->enablePageScroll(mode);
|
||||
}
|
||||
|
||||
void CComponentsWindow::paintCurPage(bool do_save_bg)
|
||||
{
|
||||
if (is_painted) //ensure that we have painted already the parent form before paint body
|
||||
|
Reference in New Issue
Block a user