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


C++ JXScrollbarSet::GetScrollEnclosure方法代码示例

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


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

示例1: CBFnListWidget

CBFnListDirector::CBFnListDirector
	(
	istream&			input,
	const JFileVersion	vers,
	JBoolean*			keep,
	CBTreeDirector*		supervisor,
	JXPSPrinter*		printer,
	const CBTreeWidget*	treeWidget
	)
	:
	JXWindowDirector(supervisor)
{
	JXScrollbarSet* scrollbarSet = BuildWindow();
	(GetWindow())->ReadGeometry(input);

	itsFnListWidget =
		new CBFnListWidget(input, vers, keep, treeWidget, scrollbarSet,
							scrollbarSet->GetScrollEnclosure(),
							JXWidget::kHElastic, JXWidget::kVElastic,
							0,0, 10,10);

	CBFnListDirectorX(supervisor, printer, kJFalse, *keep);

	if (vers >= 24)
		{
		// must read even if !keep so next guy won't fail

		itsFnListWidget->ReadScrollSetup(input);
		}
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:30,代码来源:CBFnListDirector.cpp

示例2: JXScrollbarSet

SCExprEditorSet::SCExprEditorSet
	(
	SCCircuitDocument*		doc,
	SCExprEditor*			menuProvider,
	SCExprEditor**			exprWidget,
	JXContainer*			enclosure,
	const HSizingOption		hSizing,
	const VSizingOption		vSizing,
	const JCoordinate		x,
	const JCoordinate		y,
	const JCoordinate		w,
	const JCoordinate		h
	)
	:
	JXWidgetSet(enclosure, hSizing, vSizing, x,y, w,h)
{
	JXScrollbarSet* scrollbarSet =
		new JXScrollbarSet(this, kHElastic, kVElastic, 0,0, w,h);
	assert( scrollbarSet != NULL );

	*exprWidget =
		new SCExprEditor(doc, menuProvider, scrollbarSet,
						 scrollbarSet->GetScrollEnclosure(),
						 kHElastic, kVElastic, 0,0, 10,10);
	assert( *exprWidget != NULL );

	(**exprWidget).FitToEnclosure();
}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:28,代码来源:SCExprEditorSet.cpp

示例3: 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();
}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:30,代码来源:SimpleTableDir.cpp

示例4: 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();
}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:29,代码来源:JX2DCursorMarkTableDir.cpp

示例5: 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);
}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:30,代码来源:DragWidgetDir.cpp

示例6: JXScrollbarSet

