本文整理汇总了C++中JXWindow::GetFrameHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindow::GetFrameHeight方法的具体用法?C++ JXWindow::GetFrameHeight怎么用?C++ JXWindow::GetFrameHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXWindow
的用法示例。
在下文中一共展示了JXWindow::GetFrameHeight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: JXMenuBar
void
GMessageViewDir::BuildWindow
(
const JString& mailfile
)
{
JSize w = 500;
JSize h = 300;
JXWindow* window = new JXWindow(this, w,h, mailfile);
assert( window != NULL );
window->SetWMClass(GMGetWMClassInstance(), GMGetViewWindowClass());
GGetPrefsMgr()->GetViewWindowSize(window);
w = window->GetFrameWidth();
h = window->GetFrameHeight();
window->SetMinSize(w, 150);
window->ShouldFocusWhenShow(kJTrue);
JXMenuBar* menuBar =
new JXMenuBar(window,
JXWidget::kHElastic, JXWidget::kFixedTop,
0, 0, w - kJXDefaultMenuBarHeight, kJXDefaultMenuBarHeight);
assert(menuBar != NULL);
JXEngravedRect* eRect =
new JXEngravedRect(window,
JXWidget::kFixedRight, JXWidget::kFixedTop,
w - kJXDefaultMenuBarHeight, 0, kJXDefaultMenuBarHeight, kJXDefaultMenuBarHeight);
assert(eRect != NULL);
GMMessageDragSource* mds =
new GMMessageDragSource(this, window,
JXWidget::kFixedRight, JXWidget::kFixedTop,
w - kJXDefaultMenuBarHeight + kJXDefaultBorderWidth,
0 + kJXDefaultBorderWidth,
kJXDefaultMenuBarHeight - 2 * kJXDefaultBorderWidth + 1,
kJXDefaultMenuBarHeight - 2 * kJXDefaultBorderWidth + 1);
assert(mds != NULL);
itsFileMenu = menuBar->AppendTextMenu(kFileMenuTitleStr);
itsFileMenu->SetMenuItems(kFileMenuStr);
itsFileMenu->SetUpdateAction(JXMenu::kDisableNone);
ListenTo(itsFileMenu);
JPtrArray<JString> nodes(JPtrArrayT::kDeleteAll);
GGetMailboxTreeDir()->GetTopLevelNodes(&nodes);
itsTransferMenu = new JXFSDirMenu(nodes, itsFileMenu, kTransferToCmd, menuBar);
assert(itsTransferMenu != NULL);
ListenTo(itsTransferMenu);
JDirInfo* info;
if (itsTransferMenu->GetDirInfo(&info))
{
info->SetContentFilter(GMGetMailRegexStr());
}
itsCopyMenu = new JXFSDirMenu(nodes, itsFileMenu, kCopyToCmd, menuBar);
assert(itsCopyMenu != NULL);
ListenTo(itsCopyMenu);
if (itsCopyMenu->GetDirInfo(&info))
{
info->SetContentFilter(GMGetMailRegexStr());
}
ListenTo(GGetMailboxTreeDir());
itsMessageMenu = menuBar->AppendTextMenu(kMessageMenuTitleStr);
itsMessageMenu->SetMenuItems(kMessageMenuStr);
itsMessageMenu->SetUpdateAction(JXMenu::kDisableNone);
ListenTo(itsMessageMenu);
itsToolBar =
new JXToolBar(GGetPrefsMgr(), kGViewToolBarID,
menuBar, w, 150, window,
JXWidget::kHElastic, JXWidget::kVElastic,
0, kJXDefaultMenuBarHeight, w, h - kJXDefaultMenuBarHeight);
assert(itsToolBar != NULL);
const JSize newHeight = itsToolBar->GetWidgetEnclosure()->GetBoundsHeight();
const JFontManager* fm = window->GetFontManager();
JSize lineHeight =
fm->GetLineHeight(GGetPrefsMgr()->GetDefaultMonoFont(),
GGetPrefsMgr()->GetDefaultFontSize(),
JFontStyle());
const JCoordinate headerheight = (lineHeight * 4) + (lineHeight/2); //58;
JArray<JCoordinate> sizes;
JArray<JCoordinate> minSizes;
sizes.AppendElement(headerheight);
minSizes.AppendElement(20);
sizes.AppendElement(w - headerheight);
minSizes.AppendElement(50);
JIndex elasticIndex = 2;
//.........这里部分代码省略.........