当前位置: 首页>>代码示例>>C++>>正文


C++ JXWindow::GetFrame方法代码示例

本文整理汇总了C++中JXWindow::GetFrame方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindow::GetFrame方法的具体用法?C++ JXWindow::GetFrame怎么用?C++ JXWindow::GetFrame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JXWindow的用法示例。


在下文中一共展示了JXWindow::GetFrame方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: JXDownRect

void
JXSearchTextDialog::SetObjects
	(
	JXInputField*			searchInput,
	JXStringHistoryMenu*	prevSearchMenu,
	JXTextCheckbox*			ignoreCaseCB,
	JXTextCheckbox*			entireWordCB,
	JXTextCheckbox*			wrapSearchCB,
	JXTextCheckbox*			searchIsRegexCB,
	JXTextCheckbox*			singleLineCB,

	JXInputField*			replaceInput,
	JXStringHistoryMenu*	prevReplaceMenu,
	JXTextCheckbox*			replaceIsRegexCB,
	JXTextCheckbox*			preserveCaseCB,

	JXTextCheckbox*			stayOpenCB,
	JXTextCheckbox*			retainFocusCB,

	JXSearchTextButton*		findFwdButton,
	JXSearchTextButton*		findBackButton,
	JXTextButton*			replaceButton,
	JXSearchTextButton*		replaceFindFwdButton,
	JXSearchTextButton*		replaceFindBackButton,
	JXSearchTextButton*		replaceAllFwdButton,
	JXSearchTextButton*		replaceAllBackButton,
	JXTextButton*			replaceAllInSelButton,

	JXTextButton*			closeButton,
	JXTextButton*			helpButton,
	JXTextButton*			qRefButton
	)
{
	JXWindow* window = searchInput->GetWindow();
	window->SetTitle("Search text");
	window->SetCloseAction(JXWindow::kDeactivateDirector);
	window->PlaceAsDialogWindow();
	window->LockCurrentMinSize();
	window->ShouldFocusWhenShow(kJTrue);
	ListenTo(window);

	itsSearchInput     = searchInput;
	itsPrevSearchMenu  = prevSearchMenu;
	itsIgnoreCaseCB    = ignoreCaseCB;
	itsEntireWordCB    = entireWordCB;
	itsWrapSearchCB    = wrapSearchCB;
	itsSearchIsRegexCB = searchIsRegexCB;
	itsSingleLineCB    = singleLineCB;

	itsReplaceInput     = replaceInput;
	itsPrevReplaceMenu  = prevReplaceMenu;
	itsReplaceIsRegexCB = replaceIsRegexCB;
	itsPreserveCaseCB   = preserveCaseCB;

	itsStayOpenCB    = stayOpenCB;
	itsRetainFocusCB = retainFocusCB;

	itsFindFwdButton         = findFwdButton;
	itsFindBackButton        = findBackButton;
	itsReplaceButton         = replaceButton;
	itsReplaceFindFwdButton  = replaceFindFwdButton;
	itsReplaceFindBackButton = replaceFindBackButton;
	itsReplaceAllFwdButton   = replaceAllFwdButton;
	itsReplaceAllBackButton  = replaceAllBackButton;
	itsReplaceAllInSelButton = replaceAllInSelButton;

	itsCloseButton = closeButton;
	itsHelpButton  = helpButton;
	itsQRefButton  = qRefButton;

	SetFont(JGetMonospaceFontName(), kJDefaultMonoFontSize);

	// decor

	const JRect wFrame  = window->GetFrame();
	const JRect soFrame = itsStayOpenCB->GetFrame();

	JXDownRect* line =
		new JXDownRect(window, JXWidget::kFixedLeft, JXWidget::kFixedTop,
					   soFrame.left, soFrame.top-6,
					   wFrame.right-10-soFrame.left, 2);
	assert( line != NULL );
	line->SetBorderWidth(1);

	// shortcuts

    itsCloseButton->SetShortcuts("#W^[");
    itsIgnoreCaseCB->SetShortcuts("#I");
    itsWrapSearchCB->SetShortcuts("#S");
    itsEntireWordCB->SetShortcuts("#E");
    itsSearchIsRegexCB->SetShortcuts("#X");
    itsSingleLineCB->SetShortcuts("#T");
    itsPreserveCaseCB->SetShortcuts("#P");

	if (JXMenu::GetDefaultStyle() == JXMenu::kMacintoshStyle)
		{
		itsFindFwdButton->SetShortcuts("#G");
		itsFindFwdButton->SetHint("Return / Meta-G");

		itsFindBackButton->SetHint("Shift-Return / Meta-Shift-G");
//.........这里部分代码省略.........
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:101,代码来源:JXSearchTextDialog.cpp

示例2: JXStaticText


//.........这里部分代码省略.........
	itsChooseDirButton =
		jnew JXTextButton(JGetString("itsChooseDirButton::CBSearchTextDialog::JXLayout"), window,
					JXWidget::kFixedRight, JXWidget::kFixedTop, 380,270, 60,20);
	assert( itsChooseDirButton != NULL );

	itsInvertFileFilterCB =
		jnew JXTextCheckbox(JGetString("itsInvertFileFilterCB::CBSearchTextDialog::JXLayout"), window,
					JXWidget::kFixedRight, JXWidget::kFixedTop, 380,300, 60,20);
	assert( itsInvertFileFilterCB != NULL );

	itsPathFilterInput =
		jnew JXInputField(window,
					JXWidget::kHElastic, JXWidget::kFixedTop, 255,330, 155,20);
	assert( itsPathFilterInput != NULL );

	itsPathFilterHistory =
		jnew CBSearchFilterHistoryMenu(kHistoryLength, "", window,
					JXWidget::kFixedRight, JXWidget::kFixedTop, 410,330, 30,20);
	assert( itsPathFilterHistory != NULL );

// end JXLayout

	SetObjects(searchInput, prevSearchMenu,
			   ignoreCaseCB, entireWordCB, wrapSearchCB,
			   searchIsRegexCB, singleLineCB,
			   replaceInput, prevReplaceMenu,
			   replaceIsRegexCB, preserveCaseCB,
			   stayOpenCB, retainFocusCB,
			   findFwdButton, findBackButton,
			   replaceButton,
			   replaceFindFwdButton, replaceFindBackButton,
			   replaceAllFwdButton, replaceAllBackButton,
			   replaceAllInSelButton,
			   closeButton, helpButton, qRefButton);

	ListenTo(itsSearchDirCB);
	ListenTo(itsDirInput);
	ListenTo(itsMultifileCB);

	itsFileList =
		jnew JXFileListTable(scrollbarSet, scrollbarSet->GetScrollEnclosure(),
							JXWidget::kHElastic, JXWidget::kVElastic,
							0,0, 10,10);
	assert( itsFileList != NULL );
	itsFileList->FitToEnclosure();
	itsFileList->ShouldAcceptFileDrop();
	itsFileList->BackspaceShouldRemoveSelectedFiles();
	ListenTo(itsFileList);

	itsFileListMenu->SetMenuItems(kFileListMenuStr, "CBSearchTextDialog");
	ListenTo(itsFileListMenu);

	ListenTo(itsChooseDirButton);
	ListenTo(itsDirHistory);
	ListenTo(itsFileFilterHistory);
	ListenTo(itsPathFilterHistory);

	const JFont& font = window->GetFontManager()->GetDefaultMonospaceFont();

	itsDirInput->ShouldAllowInvalidPath();
	itsDirHistory->SetDefaultFont(font, kJTrue);
	itsFileFilterInput->SetDefaultFont(font);
	itsFileFilterHistory->SetDefaultFont(font, kJTrue);
	itsPathFilterInput->SetDefaultFont(font);
	itsPathFilterHistory->SetDefaultFont(font, kJTrue);
	itsRecurseDirCB->SetState(kJTrue);

	UpdateBasePath();
	ListenTo(CBGetDocumentManager());

	CBPrefsManager* prefsMgr = CBGetPrefsManager();
	JPrefObject::ReadPrefs();

	JString fontName;
	JSize fontSize;
	prefsMgr->GetDefaultFont(&fontName, &fontSize);
	SetFont(fontName, fontSize);

	searchInput->SetCharacterInWordFunction(CBMIsCharacterInWord);
	replaceInput->SetCharacterInWordFunction(CBMIsCharacterInWord);

	// create hidden JXDocument so Meta-# shortcuts work

	JXDocumentMenu* fileListMenu =
		jnew JXDocumentMenu("", window,
						   JXWidget::kFixedLeft, JXWidget::kFixedTop, 0,-20, 10,10);
	assert( fileListMenu != NULL );

	// decor

	const JRect wFrame  = window->GetFrame();
	const JRect cbFrame = itsSearchDirCB->GetFrame();

	JXDownRect* line =
		jnew JXDownRect(window, JXWidget::kFixedLeft, JXWidget::kFixedTop,
					   cbFrame.left, cbFrame.top-6,
					   wFrame.right-10-cbFrame.left, 2);
	assert( line != NULL );
	line->SetBorderWidth(1);
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:101,代码来源:CBSearchTextDialog.cpp


注:本文中的JXWindow::GetFrame方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。