void
CMChooseProcessDialog::BuildWindow()
{
// begin JXLayout

	JXWindow* window = new JXWindow(this, 390,500, "");
	assert( window != NULL );

	JXScrollbarSet* scrollbarSet =
		new JXScrollbarSet(window,
					JXWidget::kHElastic, JXWidget::kVElastic, 20,50, 350,400);
	assert( scrollbarSet != NULL );

	itsProcessIDInput =
		new JXIntegerInput(window,
					JXWidget::kHElastic, JXWidget::kFixedBottom, 90,470, 80,20);
	assert( itsProcessIDInput != NULL );

	JXStaticText* obj1_JXLayout =
		new JXStaticText(JGetString("obj1_JXLayout::CMChooseProcessDialog::JXLayout"), window,
					JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,470, 70,20);
	assert( obj1_JXLayout != NULL );
	obj1_JXLayout->SetToLabel();

	JXTextButton* cancelButton =
		new JXTextButton(JGetString("cancelButton::CMChooseProcessDialog::JXLayout"), window,
					JXWidget::kFixedRight, JXWidget::kFixedBottom, 215,470, 60,20);
	assert( cancelButton != NULL );

	JXTextButton* okButton =
		new JXTextButton(JGetString("okButton::CMChooseProcessDialog::JXLayout"), window,
					JXWidget::kFixedRight, JXWidget::kFixedBottom, 310,470, 60,20);
	assert( okButton != NULL );
	okButton->SetShortcuts(JGetString("okButton::CMChooseProcessDialog::shortcuts::JXLayout"));

	JXStaticText* obj2_JXLayout =
		new JXStaticText(JGetString("obj2_JXLayout::CMChooseProcessDialog::JXLayout"), window,
					JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 360,20);
	assert( obj2_JXLayout != NULL );
	obj2_JXLayout->SetToLabel();

// end JXLayout

	window->SetTitle("Choose process");
	SetButtons(okButton, cancelButton);

	itsText =
		new CMProcessText(this, scrollbarSet, scrollbarSet->GetScrollEnclosure(),
						   JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 10,10);
    assert( itsText != NULL );
    itsText->FitToEnclosure();
	itsText->SetDefaultFont(JGetMonospaceFontName(), kJDefaultMonoFontSize);
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:53,代码来源:CMChooseProcessDialog.cpp

示例7: JXMenuBar

SMTPDebugDir::SMTPDebugDir
	(
	JXDirector* supervisor
	)
	:
	GMManagedDirector(supervisor)
{
	JSize w = 400;
	JSize h = 300;
	JXWindow* window = new JXWindow(this, w,h, "Debug Window");
    assert( window != NULL );
    SetWindow(window);
    window->SetCloseAction(JXWindow::kDeactivateDirector);

    JXMenuBar* menuBar =
	new JXMenuBar(window, JXWidget::kHElastic, JXWidget::kFixedTop,
					0,0, w,kJXStdMenuBarHeight);
    assert( menuBar != NULL );

	itsFileMenu = menuBar->AppendTextMenu(kFileMenuTitleStr);
	itsFileMenu->SetMenuItems(kFileMenuStr);
	itsFileMenu->SetUpdateAction(JXMenu::kDisableNone);
	ListenTo(itsFileMenu);

	GMDirectorMenu* menu =
		new GMDirectorMenu(kWindowsMenuTitleStr, menuBar,
			JXWidget::kFixedLeft, JXWidget::kVElastic, 0,0, 10,10);
	assert(menu != NULL);
	menuBar->AppendMenu(menu);

	JXScrollbarSet* scrollbarSet =
		new JXScrollbarSet(window,
			JXWidget::kHElastic, JXWidget::kVElastic,
			0,kJXStdMenuBarHeight,w,h - kJXStdMenuBarHeight);
	assert ( scrollbarSet != NULL );

	itsText =
		new JXStaticText("", kJFalse, kJTrue,
			scrollbarSet, scrollbarSet->GetScrollEnclosure(),
			JXWidget::kHElastic, JXWidget::kVElastic,
			0,0,w,h - kJXStdMenuBarHeight);
	assert (itsText != NULL);

	itsMenuIcon = new JXImage(window->GetDisplay(), window->GetColormap(), JXPM(debug_xpm));
	assert(itsMenuIcon != NULL);
	itsMenuIcon->ConvertToRemoteStorage();

	GGetDirMgr()->DirectorCreated(this);
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:49,代码来源:SMTPDebugDir.cpp

示例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);
	
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:45,代码来源:GloveHistoryDir.cpp

示例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);
}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:41,代码来源:GloveCursorTableDir.cpp

示例10: 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();
}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:39,代码来源:SelectionTableDir.cpp

示例11: JXScrollbarSet

