您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetScreenPosition函数代码示例

51自学网 2021-06-01 21:14:35
  C++
这篇教程C++ GetScreenPosition函数代码示例写得很实用,希望能帮到您。

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

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

示例1: GetScreenPosition

//Gives the pivot position over the screeniPoint GuiItem::GetPivotPosition(){	iPoint ret = pivot;	ret += GetScreenPosition();	return ret;}
开发者ID:joeyGumer,项目名称:Pixel_Mirror--Diablo_II,代码行数:8,


示例2: switch

void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ){    int localkey;    wxPoint pos;    localkey = event.GetKeyCode();    switch( localkey )    {    default:        break;    case WXK_ESCAPE:        m_abortRequest = true;        if( IsMouseCaptured() )            EndMouseCapture();        else            EndMouseCapture( ID_NO_TOOL_SELECTED, m_defaultCursor, wxEmptyString );        break;    }    /* Normalize keys code to easily handle keys from Ctrl+A to Ctrl+Z     * They have an ascii code from 1 to 27 remapped     * to GR_KB_CTRL + 'A' to GR_KB_CTRL + 'Z'     */    if( event.ControlDown() && localkey >= WXK_CONTROL_A && localkey <= WXK_CONTROL_Z )        localkey += 'A' - 1;    /* Disallow shift for keys that have two keycodes on them (e.g. number and     * punctuation keys) leaving only the "letter keys" of A-Z.     * Then, you can have, e.g. Ctrl-5 and Ctrl-% (GB layout)     * and Ctrl-( and Ctrl-5 (FR layout).     * Otherwise, you'd have to have to say Ctrl-Shift-5 on a FR layout     */    bool keyIsLetter = ( localkey >= 'A' && localkey <= 'Z' ) ||                       ( localkey >= 'a' && localkey <= 'z' );    if( event.ShiftDown() && ( keyIsLetter || localkey > 256 ) )        localkey |= GR_KB_SHIFT;    if( event.ControlDown() )        localkey |= GR_KB_CTRL;    if( event.AltDown() )        localkey |= GR_KB_ALT;    INSTALL_UNBUFFERED_DC( DC, this );    // Some key commands use the current mouse position: refresh it.    pos = wxGetMousePosition() - GetScreenPosition();    // Compute the cursor position in drawing units.  Also known as logical units to wxDC.    pos = wxPoint( DC.DeviceToLogicalX( pos.x ), DC.DeviceToLogicalY( pos.y ) );    GetParent()->SetMousePosition( pos );    if( !GetParent()->GeneralControl( &DC, pos, localkey ) )        event.Skip();}
开发者ID:Elphel,项目名称:kicad-source-mirror,代码行数:60,


示例3: GetScreenPosition

voidQvisText2DInterface::GetCurrentValues(int which_widget){    bool doAll = (which_widget == -1);    if(which_widget == 0 || doAll)    {        // Get the new position        GetScreenPosition(positionEdit, tr("Lower left"));    }    if(which_widget == 1 || doAll)    {        stringVector sv;        sv.push_back(textLineEdit->text().toStdString());        annot->SetText(sv);    }    if(which_widget == 2 || doAll)    {        // Get its new current value and store it in the atts.        ForceSpinBoxUpdate(heightSpinBox);        int w = heightSpinBox->value();        double pos2[3];        pos2[0] = double(w) * 0.01;        pos2[1] = annot->GetPosition2()[1];        pos2[2] = annot->GetPosition2()[2];        annot->SetPosition2(pos2);    }}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:30,


示例4: lc3_init

/** OnInit  *  * Called when the machine needs to be initialized  */void ComplxFrame::OnInit(void){    static bool first = true;    lc3_init(state, true);    if (console != NULL) delete console;    console = new LC3Console(this);    state.input = &console->inputStream;    state.reader = complx_reader;    state.peek = complx_peek;    state.writer = complx_writer;    // For keyboard interrupts    state.interrupt_test.push_back(complx_step);    console->Show();    int x, y;    GetScreenPosition(&x, &y);    if (first)    {        Move(x + console->GetSize().GetX() / 2, y);        console->Move(x - console->GetSize().GetX() / 2, y);        first = false;    }    else    {        console->Move(x - console->GetSize().GetX(), y);    }    lc3_set_true_traps(state, menuStateTrueTraps->IsChecked());    state.interrupt_enabled = menuStateInterrupts->IsChecked();    state.max_stack_size = stack_size;    state.max_call_stack_size = call_stack_size;}
开发者ID:BenTheElder,项目名称:complx,代码行数:39,


示例5: GetScreenPosition

void TWidget::_handle_mouseMove(const TEvent_MouseMoved& event, bool& consume) {    consume = false;    if (IsVisible() == false) {        return;    }    const auto& mousePosition = event;    const auto position = GetScreenPosition();    const auto bounds = position + GetOwnSize();    const bool isOver = IsVisible() &&        isPointInRect(mousePosition.x, mousePosition.y,            position.x, position.y, bounds.x, bounds.y);    if ((isOver == true) && (mouseOver == false)) {        _OnHover();        GetSignal(DefaultSignalID::MouseEntered).Send();    } else if ((isOver == false) && (mouseOver == true)) {        _OnMouseLeave();        GetSignal(DefaultSignalID::MouseLeave).Send();    } else {        /*none*/    }    mouseOver = isOver;}
开发者ID:zhiltsov-max,项目名称:tower-defense,代码行数:26,


示例6: GetPosition

  /**   * Returns the position within the parent window.   */  gcc_pure  const PixelRect GetPosition() const  {#ifndef USE_GDI    return { GetLeft(), GetTop(), GetRight(), GetBottom() };#else    PixelRect rc = GetScreenPosition();    HWND parent = ::GetParent(hWnd);    if (parent != NULL) {      POINT pt;      pt.x = rc.left;      pt.y = rc.top;      ::ScreenToClient(parent, &pt);      rc.left = pt.x;      rc.top = pt.y;      pt.x = rc.right;      pt.y = rc.bottom;      ::ScreenToClient(parent, &pt);      rc.right = pt.x;      rc.bottom = pt.y;    }    return rc;#endif  }
开发者ID:FlorianR,项目名称:XCSoar,代码行数:30,


示例7: ClearDrag

	void IDraggable::OnMessageReceived(UINT uMsg, WPARAM wParam, LPARAM lParam) {		if (!IsVisible()) {			if (IsDragged() && !_notifyDragEndEvent(nullptr))				ClearDrag();			return;		}		Utils::Vector2 position(lParam);		IComponent::OnMessageReceived(uMsg, wParam, lParam);		switch(uMsg)		{		case WM_LBUTTONDOWN:			if (!sWndProc.LastMessageHandled) {				if (!IsDragged() && PtInBoundingRect(position) &&					!_notifyDragBeginEvent(&position))					StartDrag(position - GetScreenPosition());				sWndProc.LastMessageHandled |= IsDragged();			}			break;		case WM_LBUTTONUP:			if (IsDragged()) {				if (!_notifyDragEndEvent(&position))					ClearDrag();				sWndProc.LastMessageHandled = true;			}			break;		case WM_MOUSEMOVE:			if (IsDragged() && GetGlobalInterface()->ClipStack.PtInClipArea(position) &&				!_notifyDragMoveEvent(&position)) {				position -= s_dragVector;				auto pParent = GetUIParent();				if (pParent != nullptr)					position -= pParent->GetScreenPosition();				SetPosition(position);			}			sWndProc.LastMessageHandled |= IsDragged();			break;		};	}
开发者ID:MJavad,项目名称:shark,代码行数:47,


示例8: mmCustomFieldDialog

void mmTransDialog::OnCustomFields(wxCommandEvent& /*event*/){    const wxString& RefType = Model_Attachment::reftype_desc(Model_Attachment::TRANSACTION);    int TransID = m_trx_data.TRANSID;    if (m_duplicate) TransID = -1;    CustomFieldDialog_ = new mmCustomFieldDialog(this, GetScreenPosition(), GetSize(), RefType, TransID);    CustomFieldDialog_->Show();}
开发者ID:dqf88,项目名称:moneymanagerex,代码行数:8,


示例9: GetScreenPosition

	RECT IRectComponent::GetFullRect() const {		RECT fullRect = {0};		Utils::Vector2 position = GetScreenPosition();		fullRect.left = static_cast<LONG>(position.x);		fullRect.right = static_cast<LONG>(position.x + GetWidth());		fullRect.top = static_cast<LONG>(position.y);		fullRect.bottom = static_cast<LONG>(position.y + GetHeight());		return fullRect;	}
开发者ID:MJavad,项目名称:shark,代码行数:9,


示例10: GetScreenPosition

NS_IMETHODIMPBoxObject::GetScreenY(int32_t *_retval){    nsIntPoint position;    nsresult rv = GetScreenPosition(position);    if (NS_FAILED(rv)) return rv;    *_retval = position.y;    return NS_OK;}
开发者ID:Nazi-Nigger,项目名称:gecko-dev,代码行数:9,


示例11: GetScreenPosition

bool TAbstractWindow::_isMouseOverHeader() const {    if (HasHeader() == false) {        return false;    }    const TCoordinate position = GetScreenPosition();    return IO::IsCursorInRect(position.x, position.y,        position.x + size.x, position.y + headerHeight);}
开发者ID:zhiltsov-max,项目名称:tower-defense,代码行数:9,


示例12: GetBestSize

bool wxRibbonPanel::ShowExpanded(){    if(!IsMinimised())    {        return false;    }    if(m_expanded_dummy != NULL || m_expanded_panel != NULL)    {        return false;    }    wxSize size = GetBestSize();    wxPoint pos = GetExpandedPosition(wxRect(GetScreenPosition(), GetSize()),                                      size, m_preferred_expand_direction).GetTopLeft();    // Need a top-level frame to contain the expanded panel    wxFrame *container = new wxFrame(NULL, wxID_ANY, GetLabel(),                                     pos, size, wxFRAME_NO_TASKBAR | wxBORDER_NONE);    m_expanded_panel = new wxRibbonPanel(container, wxID_ANY,                                         GetLabel(), m_minimised_icon, wxPoint(0, 0), size, m_flags);    m_expanded_panel->SetArtProvider(m_art);    m_expanded_panel->m_expanded_dummy = this;    // Move all children to the new panel.    // Conceptually it might be simpler to reparent this entire panel to the    // container and create a new panel to sit in its place while expanded.    // This approach has a problem though - when the panel is reinserted into    // its original parent, it'll be at a different position in the child list    // and thus assume a new position.    // NB: Children iterators not used as behaviour is not well defined    // when iterating over a container which is being emptied    while(!GetChildren().IsEmpty())    {        wxWindow *child = GetChildren().GetFirst()->GetData();        child->Reparent(m_expanded_panel);        child->Show();    }    // Move sizer to new panel    if(GetSizer())    {        wxSizer* sizer = GetSizer();        SetSizer(NULL, false);        m_expanded_panel->SetSizer(sizer);    }    m_expanded_panel->Realize();    Refresh();    container->Show();    m_expanded_panel->SetFocus();    return true;}
开发者ID:beanhome,项目名称:dev,代码行数:55,


示例13: GetScreenPosition

void GuiInputBox::Draw(){	image.Draw();	text.Draw();	if (inputOn)	{		iPoint pos = GetScreenPosition();		App->render->DrawQuad({ pos.x + cursor.x - App->render->camera.x, pos.y - App->render->camera.y, CURSOR_WIDTH, cursor.y }, 255, 255, 255);	}}
开发者ID:JaviSaba7,项目名称:Pixel_Mirror--Diablo_II,代码行数:11,


示例14: openFileDialog

void dxfv_wxWidgetsFrame::OnOpen(wxCommandEvent& event){    wxFileDialog         openFileDialog(this, _("Open DXF file"), "", "",                       "DXF files (*.dxf)|*.dxf",                                        wxFD_OPEN|wxFD_FILE_MUST_EXIST);    if (openFileDialog.ShowModal() == wxID_CANCEL)        return;     // the user changed idea...    dxf->LoadFile( std::string(openFileDialog.GetPath().utf8_str()));    // check for control point splines    for( dxfv::CSpline& spline : dxf->m_Spline ) {        if( ! spline.m_FitPointCount) {                wxMessageBox(                    "File contains control point splines/n"                    "These will not be displayed",                    "WARNING");                break;        }    }    #ifdef DEMO    if( dxf->myLoadStatus == dxfv::CDxf::demo ) {        wxMessageBox( "Demo limit exceeded!", "Sorry");        exit(1);    }    #endif // DEMO    SetTitle( openFileDialog.GetPath() );    dxf->myBoundingRectangle.Fit();    // restart the pan feature    // this stores the current mouse position    // if this is not done here, then a false pan operation    // sometime occurrs on the first display of a newly opened file    old_pos.x = wxGetMousePosition().x - GetScreenPosition().x;    old_pos.y = wxGetMousePosition().y - GetScreenPosition().y - 55;    Refresh();}
开发者ID:JamesBremner,项目名称:DXF_Viewer,代码行数:40,


示例15: wxASSERT

/* restores former dialog size and (on Mac) position */bool CDlgItemProperties::RestoreState() {    wxConfigBase*   pConfig = wxConfigBase::Get(FALSE);    int                iWidth, iHeight;    wxASSERT(pConfig);    if (!pConfig) return false;    pConfig->SetPath(m_strBaseConfigLocation);    pConfig->Read(wxT("Width"), &iWidth, wxDefaultCoord);    pConfig->Read(wxT("Height"), &iHeight, wxDefaultCoord);#ifndef __WXMAC__    // Set size to saved values or defaults if no saved values    SetSize(iWidth, iHeight);    #else    int                iTop, iLeft;        pConfig->Read(wxT("YPos"), &iTop, wxDefaultCoord);    pConfig->Read(wxT("XPos"), &iLeft, wxDefaultCoord);        // If either co-ordinate is less then 0 then set it equal to 0 to ensure    // it displays on the screen.    if ((iLeft < 0) && (iLeft != wxDefaultCoord)) iLeft = 30;    if ((iTop < 0) && (iTop != wxDefaultCoord)) iTop = 30;    // Set size and position to saved values or defaults if no saved values    SetSize(iLeft, iTop, iWidth, iHeight, wxSIZE_USE_EXISTING);    // Now make sure window is on screen    GetScreenPosition(&iLeft, &iTop);    GetSize(&iWidth, &iHeight);        Rect titleRect = {iTop, iLeft, iTop+22, iLeft+iWidth };    InsetRect(&titleRect, 5, 5);                // Make sure at least a 5X5 piece visible    RgnHandle displayRgn = NewRgn();    CopyRgn(GetGrayRgn(), displayRgn);          // Region encompassing all displays    Rect menuRect = ((**GetMainDevice())).gdRect;    menuRect.bottom = GetMBarHeight() + menuRect.top;    RgnHandle menuRgn = NewRgn();    RectRgn(menuRgn, &menuRect);                // Region hidden by menu bar    DiffRgn(displayRgn, menuRgn, displayRgn);   // Subtract menu bar region    if (!RectInRgn(&titleRect, displayRgn)) {        iTop = iLeft = 30;        SetSize(iLeft, iTop, iWidth, iHeight, wxSIZE_USE_EXISTING);    }    DisposeRgn(menuRgn);    DisposeRgn(displayRgn);#endif    return true;}
开发者ID:abergstr,项目名称:BOINC,代码行数:53,


示例16: GetScreenPosition

void GameManager::Render(){	rect r = GetScreenPosition();	Image* scr = Screen::Instance();	if (IsMapLoading() && mLoader)	{		//render some sort of color overlay surface over mMap?		mLoader->Render();	}	Frame::Render();}
开发者ID:McManning,项目名称:fro_client,代码行数:13,


示例17: Render

void Widget::Render(){	Image* scr = Screen::Instance();	if (mBorderColor.a != 0) //default will have a zero alpha		scr->DrawRound(GetScreenPosition(), 0, mBorderColor);	for (int i = 0;  i < mChildren.size(); i++)	{		if (mChildren.at(i)->mVisible)			mChildren.at(i)->Render();		}}
开发者ID:McManning,项目名称:fro_client,代码行数:13,


示例18: WXUNUSED

void wxWebcamProps::OnClose(wxCloseEvent& WXUNUSED(event)){   int fx(0),fy(0);   GetScreenPosition(&fx,&fy);   if(fx > -1 && fy > -1) {      long pos_x(fx),pos_y(fy);      wxFactory::singleton()->config()->Write(_T("PropsPos_x"),pos_x);      wxFactory::singleton()->config()->Write(_T("PropsPos_y"),pos_y);   }   // self-destruct the object when dialog is closed   Destroy();}
开发者ID:MarekTP,项目名称:wxAstroCapture,代码行数:13,


示例19: wxGetMousePosition

WXLRESULT MainMenuButton::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam){	if (WM_MENUSELECT == message)	{		if (HIWORD(wParam) == 0xFFFF && lParam == 0)		{			wxPoint pos = wxGetMousePosition()-GetScreenPosition();			wxRect rect = GetRect();			m_bIgnoreNextClick = rect.Contains(pos);		}	}	return gcImageButton::MSWWindowProc(message, wParam, lParam);}
开发者ID:boskee,项目名称:Desurium-1,代码行数:14,


示例20: GetRoot

void ToolTip::Update(float timeStep){    // Track the element we are parented to for hovering. When we display, we move ourself to the root element    // to ensure displaying on top    UIElement* root = GetRoot();    if (!root)        return;    if (parent_ != root)        target_ = parent_;    // If target is removed while we are displaying, we have no choice but to destroy ourself    if (target_.Expired())    {        Remove();        return;    }    if (target_->IsHovering() && target_->IsVisibleEffective())    {        float effectiveDelay = delay_ > 0.0f ? delay_ : GetSubsystem<UI>()->GetDefaultToolTipDelay();        if (!parentHovered_)        {            parentHovered_ = true;            displayAt_.Reset();        }        else if (displayAt_.GetMSec(false) >= (unsigned)(effectiveDelay * 1000.0f) && parent_ == target_)        {            originalPosition_ = GetPosition();            IntVector2 screenPosition = GetScreenPosition();            SetParent(root);            SetPosition(screenPosition);            SetVisible(true);            // BringToFront() is unreliable in this case as it takes into account only input-enabled elements.            // Rather just force priority to max            SetPriority(M_MAX_INT);        }    }    else    {        if (IsVisible() && parent_ == root)        {            SetParent(target_);            SetPosition(originalPosition_);            SetVisible(false);        }        parentHovered_ = false;        displayAt_.Reset();    }}
开发者ID:03050903,项目名称:Urho3D,代码行数:50,


示例21: wxGetMousePosition

void LoginForm::onMouseDown(wxMouseEvent& event){#ifdef WIN32	wxPoint pos = wxGetMousePosition()-GetScreenPosition();	m_bMouseDrag = true;	m_StartDrag = pos;	m_StartPos = wxGetMousePosition();	if (!HasCapture())		CaptureMouse();#else	event.Skip();#endif}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:15,


示例22: GetScreenPosition

bool Control::PointIn(const Point& point) const{	if(!GetVisible())		return false;	Point position = GetScreenPosition();	if(point.x < position.x || point.x > position.x + mSize.cx)		return false;	if(point.y < position.y || point.y > position.y + mSize.cy)		return false;	return true;}
开发者ID:m1h4,项目名称:AudioAnalyzer,代码行数:15,


示例23: GetScreenPosition

void ListBox::Draw( SpriteBatch& spriteBatch, SpriteBatch& spriteBatchFont ){	if (!mVisible)		return;	int2 screenPos = GetScreenPosition();	float zOrder = GetDepthLayer();	// Draw background first	Rectanglef backRC((float)screenPos.X(), (float)screenPos.Y(), (float)mSize.X(), (float)mSize.Y());	mLisBoxStyle->DrawNinePatch(spriteBatch, UI_State_Normal, backRC, zOrder);	if (mItems.size())	{		int mimItem, maxItem;		mVertScrollBar->GetScrollRange(&mimItem, &maxItem);		Rectanglef rc((float)mTextRegion.X, (float)mTextRegion.Y, (float)mTextRegion.Width, (float)mTextRegion.Height);		rc.SetBottom( rc.Y + mTextRowHeight);		for (int i = mVertScrollBar->GetScrollValue(); i < maxItem + mNumVisibleItems; ++i)		{					if (rc.Bottom() > (float)mTextRegion.Bottom())				break;			if( i == mSelectedIndex )			{				// Draw selected highlight				Rectanglef rcSel;				rcSel.SetLeft(mSelectionRegion.Left()+1);				rcSel.SetRight(mSelectionRegion.Right());				rcSel.SetTop((float)rc.Top());				rcSel.SetBottom((float)rc.Bottom());								spriteBatch.Draw(mLisBoxStyle->StyleTex, rcSel, &mLisBoxStyle->StyleStates[UI_State_Hover].TexRegion,					mLisBoxStyle->StyleStates[UI_State_Hover].TexColor, zOrder);			}			// draw text			//Rectanglef region((float)rc.X, (float)rc.Y, (float)rc.Width, (float)rc.Height);			mLisBoxStyle->Font->DrawString(spriteBatchFont, mItems[i], mLisBoxStyle->FontSize, AlignVCenter, rc, mLisBoxStyle->ForeColor, zOrder);			rc.Offset(0, mTextRowHeight);		}	}}
开发者ID:Joke-Dk,项目名称:RcEngine,代码行数:48,


示例24: _redraw

void AvatarCreator::Render(){    //redraw (if necessary) and render mCompositePreview and the background image.    if (mRedraw)        _redraw();    Image* scr = Screen::Instance();    rect r = GetScreenPosition();    Frame::Render();    if (mCompositePreview)    {        mCompositePreview->Render(scr, r.x + 10, r.y + 50);    }}
开发者ID:McManning,项目名称:fro_client,代码行数:16,


示例25: headerRect

void TAbstractWindow::_draw(TRenderTarget& target) {    if (needsRedraw == true) {        TRenderTarget& localTarget = renderImage.getRenderTarget();        localTarget.clear(_currentColor());        if (image.drawingObject != nullptr) {            if (image.image != nullptr) {                sf::Sprite* sprite = image.drawingObject.get();                if (sprite != nullptr) {                    sprite->setColor(_currentColor());                }            }            localTarget.draw(*image.drawingObject);        }        if (HasHeader() == true) {            sf::RectangleShape headerRect( sf::Vector2f(size.x, headerHeight) );            headerRect.setFillColor(_currentHeaderColor());            localTarget.draw(headerRect);        }        if (headerText->GetText().empty() == false) {            headerText->Draw(localTarget);        }        renderImage.createDrawingObject();        needsRedraw = false;    }    const TCoordinate position = GetScreenPosition();    renderImage.getDrawingObject().setPosition(position.x, position.y);    target.draw(renderImage.getDrawingObject());#if defined(_DEBUG)    if (Debug::show_frames() == true) {        sf::RectangleShape boundingRect( sf::Vector2f(size.x, size.y) );        boundingRect.setFillColor(sf::Color(0, 0, 0, 0));        boundingRect.setOutlineColor(sf::Color(0, 255 - 55 * mouseOver, 0, 128));        boundingRect.setOutlineThickness(2.f);        boundingRect.setPosition(position.x, position.y);        target.draw(boundingRect);        sf::Text rectText = TFont().CreateText(String::toWide(name));        rectText.setPosition(position.x, position.y);        target.draw(rectText);    }#endif // _DEBUG}
开发者ID:zhiltsov-max,项目名称:tower-defense,代码行数:47,


示例26: wxGetDisplayArea

void MainEmuFrame::InitLogBoxPosition( AppConfig::ConsoleLogOptions& conf ){	conf.DisplaySize.Set(		std::min( std::max( conf.DisplaySize.GetWidth(), 160 ), wxGetDisplayArea().GetWidth() ),		std::min( std::max( conf.DisplaySize.GetHeight(), 160 ), wxGetDisplayArea().GetHeight() )	);	if( conf.AutoDock )	{		conf.DisplayPosition = GetScreenPosition() + wxSize( GetSize().x, 0 );	}	else if( conf.DisplayPosition != wxDefaultPosition )	{		if( !wxGetDisplayArea().Contains( wxRect( conf.DisplayPosition, conf.DisplaySize ) ) )			conf.DisplayPosition = wxDefaultPosition;	}}
开发者ID:aseptilena,项目名称:pcsx2,代码行数:17,


示例27: wxASSERT

/* restores former dialog size and (on Mac) position */bool CDlgItemProperties::RestoreState() {    wxConfigBase*   pConfig = wxConfigBase::Get(FALSE);    int                iWidth, iHeight;    wxASSERT(pConfig);    if (!pConfig) return false;    pConfig->SetPath(m_strBaseConfigLocation);    pConfig->Read(wxT("Width"), &iWidth, wxDefaultCoord);    pConfig->Read(wxT("Height"), &iHeight, wxDefaultCoord);    // Guard against a rare situation where registry values are zero    if ((iWidth < 50) && (iWidth != wxDefaultCoord)) iWidth = wxDefaultCoord;    if ((iHeight < 50) && (iHeight != wxDefaultCoord)) iHeight = wxDefaultCoord;#ifndef __WXMAC__    // Set size to saved values or defaults if no saved values    SetSize(iWidth, iHeight);    #else    int                iTop, iLeft;        pConfig->Read(wxT("YPos"), &iTop, wxDefaultCoord);    pConfig->Read(wxT("XPos"), &iLeft, wxDefaultCoord);        // If either co-ordinate is less then 0 then set it equal to 0 to ensure    // it displays on the screen.    if ((iLeft < 0) && (iLeft != wxDefaultCoord)) iLeft = 30;    if ((iTop < 0) && (iTop != wxDefaultCoord)) iTop = 30;    // Set size and position to saved values or defaults if no saved values    SetSize(iLeft, iTop, iWidth, iHeight, wxSIZE_USE_EXISTING);    // Now make sure window is on screen    GetScreenPosition(&iLeft, &iTop);    GetSize(&iWidth, &iHeight);    if (!IsWindowOnScreen(iLeft, iTop, iWidth, iHeight)) {        iTop = iLeft = 30;        SetSize(iLeft, iTop, iWidth, iHeight, wxSIZE_USE_EXISTING);    }#endif    return true;}
开发者ID:AltroCoin,项目名称:altrocoin,代码行数:46,


示例28: IsMaximized

void GSFrame::OnMove( wxMoveEvent& evt ){	if( IsBeingDeleted() ) return;	evt.Skip();	g_Conf->GSWindow.IsMaximized = IsMaximized();	// evt.GetPosition() returns the client area position, not the window frame position.	if( !g_Conf->GSWindow.IsMaximized && !IsFullScreen() && !IsIconized() && IsVisible() )		g_Conf->GSWindow.WindowPos = GetScreenPosition();	// wxGTK note: X sends gratuitous amounts of OnMove messages for various crap actions	// like selecting or deselecting a window, which muck up docking logic.  We filter them	// out using 'lastpos' here. :)	//static wxPoint lastpos( wxDefaultCoord, wxDefaultCoord );	//if( lastpos == evt.GetPosition() ) return;	//lastpos = evt.GetPosition();}
开发者ID:jerrys123111,项目名称:pcsx2,代码行数:20,



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


C++ GetScreenRect函数代码示例
C++ GetScreenHeight函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。