本文整理汇总了C++中JXWindow::SetMaxSize方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindow::SetMaxSize方法的具体用法?C++ JXWindow::SetMaxSize怎么用?C++ JXWindow::SetMaxSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXWindow
的用法示例。
在下文中一共展示了JXWindow::SetMaxSize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: JXScrollbarSet
void
DragWidgetDir::BuildWindow()
{
// Create the window
JXWindow* window = new JXWindow(this, 300,200, "Drag Painter Program");
assert( window != NULL );
// Give the window to the director
SetWindow(window);
// Set the window sizing
window->SetMinSize(300,200);
window->SetMaxSize(800,600);
// Create the scrollbar set
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 300,200);
assert( scrollbarSet != NULL );
// Create the custom widget with the scrollbarset as its enclosure
DragWidget* widget =
new DragWidget(scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic,
0, 0, 10, 10);
assert( widget != NULL );
// Fit the widget within the scrollbarset enclosure
widget->FitToEnclosure(kJTrue, kJTrue);
}
示例2: JXScrollbarSet
void
SimpleTableDir::BuildWindow()
{
// Create the window
JXWindow* window = new JXWindow(this, 300,200, "Test SimpleTable Program");
assert( window != NULL );
// Give the window to the director
SetWindow(window);
// Set sizing
window->SetMinSize(300,200);
window->SetMaxSize(800,600);
// Create the scrollbar set to hold the table
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 300,200);
assert( scrollbarSet != NULL );
// Create our SimpleTable. It must be placed inside the
// special widget that JXScrollbarSet creates. We get a
// pointer to this special widget by calling GetScrollEnclosure().
SimpleTable* table =
new SimpleTable(scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic,
0, 0, 10, 10);
assert( table != NULL );
table->FitToEnclosure();
}
示例3: Widget
void
WidgetDir::BuildWindow()
{
// Create the window
JXWindow* window = jnew JXWindow(this, 300,200, "Test Widget Program");
assert( window != NULL );
// Set sizing
window->SetMinSize(300,200);
window->SetMaxSize(800,600);
// Create our custom widget
Widget* widget =
jnew Widget(window, JXWidget::kHElastic, JXWidget::kVElastic,
0, 0, 300, 200);
assert( widget != NULL );
}
示例4: JXMenuBar
void
SelectionTableDir::BuildWindow()
{
// Create the window
JXWindow* window = new JXWindow(this, 300,200, "Test SelectionTable Program");
assert( window != NULL );
// Give the window to the director
SetWindow(window);
// Set sizing
window->SetMinSize(300,200);
window->SetMaxSize(800,600);
// Create the menu bar so that it stays on top, but expands as the window
// expands.
JXMenuBar* menuBar =
new JXMenuBar(window, JXWidget::kHElastic, JXWidget::kFixedTop,
0,0, 300,kJXDefaultMenuBarHeight);
assert( menuBar != NULL );
// Create the scrollbar set to hold the table
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic,
0,kJXDefaultMenuBarHeight, 300,200-kJXDefaultMenuBarHeight);
assert( scrollbarSet != NULL );
// Create our SelectionTable. It must be placed inside the
// special widget that JXScrollbarSet creates. We get a
// pointer to this special widget by calling GetScrollEnclosure().
SelectionTable* table =
new SelectionTable(menuBar, itsData,
scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic,
0, 0, 10, 10);
assert( table != NULL );
table->FitToEnclosure();
}