void
CBEditSearchPathsDialog::BuildWindow
	(
	const CBDirList&	dirList,
	CBRelPathCSF*		csf
	)
{
// begin JXLayout

	JXWindow* window = jnew JXWindow(this, 370,370, "");
	assert( window != NULL );

	JXScrollbarSet* scrollbarSet =
		jnew JXScrollbarSet(window,
					JXWidget::kHElastic, JXWidget::kFixedBottom, 20,100, 240,220);
	assert( scrollbarSet != NULL );

	JXTextButton* cancelButton =
		jnew JXTextButton(JGetString("cancelButton::CBEditSearchPathsDialog::JXLayout"), window,
					JXWidget::kFixedLeft, JXWidget::kFixedBottom, 70,340, 70,20);
	assert( cancelButton != NULL );

	JXTextButton* okButton =
		jnew JXTextButton(JGetString("okButton::CBEditSearchPathsDialog::JXLayout"), window,
					JXWidget::kFixedRight, JXWidget::kFixedBottom, 230,340, 70,20);
	assert( okButton != NULL );

	JXStaticText* instrText =
		jnew JXStaticText(JGetString("instrText::CBEditSearchPathsDialog::JXLayout"), window,
					JXWidget::kHElastic, JXWidget::kVElastic, 20,20, 330,70);
	assert( instrText != NULL );

	JXTextButton* addPathButton =
		jnew JXTextButton(JGetString("addPathButton::CBEditSearchPathsDialog::JXLayout"), window,
					JXWidget::kFixedRight, JXWidget::kFixedBottom, 280,110, 70,20);
	assert( addPathButton != NULL );
	addPathButton->SetShortcuts(JGetString("addPathButton::CBEditSearchPathsDialog::shortcuts::JXLayout"));

	JXTextButton* removePathButton =
		jnew JXTextButton(JGetString("removePathButton::CBEditSearchPathsDialog::JXLayout"), window,
					JXWidget::kFixedRight, JXWidget::kFixedBottom, 280,140, 70,20);
	assert( removePathButton != NULL );
	removePathButton->SetShortcuts(JGetString("removePathButton::CBEditSearchPathsDialog::shortcuts::JXLayout"));

	JXTextButton* choosePathButton =
		jnew JXTextButton(JGetString("choosePathButton::CBEditSearchPathsDialog::JXLayout"), window,
					JXWidget::kFixedRight, JXWidget::kFixedBottom, 280,190, 70,20);
	assert( choosePathButton != NULL );
	choosePathButton->SetShortcuts(JGetString("choosePathButton::CBEditSearchPathsDialog::shortcuts::JXLayout"));

// end JXLayout

	instrText->SetText(JGetString(kInstructionsID));
	window->AdjustSize(0, instrText->GetBoundsHeight() - instrText->GetFrameHeight());
	instrText->SetSizing(JXWidget::kHElastic, JXWidget::kFixedTop);
	scrollbarSet->SetSizing(JXWidget::kHElastic, JXWidget::kVElastic);
	addPathButton->SetSizing(JXWidget::kFixedRight, JXWidget::kFixedTop);
	removePathButton->SetSizing(JXWidget::kFixedRight, JXWidget::kFixedTop);
	choosePathButton->SetSizing(JXWidget::kFixedRight, JXWidget::kFixedTop);

	window->SetTitle("Search Paths for Symbol Database");
	window->PlaceAsDialogWindow();
	window->LockCurrentMinSize();
	UseModalPlacement(kJFalse);
	SetButtons(okButton, cancelButton);

	itsTable =
		jnew CBPathTable(dirList, addPathButton, removePathButton,
						choosePathButton, csf,
						scrollbarSet, scrollbarSet->GetScrollEnclosure(),
						JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 10,10);
	assert( itsTable != NULL );
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:73,代码来源:CBEditSearchPathsDialog.cpp

示例12: JXMenuBar

void
CMLocalVarsDir::BuildWindow()
{
// begin JXLayout

	JXWindow* window = jnew JXWindow(this, 450,500, "");
	assert( window != NULL );

	JXMenuBar* menuBar =
		jnew JXMenuBar(window,
					JXWidget::kHElastic, JXWidget::kFixedTop, 0,0, 450,30);
	assert( menuBar != NULL );

	JXScrollbarSet* scrollbarSet =
		jnew JXScrollbarSet(window,
					JXWidget::kHElastic, JXWidget::kVElastic, 0,30, 450,470);
	assert( scrollbarSet != NULL );

// end JXLayout

	window->SetTitle(kWindowTitleSuffix);
	window->SetCloseAction(JXWindow::kDeactivateDirector);
	window->SetMinSize(150, 150);
	window->ShouldFocusWhenShow(kJTrue);
	window->SetWMClass(CMGetWMClassInstance(), CMGetVariableWindowClass());
	CMGetPrefsManager()->GetWindowSize(kLocalVarWindSizeID, window);

	JXDisplay* display = GetDisplay();
	JXImage* icon      = jnew JXImage(display, medic_local_variables_window);
	assert( icon != NULL );
	window->SetIcon(icon);

	CMVarNode* root = itsLink->CreateVarNode(kJFalse);
	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();

	itsGetLocalsCmd = itsLink->CreateGetLocalVars(root);

	// menus

	itsFileMenu = menuBar->PrependTextMenu(kFileMenuTitleStr);
	itsFileMenu->SetMenuItems(kFileMenuStr, "CMThreadsDir");
	itsFileMenu->SetUpdateAction(JXMenu::kDisableNone);
	ListenTo(itsFileMenu);

	itsFileMenu->SetItemImage(kOpenCmd, jx_file_open);

	itsActionMenu = menuBar->AppendTextMenu(kActionMenuTitleStr);
	menuBar->InsertMenu(3, itsActionMenu);
	itsActionMenu->SetMenuItems(kActionMenuStr, "CMLocalVarsDir");
	ListenTo(itsActionMenu);

	itsActionMenu->SetItemImage(kDisplay1DArrayCmd, medic_show_1d_array);
	itsActionMenu->SetItemImage(kPlot1DArrayCmd,    medic_show_2d_plot);
	itsActionMenu->SetItemImage(kDisplay2DArrayCmd, medic_show_2d_array);
	itsActionMenu->SetItemImage(kExamineMemCmd,     medic_show_memory);

	JXWDMenu* wdMenu =
		jnew JXWDMenu(kWindowsMenuTitleStr, menuBar,
					 JXWidget::kFixedLeft, JXWidget::kVElastic, 0,0, 10,10);
	assert( wdMenu != NULL );
	menuBar->AppendMenu(wdMenu);

	itsHelpMenu = menuBar->AppendTextMenu(kHelpMenuTitleStr);
	itsHelpMenu->SetMenuItems(kHelpMenuStr, "CMLocalVarsDir");
	itsHelpMenu->SetUpdateAction(JXMenu::kDisableNone);
	ListenTo(itsHelpMenu);

	itsHelpMenu->SetItemImage(kTOCCmd,        jx_help_toc);
	itsHelpMenu->SetItemImage(kThisWindowCmd, jx_help_specific);
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:81,代码来源:CMLocalVarsDir.cpp

示例13: 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

示例14: JXMenuBar

void
GAddressBookTreeDir::BuildWindow()
{
	JCoordinate w 		= 300;
	JCoordinate minW	= 250;
	JCoordinate h 		= 500;
	JCoordinate minH	= 250;

	JXWindow* window = new JXWindow(this, w,h, "Addresses");
    assert( window != NULL );

	window->SetWMClass(GMGetWMClassInstance(), GMGetAddressBookWindowClass());
	window->SetCloseAction(JXWindow::kDeactivateDirector);
    window->PlaceAsDialogWindow();
	window->ShouldFocusWhenShow(kJTrue);
    //window->SetMinSize(200, 300);
	//window->LockCurrentMinSize();

	JXMenuBar* menuBar =
		new JXMenuBar(window, JXWidget::kHElastic, JXWidget::kFixedTop,
			0,0, w - kCloseButtonWidth,kJXDefaultMenuBarHeight);
	assert( menuBar != NULL );

    itsCloseButton =
        new JXTextButton("Close", window,
                    JXWidget::kFixedRight, JXWidget::kFixedTop,
                    w - kCloseButtonWidth,0,
                    kCloseButtonWidth,kJXDefaultMenuBarHeight);
    assert( itsCloseButton != NULL );
    itsCloseButton->SetShortcuts("#W"); //^[
    ListenTo(itsCloseButton);

	itsToolBar =
		new JXToolBar(GGetPrefsMgr(), kGAddressToolBarID,
			menuBar, minW, minH, window,
			JXWidget::kHElastic, JXWidget::kVElastic,
			0, kJXDefaultMenuBarHeight, w, h - kJXDefaultMenuBarHeight);
	assert(itsToolBar != NULL);

	const JSize newHeight = itsToolBar->GetWidgetEnclosure()->GetBoundsHeight();

	JXScrollbarSet* scrollbarSet =
		new JXScrollbarSet(itsToolBar->GetWidgetEnclosure(),
						   JXWidget::kHElastic,JXWidget::kVElastic,
						   0, 0,
						   w, newHeight);
	assert( scrollbarSet != NULL );

    JNamedTreeNode* base = new JNamedTreeNode(NULL, "");
    assert(base != NULL);
    itsTree = new JTree(base);
    assert(itsTree != NULL);
    JNamedTreeList* list = new JNamedTreeList(itsTree);

    itsWidget =
		new GAddressBookTreeWidget(itsTree, list,  menuBar,
									scrollbarSet, scrollbarSet->GetScrollEnclosure(),
									JXWidget::kHElastic, JXWidget::kVElastic,
									0,0,w,newHeight);
    assert(itsWidget != NULL);

	GMDirectorMenu* menu =
		new GMDirectorMenu(kWindowsMenuTitleStr, menuBar,
			JXWidget::kFixedLeft, JXWidget::kVElastic, 0,0, 10,10);
	assert(menu != NULL);
	menuBar->AppendMenu(menu);

	itsHelpMenu = menuBar->AppendTextMenu(kHelpMenuTitleStr);
	itsHelpMenu->SetMenuItems(kHelpMenuStr);
	itsHelpMenu->SetUpdateAction(JXMenu::kDisableNone);
	ListenTo(itsHelpMenu);

	itsHelpMenu->SetItemImage(kTOCCmd, JXPM(jx_help_toc));
	itsHelpMenu->SetItemImage(kThisWindowCmd, JXPM(jx_help_specific));

	itsToolBar->LoadPrefs();

	if (itsToolBar->IsEmpty())
		{
		itsWidget->AddDefaultButtcons(itsToolBar);
		itsToolBar->AppendButton(itsHelpMenu, kTOCCmd);
		itsToolBar->AppendButton(itsHelpMenu, kThisWindowCmd);
		}

	itsMenuIcon = new JXImage(window->GetDisplay(), address_entry);
	assert(itsMenuIcon != NULL);
	itsMenuIcon->ConvertToRemoteStorage();
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:88,代码来源:GAddressBookTreeDir.cpp

示例15: JXMenuBar


//.........这里部分代码省略.........
		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;

	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);
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:67,代码来源:GMessageViewDir.cpp


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