/* virtual methods from Widget */ void Prepare(ContainerWindow &parent, const PixelRect &rc) override { CreateButtons(buttons_widget->GetButtonPanel()); TextListWidget::Prepare(parent, rc); UpdateList(); if (active_index >= 0) /* move cursor to active item */ GetList().SetCursorIndex(active_index); }
void PageListWidget::Initialise(ContainerWindow &parent, const PixelRect &rc) { settings = CommonInterface::GetUISettings().pages; CreateList(parent, UIGlobals::GetDialogLook(), rc, Layout::Scale(18)).SetLength(settings.n_pages); CreateButtons(buttons->GetButtonPanel()); UpdateButtons(); }
void TaskListPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { CreateList(parent, dialog.GetLook(), rc, Layout::GetMinimumControlHeight()); CreateButtons(buttons->GetButtonPanel()); task_store = new TaskStore(); /* mark the new TaskStore as "dirty" until the data directory really gets scanned */ serial = task_list_serial - 1; }
void PageListWidget::Initialise(ContainerWindow &parent, const PixelRect &rc) { settings = CommonInterface::GetUISettings().pages; auto end = std::remove_if(settings.pages.begin(), settings.pages.end(), [](const PageLayout &layout) { return !layout.IsDefined(); }); unsigned n = std::distance(settings.pages.begin(), end); CreateList(parent, UIGlobals::GetDialogLook(), rc, Layout::Scale(18)).SetLength(n); CreateButtons(buttons->GetButtonPanel()); UpdateButtons(); }