本文整理汇总了C++中JXWindow::InstallShortcuts方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindow::InstallShortcuts方法的具体用法?C++ JXWindow::InstallShortcuts怎么用?C++ JXWindow::InstallShortcuts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXWindow
的用法示例。
在下文中一共展示了JXWindow::InstallShortcuts方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
JXButton::SetShortcuts
(
const JCharacter* list
)
{
JXWindow* w = GetWindow();
w->ClearShortcuts(this);
w->InstallShortcuts(this, list);
const JBoolean wasReturnButton = itsIsReturnButtonFlag;
itsIsReturnButtonFlag = kJFalse;
if (list != NULL)
{
JString shortcuts = list;
if (shortcuts.Contains("^M") || shortcuts.Contains("^m"))
{
itsIsReturnButtonFlag = kJTrue;
}
}
const JSize borderWidth = GetBorderWidth();
if (!wasReturnButton && itsIsReturnButtonFlag)
{
SetBorderWidth(borderWidth+1);
}
else if (wasReturnButton && !itsIsReturnButtonFlag && borderWidth > 0)
{
SetBorderWidth(borderWidth-1);
}
Refresh();
}
示例2: GetWindow
void
JXDialogDirector::SetButtons
(
JXButton* okButton,
JXButton* cancelButton
)
{
assert( !itsModalFlag || okButton != NULL );
JXWindow* window = GetWindow();
assert( window != NULL );
if (itsModalFlag)
{
window->HideFromTaskbar();
}
itsOKButton = okButton;
if (itsOKButton != NULL)
{
ListenTo(itsOKButton);
}
itsCancelButton = cancelButton;
if (itsCancelButton != NULL)
{
ListenTo(itsCancelButton);
window->InstallShortcuts(itsCancelButton, "^[");
}
}
示例3: GetWindow
void
JXCheckbox::SetShortcuts
(
const JCharacter* list
)
{
JXWindow* w = GetWindow();
w->ClearShortcuts(this);
w->InstallShortcuts(this, list);
Refresh();
}
示例4: JXMenuBar
//.........这里部分代码省略.........
JArray<JCoordinate> sizes;
JArray<JCoordinate> minSizes;
sizes.AppendElement(headerheight);
minSizes.AppendElement(20);
sizes.AppendElement(w - headerheight);
minSizes.AppendElement(50);
JIndex elasticIndex = 2;
itsPart =
new JXVertPartition(sizes, elasticIndex,
minSizes, itsToolBar->GetWidgetEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic,
0, 0,
w, newHeight);
assert(itsPart != NULL);
itsSBSet =
new JXScrollbarSet(itsPart->GetCompartment(2),
JXWidget::kHElastic, JXWidget::kVElastic,
0,0,
100,100);
assert(itsSBSet != NULL);
itsSBSet->FitToEnclosure(kJTrue, kJTrue);
itsView =
new GMessageView(menuBar, itsSBSet, itsSBSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic,
0,0,10,10);
assert (itsView != NULL);
itsView->FitToEnclosure(kJTrue, kJTrue);
itsView->SetPTPrinter(GMGetAltPTPrinter());
window->InstallShortcuts(itsView, "#_");
ListenTo(itsView);
JXScrollbarSet* sbs =
new JXScrollbarSet(itsPart->GetCompartment(1),
JXWidget::kHElastic, JXWidget::kVElastic,
0,0,
100,50);
assert(sbs != NULL);
sbs->FitToEnclosure(kJTrue, kJTrue);
itsHeader =
new GMessageView(sbs, sbs->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic,
0,0,10,10);
assert (itsHeader != NULL);
itsHeader->FitToEnclosure(kJTrue, kJTrue);
itsHeader->ShareEditMenu(itsView);
itsHeader->ShareSearchMenu(itsView);
GMDirectorMenu* menu =
new GMDirectorMenu(kWindowsMenuTitleStr, menuBar,
JXWidget::kFixedLeft, JXWidget::kVElastic, 0,0, 10,10);
assert(menu != NULL);
menuBar->AppendMenu(menu);
itsPrefsMenu = menuBar->AppendTextMenu(kPrefsMenuTitleStr);
itsPrefsMenu->SetMenuItems(kPrefsMenuStr);
itsPrefsMenu->SetUpdateAction(JXMenu::kDisableNone);
ListenTo(itsPrefsMenu);
itsHelpMenu = menuBar->AppendTextMenu(kHelpMenuTitleStr);