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


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

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


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

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

示例2: CBPrefsManager

JBoolean
CBCreateGlobals
	(
	CBApp*			app,
	const JBoolean	useMDI
	)
{
	if (JAssertBase::GetAction() == JAssertBase::kAskUser)
		{
		JAssertBase::SetAction(JAssertBase::kAbort);
		}

	theApplication = app;

	CBCreateIcons();

	// prefs must be created first so everybody can read from it

	JBoolean isNew;
	thePrefsManager = new CBPrefsManager(&isNew);
	assert( thePrefsManager != NULL );

	JXInitHelp(kCBTOCHelpName, kCBHelpSectionCount, kCBHelpSectionName);
	thePrefsManager->UpgradeHelpPrefs();

	theDocManager = new CBDocumentManager;
	assert( theDocManager != NULL );

	if (useMDI)
		{
		CBDockManager* dockManager = new CBDockManager();
		assert( dockManager != NULL );
		dockManager->JPrefObject::ReadPrefs();

		theMDIServer = new CBMDIServer;
		assert( theMDIServer != NULL );
		}

	theSearchTextDialog = CBSearchTextDialog::Create();
	assert( theSearchTextDialog != NULL );

	theRunTEScriptDialog = new CBRunTEScriptDialog(JXGetPersistentWindowOwner());
	assert( theRunTEScriptDialog != NULL );

	theViewManPageDialog = new CBViewManPageDialog(JXGetPersistentWindowOwner());
	assert( theViewManPageDialog != NULL );

	theFindFileDialog = new CBFindFileDialog(JXGetPersistentWindowOwner());
	assert( theFindFileDialog != NULL );

	theDiffFileDialog = new CBDiffFileDialog(JXGetPersistentWindowOwner());
	assert( theDiffFileDialog != NULL );

	// widgets hidden in permanent window

	JXWindow* permWindow = theSearchTextDialog->GetWindow();

	theDocManager->CreateFileHistoryMenus(permWindow);

	// global commands

	theCmdManager = new CBCommandManager(theDocManager);
	assert( theCmdManager != NULL );
	theCmdManager->JPrefObject::ReadPrefs();

	// fn menu updater

	theFnMenuUpdater = new CBFnMenuUpdater;
	assert( theFnMenuUpdater != NULL );

	// symbol type list

	theSymbolTypeList = new CBSymbolTypeList(permWindow->GetColormap());
	assert( theSymbolTypeList != NULL );

	// printers

	thePTTextPrinter = new CBPTPrinter;
	assert( thePTTextPrinter != NULL );

	thePSTextPrinter = new CBPSPrinter(permWindow->GetDisplay());
	assert( thePSTextPrinter != NULL );

	return isNew;
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:85,代码来源:cbGlobals.cpp


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