本文整理汇总了C++中JXWindow::GetBounds方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindow::GetBounds方法的具体用法?C++ JXWindow::GetBounds怎么用?C++ JXWindow::GetBounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXWindow
的用法示例。
在下文中一共展示了JXWindow::GetBounds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: JXTextButton
CBExecOutputDocument::CBExecOutputDocument
(
const CBTextFileType fileType,
const JCharacter* helpSectionName,
const JBoolean focusToCmd,
const JBoolean allowStop
)
:
CBTextDocument(fileType, helpSectionName, kJFalse),
itsFocusToCmdFlag(focusToCmd)
{
itsProcess = NULL;
itsRecordLink = NULL;
itsDataLink = NULL;
itsCmdStream = NULL;
itsReceivedDataFlag = kJFalse;
itsProcessPausedFlag = kJFalse;
itsClearWhenStartFlag = kJTrue;
itsUseCount = 0;
itsDontCloseMsg = JGetString("WaitCloseMsg::CBExecOutputDocument");
// buttons in upper right
JXWindow* window = GetWindow();
const JRect rect = window->GetBounds();
JXMenuBar* menuBar = GetMenuBar();
const JSize h = menuBar->GetFrameHeight();
const JCoordinate x = (allowStop ? 3 : 2) * kMenuButtonWidth;
itsPauseButton =
jnew JXTextButton(JGetString("PauseLabel::CBExecOutputDocument"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop,
rect.right - x,0, kMenuButtonWidth,h);
assert( itsPauseButton != NULL );
ListenTo(itsPauseButton);
itsPauseButton->SetShortcuts("^Z");
itsPauseButton->SetHint(JGetString("PauseButtonHint::CBExecOutputDocument"));
if (allowStop)
{
itsStopButton =
jnew JXTextButton(JGetString("StopLabel::CBExecOutputDocument"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop,
rect.right - 2*kMenuButtonWidth,0, kMenuButtonWidth,h);
assert( itsStopButton != NULL );
ListenTo(itsStopButton);
itsStopButton->SetShortcuts("^C#.");
itsStopButton->SetHint(JGetString("StopButtonHint::CBExecOutputDocument"));
}
else
{
itsStopButton = NULL;
}
itsKillButton =
jnew JXTextButton(JGetString("KillLabel::CBExecOutputDocument"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop,
rect.right - kMenuButtonWidth,0, kMenuButtonWidth,h);
assert( itsKillButton != NULL );
ListenTo(itsKillButton);
if (!allowStop)
{
itsKillButton->SetShortcuts("^C#.");
itsKillButton->SetHint(JGetString("StopButtonHint::CBExecOutputDocument"));
}
menuBar->AdjustSize(-x, 0);
// command line input
JXWidget::HSizingOption hSizing;
JXWidget::VSizingOption vSizing;
GetFileDisplayInfo(&hSizing, &vSizing);
itsCmdPrompt =
jnew JXStaticText(JGetString("CmdPrompt::CBExecOutputDocument"), window,
JXWidget::kFixedLeft, vSizing,
-1000, -1000, 0, 500);
assert( itsCmdPrompt != NULL );
itsCmdPrompt->SetToLabel();
itsCmdPrompt->Hide();
itsCmdInput =
jnew CBCmdLineInput(this, window, hSizing, vSizing,
-1000, -1000, 500, 500);
assert( itsCmdInput != NULL );
itsCmdInput->ShareEditMenu(GetTextEditor());
itsCmdInput->Hide();
itsEOFButton =
jnew JXTextButton(JGetString("EOFButtonTitle::CBExecOutputDocument"), window,
JXWidget::kFixedRight, vSizing,
-1000, -1000, 500, 500);
assert( itsEOFButton != NULL );
itsEOFButton->SetShortcuts("^D");
itsEOFButton->Hide();
ListenTo(itsEOFButton);
//.........这里部分代码省略.........