• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetDisplay函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetDisplay

void DDScreen::PrintText(int x, int y, const char* text)
{
    HFONT font = ::CreateFont
    (
        12,
        8,
        0,
        0,
        0,
        false,
        false,
        false,
        DEFAULT_CHARSET,
        OUT_DEFAULT_PRECIS,
        CLIP_DEFAULT_PRECIS,
        ANTIALIASED_QUALITY,
        FF_ROMAN,
        NULL
    );

    DDSurface *dest = GetDisplay().GetBackBuffer();
    
    TCHAR_string out = ToTCHAR(text);
    dest->DrawText(font, (TCHAR*)out.c_str(), x, y, 0L, 0xC0FF00);

    ::DeleteObject(font);
}
开发者ID:BackupTheBerlios,项目名称:utgs-svn,代码行数:27,代码来源:DDScreen.cpp


示例2: RemoveAllItems

void
JXDisplayMenu::BuildMenu()
{
	RemoveAllItems();

	JXApplication* app = JXGetApplication();
	const JSize count = app->GetDisplayCount();
	for (JIndex i=1; i<=count; i++)
		{
		JXDisplay* display = app->GetDisplay(i);
		AppendItem(display->GetName(), kRadioType);
		}

	ShowSeparatorAfter(count);
	AppendItem(kNewDisplayStr);
	itsNewDisplayIndex = count+1;

	SetUpdateAction(kDisableNone);

	const JBoolean found =
		(JXGetApplication())->GetDisplayIndex(GetDisplay(), &itsDisplayIndex);
	assert( found );

	ListenTo(this);
	ListenTo( (JXGetApplication())->GetDisplayList() );
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:26,代码来源:JXDisplayMenu.cpp


示例3: X11_ShowCursor

static int
X11_ShowCursor(SDL_Cursor * cursor)
{
    Cursor x11_cursor = 0;

    if (cursor) {
        x11_cursor = (Cursor)cursor->driverdata;
    } else {
        x11_cursor = X11_CreateEmptyCursor();
    }

    /* FIXME: Is there a better way than this? */
    {
        SDL_VideoDevice *video = SDL_GetVideoDevice();
        Display *display = GetDisplay();
        SDL_Window *window;
        SDL_WindowData *data;

        for (window = video->windows; window; window = window->next) {
            data = (SDL_WindowData *)window->driverdata;
            if (x11_cursor != None) {
                XDefineCursor(display, data->xwindow, x11_cursor);
            } else {
                XUndefineCursor(display, data->xwindow);
            }
        }
        XFlush(display);
    }
    return 0;
}
开发者ID:DarkWolk,项目名称:libsdl,代码行数:30,代码来源:SDL_x11mouse.c


示例4: X11_CreateXCursorCursor

static Cursor
X11_CreateXCursorCursor(SDL_Surface * surface, int hot_x, int hot_y)
{
    Display *display = GetDisplay();
    Cursor cursor = None;
    XcursorImage *image;

    image = XcursorImageCreate(surface->w, surface->h);
    if (!image) {
        SDL_OutOfMemory();
        return None;
    }
    image->xhot = hot_x;
    image->yhot = hot_y;
    image->delay = 0;

    SDL_assert(surface->format->format == SDL_PIXELFORMAT_ARGB8888);
    SDL_assert(surface->pitch == surface->w * 4);
    SDL_memcpy(image->pixels, surface->pixels, surface->h * surface->pitch);

    cursor = XcursorImageLoadCursor(display, image);

    XcursorImageDestroy(image);

    return cursor;
}
开发者ID:DarkWolk,项目名称:libsdl,代码行数:26,代码来源:SDL_x11mouse.c


示例5: GetTableSelection

void
SVNPropertiesList::CopySelectedItems
	(
	const JBoolean fullPath
	)
{
	JTableSelection& s = GetTableSelection();
	if (!s.HasSelection())
		{
		return;
		}

	JPtrArray<JString> list(JPtrArrayT::kDeleteAll);
	JTableSelectionIterator iter(&s);
	JPoint cell;
	while (iter.Next(&cell))
		{
		list.Append(*((GetStringList()).NthElement(cell.y)));
		}

	JXTextSelection* data = new JXTextSelection(GetDisplay(), list);
	assert( data != NULL );

	(GetSelectionManager())->SetData(kJXClipboardName, data);
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:25,代码来源:SVNPropertiesList.cpp


示例6: JXTextSelection

void
ClipboardWidget::HandleEditMenu
	(
	const JIndex index
	)
{
	if (index == kCopyCmd)
		{
		// We instantiate a selection object that is appropriate for
		// our data. 
		JXTextSelection* data = new JXTextSelection(GetDisplay(), itsText);
		assert(data != NULL);

		// The selection data is then given to the selection manager.
		if (!(GetSelectionManager())->SetData(kJXClipboardName, data))
			{
			(JGetUserNotification())->ReportError("Unable to copy to the X Clipboard.");
			}
		}
	else if (index == kPasteCmd)
		{
		// Paste if the clipboard has the type we need.
		Paste();
		}
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:25,代码来源:ClipboardWidget.cpp


示例7: GetColormap

void
JXImageWidget::SetXPM
	(
	const JXPM&			data,
	const JColorIndex	origBackColor
	)
{
	const JColorIndex backColor =
		(origBackColor == kJXTransparentColor ?
		 GetColormap()->GetDefaultBackColor() : origBackColor);

	if (itsOwnsImageFlag)
		{
		jdelete itsImage;
		}

	itsImage = jnew JXImage(GetDisplay(), data);
	assert( itsImage != NULL );

	itsOwnsImageFlag = kJTrue;

	AdjustBounds();

	SetBackColor(backColor);
	Refresh();
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:26,代码来源:JXImageWidget.cpp


示例8: JXImage

void
JXImageButton::SetBitmap
	(
	const JConstBitmap&	bitmap,
	const JColorIndex	origForeColor,
	const JColorIndex	origBackColor
	)
{
	const JColorIndex foreColor =
		(origForeColor == kJXTransparentColor ?
		 (GetColormap())->GetBlackColor() : origForeColor);

	const JColorIndex backColor =
		(origBackColor == kJXTransparentColor ?
		 (GetColormap())->GetDefaultBackColor() : origBackColor);

	if (itsOwnsImageFlag)
		{
		delete itsImage;
		}

	itsImage = new JXImage(GetDisplay(), GetColormap(), bitmap, foreColor, backColor);
	assert( itsImage != NULL );

	itsOwnsImageFlag = kJTrue;

	SetBackColor(backColor);
	Refresh();
}
开发者ID:mbert,项目名称:mulberry-lib-jx,代码行数:29,代码来源:JXImageButton.cpp


示例9: X11_DestroyEmptyCursor

static void
X11_DestroyEmptyCursor(void)
{
    if (x11_empty_cursor != None) {
        X11_XFreeCursor(GetDisplay(), x11_empty_cursor);
        x11_empty_cursor = None;
    }
}
开发者ID:Daft-Freak,项目名称:vogl,代码行数:8,代码来源:SDL_x11mouse.c


示例10: JXWidget

JXTabGroup::JXTabGroup
	(
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXWidget(enclosure, hSizing, vSizing, x,y, w,h),
	itsEdge(kTop),
	itsFontName(JGetDefaultFontName()),
	itsFontSize(kJDefaultFontSize),
	itsCanScrollUpFlag(kJFalse),
	itsCanScrollDownFlag(kJFalse),
	itsFirstDrawIndex(1),
	itsLastDrawIndex(1),
	itsContextMenu(NULL),
	itsPrevTabIndex(0),
	itsDragAction(kInvalidClick),
	itsScrollUpPushedFlag(kJFalse),
	itsScrollDownPushedFlag(kJFalse),
	itsMouseIndex(0),
	itsClosePushedFlag(kJFalse)
{
	itsTitles = new JPtrArray<JString>(JPtrArrayT::kDeleteAll);
	assert( itsTitles != NULL );

	itsTabInfoList = new JArray<TabInfo>;
	assert( itsTabInfoList != NULL );

	itsCloseImage = new JXImage(GetDisplay(), jx_tab_close);
	assert( itsCloseImage != NULL );

	itsClosePushedImage = new JXImage(GetDisplay(), jx_tab_close_pushed);
	assert( itsClosePushedImage != NULL );

	itsTabRects = new JArray<JRect>;
	assert( itsTabRects != NULL );

	itsCardFile = new JXCardFile(this, kHElastic, kVElastic, 0,0, 100,100);
	assert( itsCardFile != NULL );
	PlaceCardFile();
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:46,代码来源:JXTabGroup.cpp


示例11: XCloseDisplay

void WindowData::CloseDisplay()
{
    if (display)
    {
        XCloseDisplay(GetDisplay());
        display = 0;
    }
}
开发者ID:Akranar,项目名称:daguerreo,代码行数:8,代码来源:WindowData_LINUX.cpp


示例12: JXEditTable

JXRowHeaderWidget::JXRowHeaderWidget
	(
	JXTable*			table,
	JXScrollbarSet*		scrollbarSet,
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXEditTable(1,w, NULL, enclosure, hSizing,vSizing, x,y, w,h)
{
	assert( table != NULL && scrollbarSet != NULL );

	itsTable = table;
	itsTable->SetRowHeader(this);
	ListenTo(itsTable);

	itsVScrollbar = scrollbarSet->GetVScrollbar();
	ListenTo(itsVScrollbar);

	itsTitles = NULL;

	itsAllowRowResizingFlag = kJFalse;
	itsMinRowHeight         = 1;
	itsHMarginWidth         = 2*kCellFrameWidth;
	itsMaxBcastWidth        = 0;

	itsDragType = kInvalidDrag;

	itsDragLineCursor    = JXGetDragHorizLineCursor(GetDisplay());
	itsDragAllLineCursor = JXGetDragAllHorizLineCursor(GetDisplay());

	SetColBorderInfo(0, (GetColormap())->GetBlackColor());

	// override JXEditTable

	WantInput(kJFalse);
	SetBackColor((GetColormap())->GetDefaultBackColor());

	AppendCols(1, GetApertureWidth());
	AdjustToTable();
}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:46,代码来源:JXRowHeaderWidget.cpp


示例13: GetDisplay

void
TestWidget::PrintSelectionText
	(
	const Atom selectionName,
	const Time time,
	const Atom type
	)
	const
{
	JXDisplay* display         = GetDisplay();
	JXSelectionManager* selMgr = GetSelectionManager();

	Atom returnType;
	unsigned char* data;
	JSize dataLength;
	JXSelectionManager::DeleteMethod delMethod;
	if (selMgr->GetData(selectionName, time, type,
						&returnType, &data, &dataLength, &delMethod))
		{
		if (returnType == XA_STRING ||
			returnType == selMgr->GetUtf8StringXAtom() ||
			returnType == selMgr->GetMimePlainTextXAtom())
			{
			std::cout << "Data is available as " << XGetAtomName(*display, type) << ":" << std::endl << std::endl;

			std::cout.write((char*) data, dataLength);
			std::cout << std::endl << std::endl;
			}
		else
			{
			std::cout << "Data has unrecognized return type:  ";
			std::cout << XGetAtomName(*(GetDisplay()), returnType) << std::endl;
			std::cout << "Trying to print it anyway:" << std::endl << std::endl;

			std::cout.write((char*) data, dataLength);
			std::cout << std::endl << std::endl;
			}

		selMgr->DeleteData(&data, delMethod);
		}
	else
		{
		std::cout << "Data could not be retrieved as " << XGetAtomName(*display, type) << "." << std::endl << std::endl;
		}
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:45,代码来源:TestWidget.cpp


示例14: JXEditTable

JXColHeaderWidget::JXColHeaderWidget
	(
	JXTable*			table,
	JXScrollbarSet*		scrollbarSet,
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXEditTable(h,1, NULL, enclosure, hSizing,vSizing, x,y, w,h)
{
	assert( table != NULL && scrollbarSet != NULL );

	itsTable = table;
	itsTable->SetColHeader(this);
	ListenTo(itsTable);

	itsHScrollbar = scrollbarSet->GetHScrollbar();
	ListenTo(itsHScrollbar);

	itsTitles = NULL;

	itsAllowColResizingFlag = kJFalse;
	itsMinColWidth          = 1;

	itsDragType = kInvalidDrag;

	itsDragLineCursor    = JXGetDragVertLineCursor(GetDisplay());
	itsDragAllLineCursor = JXGetDragAllVertLineCursor(GetDisplay());

	SetDrawOrder(kDrawByRow);
	SetRowBorderInfo(0, (GetColormap())->GetBlackColor());

	// override JXEditTable

	WantInput(kJFalse);
	SetBackColor((GetColormap())->GetDefaultBackColor());

	AppendRows(1, GetApertureHeight());
	AdjustToTable();
}
开发者ID:mbert,项目名称:mulberry-lib-jx,代码行数:45,代码来源:JXColHeaderWidget.cpp


示例15: X11_WarpMouseGlobal

static int
X11_WarpMouseGlobal(int x, int y)
{
    Display *display = GetDisplay();

    X11_XWarpPointer(display, None, DefaultRootWindow(display), 0, 0, 0, 0, x, y);
    X11_XSync(display, False);
    return 0;
}
开发者ID:03050903,项目名称:Torque3D,代码行数:9,代码来源:SDL_x11mouse.c


示例16: sprintf

void AnalogInputConfigSlipPoint::UpdateUpperStatusLine()
{
    Display* p_display = NULL;
    char display_number[10];

    int index = mpCurrentAnalogInputNumber->GetAsInt();

    sprintf(display_number, "4.4.1.%i", index);

    p_display = GetDisplay( DISPLAY_AI_CONFIG_ID );
    p_display->SetDisplayNumber( display_number );

    sprintf(display_number, "4.4.1.%i.1", index);

    p_display = GetDisplay( DISPLAY_AI_CONFIG_SELECT_MEAS_ID );
    p_display->SetDisplayNumber( display_number );

    DisplayController::GetInstance()->RequestTitleUpdate();
}
开发者ID:Strongc,项目名称:DC_source,代码行数:19,代码来源:AnalogInputConfigSlipPoint.cpp


示例17: GetDisplay

void
JXTextMenu::SetItemImage
	(
	const JIndex	index,
	const JXPM&		data
	)
{
	JXImage* image = GetDisplay()->GetImageCache()->GetImage(data);
	if (image->GetXColormap() == GetColormap())
		{
		SetItemImage(index, image, kJFalse);
		}
	else
		{
		JXImage* image = jnew JXImage(GetDisplay(), data);
		assert( image != NULL );
		SetItemImage(index, image, kJTrue);
		}
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:19,代码来源:JXTextMenu.cpp


示例18: X11_FreeCursor

static void
X11_FreeCursor(SDL_Cursor * cursor)
{
    Cursor x11_cursor = (Cursor)cursor->driverdata;

    if (x11_cursor != None) {
        X11_XFreeCursor(GetDisplay(), x11_cursor);
    }
    SDL_free(cursor);
}
开发者ID:Daft-Freak,项目名称:vogl,代码行数:10,代码来源:SDL_x11mouse.c


示例19: GetDNDManager

JBoolean
TestWidget::WillAcceptDrop
(
    const JArray<Atom>&	typeList,
    Atom*				action,
    const Time			time,
    const JXWidget*		source
)
{
    JXDNDManager* dndMgr = GetDNDManager();

    if (typeList.GetFirstElement() == (GetSelectionManager())->GetURLXAtom())
    {
        cout << endl;
        cout << "Accepting the drop of type text/uri-list" << endl;
        cout << endl;

        *action = dndMgr->GetDNDActionPrivateXAtom();
        return kJTrue;
    }
    else if (*action == dndMgr->GetDNDActionCopyXAtom())
    {
        cout << endl;
        cout << "Accepting the drop" << endl;
        cout << endl;

        PrintSelectionText(dndMgr->GetDNDSelectionName(), time,
                           (GetSelectionManager())->GetMimePlainTextXAtom());
        return kJTrue;
    }
    else
    {
        JXDisplay* display = GetDisplay();

        cout << endl;
        cout << "Not accepting the drop because the action isn't copy" << endl;
        cout << "Action: " << XGetAtomName(*display, *action) << endl;
        cout << endl;
        cout << "Data types available from DND source:" << endl;
        cout << endl;

        const JSize typeCount = typeList.GetElementCount();
        for (JIndex i=1; i<=typeCount; i++)
        {
            const Atom type = typeList.GetElement(i);
            cout << XGetAtomName(*display, type) << endl;
        }
        cout << endl;

        PrintSelectionText(dndMgr->GetDNDSelectionName(), time,
                           (GetSelectionManager())->GetMimePlainTextXAtom());

        return kJFalse;
    }
}
开发者ID:mta1309,项目名称:mulberry-lib-jx,代码行数:55,代码来源:TestWidget.cpp


示例20: CBExecOutputDocument

CBSearchDocument::CBSearchDocument
	(
	const JBoolean		isReplace,
	const JBoolean		onlyListFiles,
	const JSize			fileCount,
	JProcess*			p,
	const int			fd,
	const JCharacter*	windowTitle
	)
	:
	CBExecOutputDocument(kCBSearchOutputFT, kCBSearchFilesHelpName, kJFalse, kJFalse),
	itsIsReplaceFlag(isReplace),
	itsOnlyListFilesFlag(onlyListFiles),
	itsReplaceTE(NULL)
{
	itsFoundFlag       = kJFalse;
	itsPrevQuoteOffset = 0;

	JXWidget::HSizingOption hSizing;
	JXWidget::VSizingOption vSizing;
	GetFileDisplayInfo(&hSizing, &vSizing);

	itsIndicator =
		jnew JXProgressIndicator(GetWindow(), hSizing, vSizing,
								 -1000, -1000, 500, kIndicatorHeight);
	assert( itsIndicator != NULL );
	itsIndicator->SetMaxValue(fileCount);

	JXMenuBar* menuBar = GetMenuBar();
	itsMatchMenu = InsertTextMenu(kMatchMenuTitleStr);
	itsMatchMenu->SetMenuItems(kMatchMenuStr, "CBSearchDocument");
	itsMatchMenu->SetUpdateAction(JXMenu::kDisableNone);
	itsMatchMenu->Deactivate();
	ListenTo(itsMatchMenu);

	// allow Meta-_ to parallel Shift key required for Meta-plus

	JXKeyModifiers modifiers(GetDisplay());
	modifiers.SetState(kJXMetaKeyIndex, kJTrue);
	GetWindow()->InstallMenuShortcut(itsMatchMenu, kPrevMatchCmd, '_', modifiers);

	GetWindow()->SetWMClass(CBGetWMClassInstance(), CBGetSearchOutputWindowClass());

	SetConnection(p, fd, ACE_INVALID_HANDLE,
				  windowTitle, JGetString("NoCloseWhileSearching::CBSearchDocument"),
				  "/", windowTitle, kJFalse);

	(CBGetDocumentManager())->SetActiveListDocument(this);

	if (itsIsReplaceFlag)
		{
		itsReplaceTE = jnew CBSearchTE;
		assert( itsReplaceTE != NULL );
		}
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:55,代码来源:CBSearchDocument.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetDisplayName函数代码示例发布时间:2022-05-30
下一篇:
C++ GetDiskFreeSpace函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap