本文整理汇总了C++中PanelControl类的典型用法代码示例。如果您正苦于以下问题:C++ PanelControl类的具体用法?C++ PanelControl怎么用?C++ PanelControl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PanelControl类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Move
void Move(const PixelRect &rc) override {
const Layout layout(rc, waypoint);
if (allow_navigation)
goto_button.Move(layout.goto_button);
if (!images.empty()) {
magnify_button.Move(layout.magnify_button);
shrink_button.Move(layout.shrink_button);
}
if (allow_navigation) {
previous_button.Move(layout.previous_button);
next_button.Move(layout.next_button);
}
close_button.Move(layout.close_button);
info_dock.Move(layout.main);
details_panel.Move(layout.main);
details_text.Move(layout.details_text);
#ifdef HAVE_RUN_FILE
if (!waypoint.files_external.empty())
file_list.Move(layout.file_list);
#endif
commands_dock.Move(layout.main);
if (!images.empty())
image_window.Move(layout.main);
}
示例2: Show
void Show(const PixelRect &rc) override {
const Layout layout(rc, *waypoint);
if (task_manager != nullptr)
goto_button.MoveAndShow(layout.goto_button);
if (!images.empty()) {
magnify_button.MoveAndShow(layout.magnify_button);
shrink_button.MoveAndShow(layout.shrink_button);
}
previous_button.MoveAndShow(layout.previous_button);
next_button.MoveAndShow(layout.next_button);
close_button.MoveAndShow(layout.close_button);
info_dock.Move(layout.main);
details_panel.Move(layout.main);
details_text.Move(layout.details_text);
#ifdef HAVE_RUN_FILE
if (!waypoint->files_external.empty())
file_list.Move(layout.file_list);
#endif
commands_dock.Move(layout.main);
if (!images.empty())
image_window.Move(layout.main);
UpdatePage();
}
示例3:
void
WaypointDetailsWidget::UpdatePage()
{
info_dock.SetVisible(page == 0);
details_panel.SetVisible(page == 1);
commands_dock.SetVisible(page == 2);
bool image_page = page >= 3;
if (!images.empty()) {
image_window.SetVisible(image_page);
magnify_button.SetVisible(image_page);
shrink_button.SetVisible(image_page);
}
}
示例4: Hide
void Hide() override {
if (task_manager != nullptr)
goto_button.Hide();
if (!images.empty()) {
magnify_button.Hide();
shrink_button.Hide();
}
previous_button.Hide();
next_button.Hide();
close_button.Hide();
info_dock.Hide();
details_panel.Hide();
commands_dock.Hide();
if (!images.empty())
image_window.Hide();
}
示例5: Hide
void Hide() override {
if (allow_navigation)
goto_button.Hide();
if (!images.empty()) {
magnify_button.Hide();
shrink_button.Hide();
}
if (allow_navigation) {
previous_button.Hide();
next_button.Hide();
}
close_button.Hide();
info_dock.Hide();
details_panel.Hide();
commands_dock.Hide();
if (!images.empty())
image_window.Hide();
}
示例6: Move
void Move(const PixelRect &rc) override {
const Layout layout(rc, look);
waypoint_panel.Move(layout.waypoint_panel);
tp_panel.Move(layout.tp_panel);
MoveChildren(layout);
}
示例7: Hide
void Hide() override {
waypoint_panel.Hide();
tp_panel.Hide();
}
示例8: layout
void
WaypointDetailsWidget::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
for (const auto &i : waypoint.files_embed) {
if (images.full())
break;
try {
if (!images.append().LoadFile(LocalPath(i.c_str())))
images.shrink(images.size() - 1);
} catch (const std::exception &e) {
LogFormat("Failed to load %s: %s",
(const char *)NarrowPathName(Path(i.c_str())),
e.what());
images.shrink(images.size() - 1);
}
}
const Layout layout(rc, waypoint);
WindowStyle dock_style;
dock_style.Hide();
dock_style.ControlParent();
WindowStyle button_style;
button_style.Hide();
button_style.TabStop();
if (allow_navigation)
goto_button.Create(parent, look.button, _("GoTo"), layout.goto_button,
button_style, *this, GOTO);
if (!images.empty()) {
magnify_button.Create(parent, layout.magnify_button, button_style,
new SymbolButtonRenderer(look.button, _T("+")),
*this, MAGNIFY);
shrink_button.Create(parent, layout.shrink_button, button_style,
new SymbolButtonRenderer(look.button, _T("-")),
*this, SHRINK);
}
if (allow_navigation) {
previous_button.Create(parent, layout.previous_button, button_style,
new SymbolButtonRenderer(look.button, _T("<")),
*this, PREVIOUS);
next_button.Create(parent, layout.next_button, button_style,
new SymbolButtonRenderer(look.button, _T(">")),
*this, NEXT);
}
close_button.Create(parent, look.button, _("Close"), layout.close_button,
button_style, dialog, mrOK);
info_dock.Create(parent, layout.main, dock_style);
info_dock.SetWidget(&info_widget);
details_panel.Create(parent, look, layout.main, dock_style);
details_text.Create(details_panel, layout.details_text);
details_text.SetFont(look.text_font);
details_text.SetText(waypoint.details.c_str());
#ifdef HAVE_RUN_FILE
const unsigned num_files = std::distance(waypoint.files_external.begin(),
waypoint.files_external.end());
if (num_files > 0) {
file_list.Create(details_panel, layout.file_list,
WindowStyle(), layout.file_list_item_height);
file_list.SetItemRenderer(&file_list_handler);
file_list.SetCursorHandler(&file_list_handler);
file_list.SetLength(num_files);
}
#endif
commands_dock.Create(parent, layout.main, dock_style);
commands_dock.SetWidget(&commands_widget);
if (!images.empty())
image_window.Create(parent, layout.main, dock_style,
[this](Canvas &canvas, const PixelRect &rc){
OnImagePaint(canvas, rc);
});
last_page = 2 + images.size();
}