这篇教程C++ wxCursor函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中wxCursor函数的典型用法代码示例。如果您正苦于以下问题:C++ wxCursor函数的具体用法?C++ wxCursor怎么用?C++ wxCursor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了wxCursor函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: WX_INIT_CONTROL_CONTAINERvoid wxSplitterWindow::Init(){ WX_INIT_CONTROL_CONTAINER(); m_splitMode = wxSPLIT_VERTICAL; m_permitUnsplitAlways = true; m_windowOne = NULL; m_windowTwo = NULL; m_dragMode = wxSPLIT_DRAG_NONE; m_oldX = 0; m_oldY = 0; m_sashStart = 0; m_sashPosition = m_requestedSashPosition = 0; m_sashGravity = 0.0; m_sashSize = -1; // -1 means use the native sash size m_lastSize = wxSize(0,0); m_checkRequestedSashPosition = false; m_minimumPaneSize = 0; m_sashCursorWE = wxCursor(wxCURSOR_SIZEWE); m_sashCursorNS = wxCursor(wxCURSOR_SIZENS); m_sashTrackerPen = new wxPen(*wxBLACK, 2, wxPENSTYLE_SOLID); m_needUpdating = false; m_isHot = false;}
开发者ID:erwincoumans,项目名称:wxWidgets,代码行数:25,
示例2: SetCursor/**< select a CIRCLE/ELLIPSE/SQUARE/RECTANGLE in image */bool ImagePanel::SelTools(IMGPL_CMD cmd, const wxString& imgFile /*= wxEmptyString*/, int hx /*= 0*/, int hy /*= 0*/){ if (!m_img.IsOk()) return false; if (cmd == IMGPL_CMD::NONE) { // mouse function is none m_stMP.emFuc = IMGPL_CMD::NONE; // set mouse cur SetCursor(wxCursor(wxCURSOR_ARROW)); return true; } if ( cmd != IMGPL_CMD::SEL_CIRCLE && cmd != IMGPL_CMD::SEL_ELLIPSE && cmd != IMGPL_CMD::SEL_SQUARE && cmd != IMGPL_CMD::SEL_RECTANGLE) return false; // mouse function is sel a circle m_stMP.emFuc = cmd; // set mouse cur if (imgFile.IsEmpty()) SetCursor(wxCursor(wxCURSOR_CROSS)); else { wxImage img(imgFile, wxBITMAP_TYPE_PNG); img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, hx); img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, hy); SetCursor(wxCursor(img)); } return true;}
开发者ID:gxcast,项目名称:GEIM,代码行数:36,
示例3: onImage// -----------------------------------------------------------------------------// Called when the mouse pointer is moved within the canvas// -----------------------------------------------------------------------------void GfxCanvas::onMouseMovement(wxMouseEvent& e){ bool refresh = false; // Check if the mouse is over the image int x = e.GetPosition().x; int y = e.GetPosition().y - 2; bool on_image = onImage(x, y); cursor_pos_ = imageCoords(x, y); if (on_image && editing_mode_ != EditMode::None) { if (cursor_pos_ != prev_pos_) generateBrushShadow(); prev_pos_ = cursor_pos_; } if (on_image != image_hilight_) { image_hilight_ = on_image; refresh = true; // Update cursor if drag allowed if (on_image) { if (editing_mode_ != EditMode::None) SetCursor(wxCursor(wxCURSOR_PENCIL)); else if (allow_drag_) SetCursor(wxCursor(wxCURSOR_SIZING)); } else if (allow_drag_ && !e.LeftIsDown()) SetCursor(wxNullCursor); } // Drag if (e.LeftIsDown()) { if (editing_mode_ != EditMode::None) { brushCanvas(x, y); } else { drag_pos_.set(e.GetPosition().x, e.GetPosition().y); refresh = true; } } else if (e.MiddleIsDown()) { offset_ = offset_ + Vec2d(e.GetPosition().x - mouse_prev_.x, e.GetPosition().y - mouse_prev_.y); refresh = true; } // Right mouse down if (e.RightIsDown() && on_image) pickColour(x, y); if (refresh) Refresh(); mouse_prev_.set(e.GetPosition().x, e.GetPosition().y);}
开发者ID:SteelTitanium,项目名称:SLADE,代码行数:61,
示例4: switchvoid View2D::UpdateCursor(){ char cur=0; if(cur_action==V2D_ACTION_BC)cur=10; if(cur_action==V2D_ACTION_ZOOM)cur=2; if(cur_action==V2D_ACTION_TRANSLATE)cur=1; if(sel_obj==V2D_SELECTION_OBJECT_BB) { if(sel_part==V2D_SELECTION_PART_FACE)cur=7; if(sel_part==V2D_SELECTION_PART_EDGE) { cur = sel_id<=1?4:5; } if(sel_part==V2D_SELECTION_PART_POINT) { cur = (sel_id==1 || sel_id==2)?8:9; if(mirror.x*mirror.y<0)cur = 8+9-cur; } } if(sel_obj==V2D_SELECTION_OBJECT_CENTER) { if(V2D_SELECTION_PART_X==sel_part)cur=4; if(V2D_SELECTION_PART_Y==sel_part)cur=5; if(V2D_SELECTION_PART_CENTER==sel_part)cur=7; } /* if(mouse_left_is_down&&selected_obj==V2D_SELECTION_OBJECT_BB&&(selected_part==V2D_SELECTION_PART_FACE||selected_part==V2D_SELECTION_PART_POINT))cur=7;else if(mouse_left_is_down&&selected_obj==V2D_SELECTION_OBJECT_BB&&(selected_part==V2D_SELECTION_PART_FACE||selected_part==V2D_SELECTION_PART_POINT))cur=7;else if(mouse_left_is_down&&selected_obj==V2D_SELECTION_OBJECT_BB&&selected_part==V2D_SELECTION_PART_EDGE&&(selected_id<=1))cur=4;else if(mouse_left_is_down&&selected_obj==V2D_SELECTION_OBJECT_BB&&selected_part==V2D_SELECTION_PART_EDGE)cur=5;else*/ if(old_cur==cur)return; old_cur=cur; wxCursor c; switch(cur) { case 0: c = wxCursor(wxCURSOR_ARROW);break; case 1: c = wxCursor(wxImage("Images/translate.png",wxBITMAP_TYPE_PNG));break; case 2: c = wxCursor(wxImage("Images/zoom.png",wxBITMAP_TYPE_PNG));break; case 3: c = wxCursor(wxImage("Images/add.png",wxBITMAP_TYPE_PNG));break; case 4: c = wxCursor(wxCURSOR_SIZENS);break; case 5: c = wxCursor(wxCURSOR_SIZEWE);break; case 7: c = wxCursor(wxCURSOR_SIZING);break; case 8: c = wxCursor(wxCURSOR_SIZENESW);break; case 9: c = wxCursor(wxCURSOR_SIZENWSE);break; case 10: c = wxCursor(wxImage("Images/BC.png",wxBITMAP_TYPE_PNG));break; } SetCursor(c);}
开发者ID:hksonngan,项目名称:invols,代码行数:57,
示例5: switchwxCursor CParameter::CPoint::GetCursor(){ switch(m_sizing) { case SIZE_VALUE: return wxCursor(wxCURSOR_SIZENS); case SIZE_OFFSET: return wxCursor(wxCURSOR_SIZEWE); case SIZE_ALL: return wxCursor(wxCURSOR_SIZING); default: return wxCursor(wxCURSOR_ARROW); }}
开发者ID:sqba,项目名称:floopy,代码行数:10,
示例6: wxCursorwxDropSource::wxDropSource( wxWindow *win ){#if 0 m_window = win; m_data = (wxDataObject *) NULL; m_retValue = wxDragCancel; m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); m_goaheadCursor = wxCursor( wxCURSOR_HAND );#endif}
开发者ID:LuaDist,项目名称:wxwidgets,代码行数:11,
示例7: switch wxCursor SplitterWindow2::sizeCursor() const { switch (m_splitMode) { case SplitMode_Horizontal: return wxCursor(wxCURSOR_SIZENS); case SplitMode_Vertical: return wxCursor(wxCURSOR_SIZEWE); case SplitMode_Unset: return wxCursor(); switchDefault() } }
开发者ID:Gustavo6046,项目名称:TrenchBroom,代码行数:11,
示例8: SetCursorvoid MapGridCtrl::OnLeftDown(wxMouseEvent& event){ SetCursor(wxCursor(wxCURSOR_HAND)); m_first_mouse_pos = event.GetPosition(); m_last_mouse_pos = event.GetPosition(); m_in_mouse_drag = true;}
开发者ID:springlobby,项目名称:springlobby,代码行数:7,
示例9: evtbool ImagePanel::MLUImgMove(wxMouseEvent& event){ if (m_stMP.iState == 2) { m_stMP.iState = 0; // new point & move incremention m_stMP.ptE.x = event.m_x; m_stMP.ptE.y = event.m_y; m_stMP.szMv.x = m_stMP.ptE.x - m_stMP.ptB.x; m_stMP.szMv.y = m_stMP.ptE.y - m_stMP.ptB.y; // Notify Parent: IMG_MOVE wxImgplEvent evt(wxEVT_IMGPL, GetId()); evt.SetCMD(IMGPL_CMD::IMG_MOVE); evt.SetParam((void*)&m_stMP.szMv); GetParent()->GetEventHandler()->ProcessEvent(evt); // move the image m_rcDest = m_stMP.rcDO; m_rcSrc = m_stMP.rcSO; ImgMove(m_stMP.szMv); } m_stMP.iState = 0; // cursor SetCursor(wxCursor(_T("./skin/HandOpen.cur"), wxBITMAP_TYPE_CUR)); // release mouse ReleaseMouse(); return true;}
开发者ID:gxcast,项目名称:GEIM,代码行数:29,
示例10: wxCursorbool CLinkButton::Create(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name ) { bool bRetVal = wxBitmapButton::Create(parent, id, bitmap, pos, size, style, validator, name); m_HandCursor = wxCursor(wxCURSOR_HAND); return bRetVal;}
开发者ID:DanAurea,项目名称:boinc,代码行数:7,
示例11: OnSkinvoid wxListSelection::Init(const StringArray &array, const wxString &data){ // Initialize the data fields. for(size_t i = 0; i < array.size(); ++i) { mpImpl->mFields[array[i]] = swEmpty; } // Set the primary data. mpImpl->mFields[array[0]] = data; // If the primary information is empty, add some temp text for calculating // the height correctly. if(true == data.IsEmpty()) { mpImpl->mFields[array[0]] = swAy; } // Grab skin values. OnSkin(); if(true == data.IsEmpty()) { mpImpl->mFields[array[0]] = swEmpty; } SetCursor(wxCursor(wxCURSOR_HAND));}
开发者ID:Dangr8,项目名称:Cities3D,代码行数:28,
示例12: SetCursorvoid GSPanel::OnFocus( wxFocusEvent& evt ){ evt.Skip(); m_HasFocus = true; if( g_Conf->GSWindow.AlwaysHideMouse ) { SetCursor( wxCursor(wxCURSOR_BLANK) ); m_CursorShown = false; } else DoShowMouse();#if defined(__unix__) // HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes // the event before the pad see it. So you send key event directly to the pad. if( (PADWriteEvent != NULL) && (GSopen2 != NULL) ) { keyEvent event = {0, 9}; // X equivalent of FocusIn; PADWriteEvent(event); }#endif //Console.Warning("GS frame > focus set"); UpdateScreensaver();}
开发者ID:jerrys123111,项目名称:pcsx2,代码行数:25,
示例13: wxImageCScrollBar::CScrollBar( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size) :wxPanel( parent, id, pos, size, wxTAB_TRAVERSAL | wxBORDER, "panel" ){ m_pParent = parent; m_SBLA = wxImage("bitmaps/sb_la.bmp"); m_SBRA = wxImage("bitmaps/sb_ra.bmp"); m_SBLC = wxImage("bitmaps/sb_lc.bmp"); m_SBRC = wxImage("bitmaps/sb_rc.bmp"); m_SBT = wxImage("bitmaps/sb_t.bmp"); m_rcSBT.x = -1; m_rcSBT.y = -1; m_rcSBLA.height = -1; m_min_pos = 0; m_max_pos = 100; m_pos = m_min_pos; m_range = m_max_pos - m_min_pos; this->SetCursor( wxCursor( wxCURSOR_HAND ) ); m_ld = false;}
开发者ID:amichaelt,项目名称:VideoSubFinder,代码行数:30,
示例14: wxASSERT_MSGbool wxHyperLink::Create (wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos, const wxSize &size, long style, const wxString &name) { bool okay = FALSE; // create static text okay = wxStaticText::Create (parent, id, label, pos, size, style, name); wxASSERT_MSG (okay, wxT("Failed to create wxStaticText, needed by wxHyperLink!")); // initialize variables m_URL = wxEmptyString; m_Marked = false; m_Visited = false; m_MarkedColour = wxColour (wxT("DARK GREY")); m_NormalColour = wxColour (wxT("BLUE")); m_VisitedColour = wxColour (wxT("PURPLE")); m_HoverCursor = wxCursor (wxCURSOR_HAND); // set foreground colour SetForegroundColour (m_NormalColour); wxFont font = GetFont(); font.SetUnderlined (true); SetFont (font); // get background colour m_BackgroundColour = GetBackgroundColour (); return okay;} // Create
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:33,
示例15: eventvoid wxHeaderCtrl::StartOrContinueResizing(unsigned int col, int xPhysical){ wxHeaderCtrlEvent event(IsResizing() ? wxEVT_COMMAND_HEADER_RESIZING : wxEVT_COMMAND_HEADER_BEGIN_RESIZE, GetId()); event.SetEventObject(this); event.SetColumn(col); event.SetWidth(ConstrainByMinWidth(col, xPhysical)); if ( GetEventHandler()->ProcessEvent(event) && !event.IsAllowed() ) { if ( IsResizing() ) { ReleaseMouse(); CancelDragging(); } //else: nothing to do -- we just don't start to resize } else // go ahead with resizing { if ( !IsResizing() ) { m_colBeingResized = col; SetCursor(wxCursor(wxCURSOR_SIZEWE)); CaptureMouse(); } //else: we had already done the above when we started }}
开发者ID:Toonerz,项目名称:project64,代码行数:31,
示例16: WXUNUSEDvoid MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ){ // Make another frame, containing a canvas MyChild *subframe = new MyChild(frame, _T("Canvas Frame")); wxString title; title.Printf(_T("Canvas Frame %d"), ++gs_nFrames); subframe->SetTitle(title); // Give it an icon#ifdef __WXMSW__ subframe->SetIcon(wxIcon(_T("chrt_icn")));#else subframe->SetIcon(wxIcon( mondrian_xpm ));#endif // Make a menubar wxMenu *file_menu = new wxMenu; file_menu->Append(MDI_NEW_WINDOW, _T("&New window")); file_menu->Append(MDI_CHILD_QUIT, _T("&Close child"), _T("Close this window")); file_menu->Append(MDI_QUIT, _T("&Exit")); wxMenu *option_menu = new wxMenu; option_menu->Append(MDI_REFRESH, _T("&Refresh picture")); option_menu->Append(MDI_CHANGE_TITLE, _T("Change &title.../tCtrl-T")); option_menu->AppendSeparator(); option_menu->Append(MDI_CHANGE_POSITION, _T("Move frame/tCtrl-M")); option_menu->Append(MDI_CHANGE_SIZE, _T("Resize frame/tCtrl-S")); wxMenu *help_menu = new wxMenu; help_menu->Append(MDI_ABOUT, _T("&About")); wxMenuBar *menu_bar = new wxMenuBar; menu_bar->Append(file_menu, _T("&File")); menu_bar->Append(option_menu, _T("&Child")); menu_bar->Append(help_menu, _T("&Help")); // Associate the menu bar with the frame subframe->SetMenuBar(menu_bar);#if wxUSE_STATUSBAR subframe->CreateStatusBar(); subframe->SetStatusText(title);#endif // wxUSE_STATUSBAR int width, height; subframe->GetClientSize(&width, &height); MyCanvas *canvas = new MyCanvas(subframe, wxPoint(0, 0), wxSize(width, height)); canvas->SetCursor(wxCursor(wxCURSOR_PENCIL)); subframe->canvas = canvas; // Give it scrollbars canvas->SetScrollbars(20, 20, 50, 50); subframe->Show(true);}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:60,
示例17: MyChildwxFrame *MyApp::CreateFrame(){ MyChild *subframe = new MyChild(NULL, _T("Canvas Frame"), wxPoint(10, 10), wxSize(300, 300), wxDEFAULT_FRAME_STYLE); subframe->SetTitle(_T("wxWidgets canvas frame")); // Give it a status line subframe->CreateStatusBar(); // Make a menubar wxMenu *file_menu = new wxMenu; file_menu->Append(HELLO_NEW, _T("&New MFC Window")); file_menu->Append(HELLO_QUIT, _T("&Close")); wxMenuBar *menu_bar = new wxMenuBar; menu_bar->Append(file_menu, _T("&File")); // Associate the menu bar with the frame subframe->SetMenuBar(menu_bar); int width, height; subframe->GetClientSize(&width, &height); MyCanvas *canvas = new MyCanvas(subframe, wxPoint(0, 0), wxSize(width, height)); canvas->SetCursor(wxCursor(wxCURSOR_PENCIL)); subframe->canvas = canvas; subframe->Show(true); // Return the main frame window return subframe;}
开发者ID:nealey,项目名称:vera,代码行数:34,
示例18: SetCursorvoid KeyListCtrl::OnEndDrag(wxMouseEvent& event){ SetCursor(wxCursor(*wxSTANDARD_CURSOR)); Disconnect(wxEVT_MOTION, wxMouseEventHandler(KeyListCtrl::OnDragging)); Disconnect(wxEVT_LEFT_UP, wxMouseEventHandler(KeyListCtrl::OnEndDrag)); Disconnect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(KeyListCtrl::OnEndDrag)); m_dragging_to_item = -1;}
开发者ID:takashi310,项目名称:VVD_Viewer,代码行数:8,
示例19: wxKeyEventHandlervoid MIDIEventKeyDialog::Listen(bool enable){ if (enable) { this->SetCursor(wxCursor(wxCURSOR_WAIT)); m_listen->GetEventHandler()->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MIDIEventKeyDialog::OnKeyDown), NULL, this); if (m_minuslisten) m_minuslisten->GetEventHandler()->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MIDIEventKeyDialog::OnKeyDown), NULL, this); } else { m_listen->GetEventHandler()->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(MIDIEventKeyDialog::OnKeyDown), NULL, this); if (m_minuslisten) m_minuslisten->GetEventHandler()->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(MIDIEventKeyDialog::OnKeyDown), NULL, this); this->SetCursor(wxCursor(wxCURSOR_ARROW)); }}
开发者ID:e9925248,项目名称:grandorgue,代码行数:17,
示例20: switchwxCursor InsertBrickTask::Start(){ switch ( m_tool ) { case NassiView::NASSI_TOOL_CONTINUE: return wxCursor(continuecur_xpm); case NassiView::NASSI_TOOL_BREAK: return wxCursor(breakcur_xpm); case NassiView::NASSI_TOOL_RETURN: return wxCursor(returncur_xpm); case NassiView::NASSI_TOOL_WHILE: return wxCursor(whilecur_xpm); case NassiView::NASSI_TOOL_DOWHILE: return wxCursor(dowhilecur_xpm); case NassiView::NASSI_TOOL_FOR: return wxCursor(forcur_xpm); case NassiView::NASSI_TOOL_BLOCK: return wxCursor(blockcur_xpm); case NassiView::NASSI_TOOL_IF: return wxCursor(wxImage(ifcur_xpm)); case NassiView::NASSI_TOOL_SWITCH: return wxCursor(switchcur_xpm); default: case NassiView::NASSI_TOOL_INSTRUCTION: return wxCursor(instrcur_xpm); }}
开发者ID:BackupTheBerlios,项目名称:nassiplugin-svn,代码行数:17,
示例21: switch/**< stop drag */bool ImagePanel::EndDrag(bool bFuc /*= true*/){ switch(m_stMP.emFuc) { case IMGPL_CMD::IMG_MOVE: // iamge move { if (m_stMP.iState != 0) { ReleaseMouse(); m_stMP.iState = 0; } if (bFuc) SetCursor(wxCursor(_T("./skin/HandOpen.cur"), wxBITMAP_TYPE_CUR)); else { m_stMP.emFuc = IMGPL_CMD::NONE; SetCursor(wxCursor(wxCURSOR_ARROW)); } } break; case IMGPL_CMD::IMG_ZRECT: // zoom rect case IMGPL_CMD::SEL_CIRCLE: case IMGPL_CMD::SEL_ELLIPSE: case IMGPL_CMD::SEL_SQUARE: case IMGPL_CMD::SEL_RECTANGLE: { if (m_stMP.iState != 0) { m_stMP.iState = 0; ReleaseMouse(); Refresh(false); } if (!bFuc) { m_stMP.emFuc = IMGPL_CMD::NONE; SetCursor(wxCursor(wxCURSOR_ARROW)); } } break; default: break; } return true;}
开发者ID:gxcast,项目名称:GEIM,代码行数:46,
示例22: wxCursorvoid WxWindow::setCursorVisible(bool state){ cursorVisible = state; if( !cursorVisible ) canvas->SetCursor( wxCursor(wxCURSOR_BLANK) ); else canvas->SetCursor( wxNullCursor );}
开发者ID:FloodProject,项目名称:flood,代码行数:9,
示例23: OnGridNetworkDragQuit// abort dragging a list item because user has left windowvoid xLightsFrame::OnGridNetworkDragQuit(wxMouseEvent& event){ // restore cursor and disconnect unconditionally GridNetwork->SetCursor(wxCursor(*wxSTANDARD_CURSOR)); GridNetwork->Disconnect(wxEVT_LEFT_UP, wxMouseEventHandler(xLightsFrame::OnGridNetworkDragEnd)); GridNetwork->Disconnect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(xLightsFrame::OnGridNetworkDragQuit));}
开发者ID:kgustafson,项目名称:nutcracker_c,代码行数:10,
示例24: hdButtonHandleddMinMaxTableButtonHandle::ddMinMaxTableButtonHandle(hdIFigure *owner, hdILocator *buttonLocator , wxBitmap &buttonImage, wxBitmap &buttonSecondImage, wxSize &size): hdButtonHandle(owner, buttonLocator, buttonImage, size){ handleCursorImage = wxBitmap(*ddMinMaxCursor_png_img).ConvertToImage(); handleCursor = wxCursor(handleCursorImage); buttonMaximizeImage = buttonSecondImage; tmpImage = buttonImage; showFirst = true;}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:9,
示例25: WXUNUSEDvoid MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event)){ // Make another frame, containing a canvas MyChild *subframe = new MyChild(frame, wxT("Canvas Frame"), wxPoint(10, 10), wxSize(300, 300), wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE); subframe->SetTitle(wxString::Format(wxT("Canvas Frame %d"), winNumber)); winNumber ++; // Give it an icon (this is ignored in MDI mode: uses resources)#ifdef __WXMSW__ subframe->SetIcon(wxIcon(wxT("sashtest_icn")));#endif#if wxUSE_STATUSBAR // Give it a status line subframe->CreateStatusBar();#endif // wxUSE_STATUSBAR // Make a menubar wxMenu *file_menu = new wxMenu; file_menu->Append(SASHTEST_NEW_WINDOW, wxT("&New window")); file_menu->Append(SASHTEST_CHILD_QUIT, wxT("&Close child")); file_menu->Append(SASHTEST_QUIT, wxT("&Exit")); wxMenu *option_menu = new wxMenu; // Dummy option option_menu->Append(SASHTEST_REFRESH, wxT("&Refresh picture")); wxMenu *help_menu = new wxMenu; help_menu->Append(SASHTEST_ABOUT, wxT("&About")); wxMenuBar *menu_bar = new wxMenuBar; menu_bar->Append(file_menu, wxT("&File")); menu_bar->Append(option_menu, wxT("&Options")); menu_bar->Append(help_menu, wxT("&Help")); // Associate the menu bar with the frame subframe->SetMenuBar(menu_bar); int width, height; subframe->GetClientSize(&width, &height); MyCanvas *canvas = new MyCanvas(subframe, wxPoint(0, 0), wxSize(width, height)); canvas->SetCursor(wxCursor(wxCURSOR_PENCIL)); subframe->canvas = canvas; // Give it scrollbars canvas->SetScrollbars(20, 20, 50, 50); subframe->Show(true);}
开发者ID:euler0,项目名称:Helium,代码行数:56,
示例26: switchvoid GLIBitmapNotebook::UpdateCursorDisplay(wxWindow *updateWindow) const{ if(!updateWindow) { return; } // Assign the cursor based on the tool state switch(toolState) { case(TS_Select): updateWindow->SetCursor(wxCursor(wxCURSOR_CROSS)); break; case(TS_Zoom): updateWindow->SetCursor(wxCursor(wxCURSOR_MAGNIFIER)); break; };}
开发者ID:Aetherdyne,项目名称:glintercept,代码行数:19,
注:本文中的wxCursor函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ wxDELETE函数代码示例 C++ wxCopyRectToRECT函数代码示例 |