本文整理汇总了C++中JXWindow::SetMinSize方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindow::SetMinSize方法的具体用法?C++ JXWindow::SetMinSize怎么用?C++ JXWindow::SetMinSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXWindow
的用法示例。
在下文中一共展示了JXWindow::SetMinSize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: JXScrollbarSet
void
JX2DCursorMarkTableDir::BuildWindow
(
J2DPlotWidget* plot
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 250,200, "");
assert( window != NULL );
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 250,200);
assert( scrollbarSet != NULL );
// end JXLayout
window->SetTitle("Cursor Mark Values");
window->SetMinSize(250,300);
window->SetCloseAction(JXWindow::kDeactivateDirector);
itsTable =
new JX2DCursorMarkTable(plot,
scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 10,10);
assert (itsTable != NULL);
itsTable->FitToEnclosure();
}
示例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: 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);
}
示例4: JXScrollbarSet
JXScrollbarSet*
CBFnListDirector::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 170,250, "");
assert( window != NULL );
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic, 0,30, 170,220);
assert( scrollbarSet != NULL );
JXMenuBar* menuBar =
new JXMenuBar(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 0,0, 170,30);
assert( menuBar != NULL );
// end JXLayout
window->SetMinSize(150,150);
itsActionsMenu = menuBar->AppendTextMenu(kActionsMenuTitleStr);
itsActionsMenu->SetMenuItems(kActionsMenuStr, "CBFnListDirector");
ListenTo(itsActionsMenu);
return scrollbarSet;
}
示例5: JXMenuBar
void
SCXferFnDirector::BuildWindow
(
SCCircuitDocument* doc
)
{
JArray<JCoordinate> heights(2);
heights.AppendElement(kInitExprHeight);
heights.AppendElement(kInitExprHeight);
JArray<JCoordinate> minHeights(2);
minHeights.AppendElement(kMinExprHeight);
minHeights.AppendElement(kMinExprHeight);
// begin JXLayout
JXWindow* window = new JXWindow(this, 500,230, "");
assert( window != NULL );
JXMenuBar* menuBar =
new JXMenuBar(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 0,0, 430,30);
assert( menuBar != NULL );
itsPartition =
new JXVertPartition(heights, 0, minHeights, window,
JXWidget::kHElastic, JXWidget::kVElastic, 0,30, 500,205);
assert( itsPartition != NULL );
itsEvalButton =
new JXTextButton(JGetString("itsEvalButton::SCXferFnDirector::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 430,0, 70,30);
assert( itsEvalButton != NULL );
// end JXLayout
window->SetTitle("Transfer function");
const JRect frame = itsPartition->GetFrame();
window->SetMinSize(150, frame.top + itsPartition->GetMinTotalSize());
ListenTo(itsEvalButton);
SCExprEditorSet* exprSet =
new SCExprEditorSet(doc, menuBar, &itsXferFn,
itsPartition->GetCompartment(1),
JXWidget::kHElastic, JXWidget::kVElastic,
0,0, 100,100);
assert( exprSet != NULL );
exprSet->FitToEnclosure();
exprSet =
new SCExprEditorSet(doc, itsXferFn, &itsResult,
itsPartition->GetCompartment(2),
JXWidget::kHElastic, JXWidget::kVElastic,
0,0, 100,100);
assert( exprSet != NULL );
exprSet->FitToEnclosure();
}
示例6: JXHorizDockPartition
void
JXDockDirector::BuildWindow
(
const JCharacter* title,
const JBoolean splitHoriz
)
{
const JCoordinate kSize = 300;
JArray<JCoordinate> sizes;
sizes.AppendElement(kSize);
sizes.AppendElement(kSize);
JArray<JCoordinate> minSizes;
minSizes.AppendElement(JXDockWidget::kDefaultMinSize);
minSizes.AppendElement(JXDockWidget::kDefaultMinSize);
const JCoordinate w = 2*kSize + (splitHoriz ? JPartition::kDragRegionSize : 0);
const JCoordinate h = 2*kSize + (splitHoriz ? 0 : JPartition::kDragRegionSize);
JXWindow* window = jnew JXWindow(this, w, h, title);
assert( window != NULL );
JXImage* icon;
if ((JXGetDockManager())->CreateIcon(&icon))
{
window->SetIcon(icon);
}
if (splitHoriz)
{
itsHorizPartition =
jnew JXHorizDockPartition(this, NULL, sizes, 0, minSizes,
window, JXWidget::kHElastic, JXWidget::kVElastic,
0,0, w,h);
assert( itsHorizPartition != NULL );
}
else
{
itsVertPartition =
jnew JXVertDockPartition(this, NULL, sizes, 0, minSizes,
window, JXWidget::kHElastic, JXWidget::kVElastic,
0,0, w,h);
assert( itsVertPartition != NULL );
}
window->SetMinSize(100,100);
window->SetWMClass("Dock", JXGetDockWindowClass());
}
示例7: 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 );
}
示例8: JXMenuBar
void
GloveHistoryDir::BuildWindow()
{
JCoordinate w = 485;
JCoordinate h = 320;
JPoint dtl;
// JBoolean foundWindowPref = gjdbApp->GetCmdWindowSize(&dtl, &w, &h);
JXWindow* window = jnew JXWindow(this, w,h, "Glove session");
assert( window != NULL );
window->SetMinSize(300,200);
window->SetCloseAction(JXWindow::kDeactivateDirector);
// if (foundWindowPref)
// {
// window->Place(dtl.x, dtl.y);
// }
itsMenuBar =
jnew JXMenuBar(window, JXWidget::kHElastic, JXWidget::kFixedTop,
0,0, w,kJXDefaultMenuBarHeight);
assert( itsMenuBar != NULL );
itsFileMenu = itsMenuBar->AppendTextMenu(kFileMenuTitleStr);
itsFileMenu->SetMenuItems(kFileMenuStr);
itsFileMenu->SetUpdateAction(JXMenu::kDisableNone);
ListenTo(itsFileMenu);
JXScrollbarSet* scrollbarSet =
jnew JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic,
0,kJXDefaultMenuBarHeight,
w,h - kJXDefaultMenuBarHeight);
assert( scrollbarSet != NULL );
itsHistory =
jnew GloveHistory(itsMenuBar,
scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic,
0, 0, 10, 10);
assert( itsHistory != NULL );
itsHistory->FitToEnclosure(kJTrue, kJTrue);
ListenTo(itsHistory);
}
示例9: JXScrollbarSet
GloveCursorTableDir::GloveCursorTableDir
(
PlotDir* supervisor,
GlovePlotter* plot
)
:
JXWindowDirector(supervisor)
{
itsPlotDir = supervisor;
JXWindow* window = new JXWindow(this, 250,300, "Cursor Values");
assert( window != NULL );
window->SetMinSize(250,300);
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic,
0,0,250,260);
itsTable =
new GloveCursorTable(itsPlotDir->GetSessionDir(), plot,
scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic,
0,0,250,260);
assert (itsTable != NULL);
itsCloseButton =
new JXTextButton("Close", window,
JXWidget::kHElastic, JXWidget::kVElastic,
10, 270, 70, 20);
assert( itsCloseButton != NULL );
itsCloseButton->SetShortcuts("#W");
ListenTo(itsCloseButton);
itsSessionButton =
new JXTextButton("Session", window,
JXWidget::kHElastic, JXWidget::kVElastic,
100, 270, 70, 20);
assert( itsSessionButton != NULL );
ListenTo(itsSessionButton);
}
示例10: JXMenuBar
void
Test2DPlotDirector::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 600,400, "");
assert( window != NULL );
JXMenuBar* menuBar =
new JXMenuBar(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 0,0, 600,30);
assert( menuBar != NULL );
itsPlotWidget =
new JX2DPlotWidget(menuBar, window,
JXWidget::kHElastic, JXWidget::kVElastic, 0,30, 600,370);
assert( itsPlotWidget != NULL );
// end JXLayout
window->SetMinSize(300, 200);
itsPSPrinter = new JXPSPrinter(GetDisplay());
assert( itsPSPrinter != NULL );
itsPlotWidget->SetPSPrinter(itsPSPrinter);
itsEPSPrinter = new JX2DPlotEPSPrinter(GetDisplay());
assert( itsEPSPrinter != NULL );
itsPlotWidget->SetEPSPrinter(itsEPSPrinter);
ListenTo(itsPlotWidget);
itsActionsMenu = menuBar->PrependTextMenu(kActionsMenuTitleStr);
itsActionsMenu->SetMenuItems(kActionsMenuStr);
itsActionsMenu->SetUpdateAction(JXMenu::kDisableNone);
ListenTo(itsActionsMenu);
// do this after everything is constructed so Receive() doesn't crash
itsPlotWidget->SetTitle("New plot");
}
示例11: 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();
}
示例12: JXMenuBar
void
SCCircuitDocument::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 260,300, "");
assert( window != NULL );
JXMenuBar* menuBar =
new JXMenuBar(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 0,0, 260,30);
assert( menuBar != NULL );
itsNetlistText =
new JXStaticText("", kJFalse, kJTrue, NULL, JGetString("itsNetlistText::SCCircuitDocument::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 0,30, 260,270);
assert( itsNetlistText != NULL );
// end JXLayout
window->SetCloseAction(JXWindow::kQuitApp);
window->SetMinSize(100,100);
itsFileMenu = menuBar->AppendTextMenu(kFileMenuTitleStr);
itsFileMenu->SetMenuItems(kFileMenuStr);
itsFileMenu->SetUpdateAction(JXMenu::kDisableNone);
ListenTo(itsFileMenu);
itsAnalysisMenu = menuBar->AppendTextMenu(kAnalysisMenuTitleStr);
itsAnalysisMenu->SetMenuItems(kAnalysisMenuStr);
itsAnalysisMenu->SetUpdateAction(JXMenu::kDisableNone);
ListenTo(itsAnalysisMenu);
itsHelpMenu = menuBar->AppendTextMenu(kHelpMenuTitleStr);
itsHelpMenu->SetMenuItems(kHelpMenuStr);
itsHelpMenu->SetUpdateAction(JXMenu::kDisableNone);
ListenTo(itsHelpMenu);
}
示例13: GetWindow
void
CBExecOutputDocument::PlaceCmdLineWidgets()
{
JXWindow* window = GetWindow();
JXWidget::HSizingOption hSizing;
JXWidget::VSizingOption vSizing;
const JRect fileRect = GetFileDisplayInfo(&hSizing, &vSizing);
itsCmdPrompt->Place(fileRect.left, fileRect.top);
itsCmdPrompt->AdjustSize(0, fileRect.height() - itsCmdPrompt->GetFrameHeight());
const JCoordinate promptWidth = itsCmdPrompt->GetFrameWidth();
const JCoordinate eofWidth =
itsEOFButton->GetFont().GetStringWidth(itsEOFButton->GetLabel()) +
2 * itsEOFButton->GetPadding().x +
2 * itsEOFButton->GetBorderWidth();
itsCmdInput->Place(fileRect.left + promptWidth, fileRect.top);
JCoordinate cmdInputWidth = fileRect.width() - promptWidth - eofWidth;
if (cmdInputWidth < kMinCmdInputWidth)
{
window->AdjustSize(kMinCmdInputWidth - cmdInputWidth, 0);
cmdInputWidth = kMinCmdInputWidth;
}
itsCmdInput->SetSize(cmdInputWidth, fileRect.height());
const JPoint p = window->GetMinSize();
window->SetMinSize(window->GetFrameWidth() - (cmdInputWidth - kMinCmdInputWidth), p.y);
itsEOFButton->Place(fileRect.right - eofWidth, fileRect.top);
itsEOFButton->SetSize(eofWidth, fileRect.height());
UpdateButtons();
}
示例14: JXVertPartition
void
SCFeedbackDirector::BuildWindow
(
SCCircuitDocument* doc
)
{
const SCCircuit* circuit = doc->GetCircuit();
JArray<JCoordinate> heights(4);
heights.AppendElement(kInitExprHeight);
heights.AppendElement(kInitExprHeight);
heights.AppendElement(kInitExprHeight);
heights.AppendElement(kInitExprHeight);
JArray<JCoordinate> minHeights(4);
minHeights.AppendElement(kMinExprHeight);
minHeights.AppendElement(kMinExprHeight);
minHeights.AppendElement(kMinExprHeight);
minHeights.AppendElement(kMinExprHeight);
// begin JXLayout
JXWindow* window = new JXWindow(this, 360,520, "");
assert( window != NULL );
itsMainPartition =
new JXVertPartition(heights, 0, minHeights, window,
JXWidget::kHElastic, JXWidget::kVElastic, 0,110, 365,415);
assert( itsMainPartition != NULL );
itsInputSource =
new SCComponentMenu(circuit, SCACSourceFilter, "Input source:", window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 150,30);
assert( itsInputSource != NULL );
itsDepSource =
new SCComponentMenu(circuit, SCDepSourceFilter, "Dependent source:", window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,60, 150,30);
assert( itsDepSource != NULL );
itsEvalButton =
new JXTextButton(JGetString("itsEvalButton::SCFeedbackDirector::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 230,20, 80,20);
assert( itsEvalButton != NULL );
JXStaticText* layoutMessage =
new JXStaticText(JGetString("layoutMessage::SCFeedbackDirector::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 240,50, 110,60);
assert( layoutMessage != NULL );
// end JXLayout
const JCoordinate kMinWindowWidth = window->GetBoundsWidth();
window->SetTitle("Feedback Theorem");
window->SetMinSize(kMinWindowWidth, window->GetBoundsHeight());
layoutMessage->SetText(
"Output fn\nH0 | Hinf\n T | Tn\nScratch area");
itsInputSource->SetToPopupChoice(kJTrue);
itsDepSource->SetToPopupChoice(kJTrue);
ListenTo(itsEvalButton);
// create sub-partitions
const JCoordinate w =
(itsMainPartition->GetBoundsWidth() - JPartition::kDragRegionSize)/2;
JArray<JCoordinate> widths(2);
widths.AppendElement(w);
widths.AppendElement(w);
const JCoordinate wMin = (kMinWindowWidth - JPartition::kDragRegionSize)/2;
JArray<JCoordinate> minWidths(2);
minWidths.AppendElement(wMin);
minWidths.AppendElement(wMin);
JXContainer* encl = itsMainPartition->GetCompartment(2);
itsHPartition =
new JXHorizPartition(widths, 0, minWidths, encl,
JXWidget::kHElastic, JXWidget::kVElastic,
0,0, encl->GetBoundsWidth(), encl->GetBoundsHeight());
assert( itsHPartition != NULL );
encl = itsMainPartition->GetCompartment(3);
itsTPartition =
new JXHorizPartition(widths, 0, minWidths, encl,
JXWidget::kHElastic, JXWidget::kVElastic,
0,0, encl->GetBoundsWidth(), encl->GetBoundsHeight());
assert( itsTPartition != NULL );
// create expressions
SCExprEditorSet* exprSet =
new SCExprEditorSet(doc, &itsOutputFn,
itsMainPartition->GetCompartment(1),
JXWidget::kHElastic, JXWidget::kVElastic,
0,0, 100,100);
assert( exprSet != NULL );
//.........这里部分代码省略.........
示例15: CMArrayExprInput
void
CMArray1DDir::BuildWindow()
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 300,500, "");
assert( window != NULL );
itsExprInput =
jnew CMArrayExprInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 110,40, 170,20);
assert( itsExprInput != NULL );
JXStaticText* startLabel =
jnew JXStaticText(JGetString("startLabel::CMArray1DDir::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,70, 90,20);
assert( startLabel != NULL );
startLabel->SetToLabel();
JXStaticText* endLabel =
jnew JXStaticText(JGetString("endLabel::CMArray1DDir::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,100, 90,20);
assert( endLabel != NULL );
endLabel->SetToLabel();
itsStopButton =
jnew JXTextButton(JGetString("itsStopButton::CMArray1DDir::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 200,85, 60,20);
assert( itsStopButton != NULL );
itsStopButton->SetShortcuts(JGetString("itsStopButton::CMArray1DDir::shortcuts::JXLayout"));
JXMenuBar* menuBar =
jnew JXMenuBar(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 0,0, 300,30);
assert( menuBar != NULL );
JXScrollbarSet* scrollbarSet =
jnew JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic, 0,130, 300,370);
assert( scrollbarSet != NULL );
itsStartIndex =
jnew CMArrayIndexInput(window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 110,70, 60,20);
assert( itsStartIndex != NULL );
itsEndIndex =
jnew CMArrayIndexInput(window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 110,100, 60,20);
assert( itsEndIndex != NULL );
JXStaticText* exprLabel =
jnew JXStaticText(JGetString("exprLabel::CMArray1DDir::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,40, 90,20);
assert( exprLabel != NULL );
exprLabel->SetToLabel();
// end JXLayout
window->SetMinSize(300, 200);
window->ShouldFocusWhenShow(kJTrue);
window->SetWMClass(CMGetWMClassInstance(), CMGetArray1DWindowClass());
UpdateWindowTitle();
JXDisplay* display = GetDisplay();
JXImage* icon = jnew JXImage(display, medic_1d_array_window);
assert( icon != NULL );
window->SetIcon(icon);
CMGetPrefsManager()->GetWindowSize(kArray1DWindSizeID, window, kJTrue);
CMVarNode* root = itsLink->CreateVarNode();
assert( root != NULL );
itsTree = jnew JTree(root);
assert( itsTree != NULL );
JNamedTreeList* treeList = jnew JNamedTreeList(itsTree);
assert( treeList != NULL );
itsWidget =
jnew CMVarTreeWidget(itsCommandDir, kJFalse, menuBar, itsTree, treeList,
scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 100,100);
assert(itsWidget != NULL);
itsWidget->FitToEnclosure();
itsExprInput->SetText(itsExpr);
itsExprInput->SetIsRequired();
ListenTo(itsExprInput);
itsStartIndex->SetValue(itsRequestRange.first);
ListenTo(itsStartIndex);
itsEndIndex->SetValue(itsRequestRange.last);
ListenTo(itsEndIndex);
itsStopButton->Hide();
ListenTo(itsStopButton);
// menus
//.........这里部分代码省略.........