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


C++ JXScrollbarSet类代码示例

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


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

示例1: JXWindowDirector

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: JXWidgetSet

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: JXWindow

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: JXWindow

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: JXWindow

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: JXWindow

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: GMManagedDirector

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: JXWindow

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: JXWindowDirector

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: JXWindow

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: JXWindow

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: JXWindow

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: JXWindow


//.........这里部分代码省略.........
	helpButton->SetShortcuts(JGetString("helpButton::CBSearchTextDialog::shortcuts::JXLayout"));

	JXTextCheckbox* searchIsRegexCB =
		jnew JXTextCheckbox(JGetString("searchIsRegexCB::CBSearchTextDialog::JXLayout"), window,
					JXWidget::kFixedLeft, JXWidget::kFixedTop, 160,180, 150,20);
	assert( searchIsRegexCB != NULL );

	JXTextCheckbox* replaceIsRegexCB =
		jnew JXTextCheckbox(JGetString("replaceIsRegexCB::CBSearchTextDialog::JXLayout"), window,
					JXWidget::kFixedLeft, JXWidget::kFixedTop, 320,180, 110,20);
	assert( replaceIsRegexCB != NULL );

	JXTextCheckbox* singleLineCB =
		jnew JXTextCheckbox(JGetString("singleLineCB::CBSearchTextDialog::JXLayout"), window,
					JXWidget::kFixedLeft, JXWidget::kFixedTop, 160,210, 150,20);
	assert( singleLineCB != NULL );

	JXTextCheckbox* preserveCaseCB =
		jnew JXTextCheckbox(JGetString("preserveCaseCB::CBSearchTextDialog::JXLayout"), window,
					JXWidget::kFixedLeft, JXWidget::kFixedTop, 320,210, 110,20);
	assert( preserveCaseCB != NULL );

	JXTextButton* qRefButton =
		jnew JXTextButton(JGetString("qRefButton::CBSearchTextDialog::JXLayout"), window,
					JXWidget::kFixedLeft, JXWidget::kFixedBottom, 190,440, 80,20);
	assert( qRefButton != NULL );

	itsMultifileCB =
		jnew JXTextCheckbox(JGetString("itsMultifileCB::CBSearchTextDialog::JXLayout"), window,
					JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,360, 100,20);
	assert( itsMultifileCB != NULL );
	itsMultifileCB->SetShortcuts(JGetString("itsMultifileCB::CBSearchTextDialog::shortcuts::JXLayout"));

	JXScrollbarSet* scrollbarSet =
		jnew JXScrollbarSet(window,
					JXWidget::kHElastic, JXWidget::kVElastic, 140,360, 300,60);
	assert( scrollbarSet != NULL );

	JXStaticText* findLabel =
		jnew JXStaticText(JGetString("findLabel::CBSearchTextDialog::JXLayout"), window,
					JXWidget::kFixedRight, JXWidget::kFixedTop, 320,20, 100,20);
	assert( findLabel != NULL );
	findLabel->SetToLabel(kJTrue);

	JXSearchTextButton* findBackButton =
		jnew JXSearchTextButton(kJFalse, window,
					JXWidget::kFixedRight, JXWidget::kFixedTop, 300,20, 20,20);
	assert( findBackButton != NULL );

	JXSearchTextButton* findFwdButton =
		jnew JXSearchTextButton(kJTrue, window,
					JXWidget::kFixedRight, JXWidget::kFixedTop, 420,20, 20,20);
	assert( findFwdButton != NULL );

	JXStaticText* replaceFindLabel =
		jnew JXStaticText(JGetString("replaceFindLabel::CBSearchTextDialog::JXLayout"), window,
					JXWidget::kFixedRight, JXWidget::kFixedTop, 320,80, 100,20);
	assert( replaceFindLabel != NULL );
	replaceFindLabel->SetToLabel(kJTrue);

	JXSearchTextButton* replaceFindBackButton =
		jnew JXSearchTextButton(kJFalse, window,
					JXWidget::kFixedRight, JXWidget::kFixedTop, 300,80, 20,20);
	assert( replaceFindBackButton != NULL );

	JXSearchTextButton* replaceFindFwdButton =
开发者ID:jafl,项目名称:jx_application_framework,代码行数:67,代码来源:CBSearchTextDialog.cpp

示例14: JXWindow

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: JXWindow


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

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


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