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


C++ wxWindow::Connect方法代码示例

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


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

示例1: EvtCheckBox

//----------------------------------------
void CXYPlotPanel::EvtCheckBox(wxWindow& window, const wxCommandEventFunction& method, wxObject* userData, wxEvtHandler* eventSink)
{
  window.Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
                 (wxObjectEventFunction)
                 (wxEventFunction)
                 method,
                 userData,
                 eventSink);

}
开发者ID:adakite,项目名称:main,代码行数:11,代码来源:XYPlotPanel.cpp

示例2: EvtRadioButton

//----------------------------------------
void CXYPlotPanel::EvtRadioButton(wxWindow& window, const wxCommandEventFunction& method, wxObject* userData, wxEvtHandler* eventSink)
{
  window.Connect(wxEVT_COMMAND_RADIOBUTTON_SELECTED,
                 (wxObjectEventFunction)
                 (wxEventFunction)
                 method,
                 userData,
                 eventSink);

}
开发者ID:adakite,项目名称:main,代码行数:11,代码来源:XYPlotPanel.cpp

示例3: EvtSize

//----------------------------------------
void CXYPlotPanel::EvtSize(wxWindow& window, const wxSizeEventFunction& method, wxObject* userData, wxEvtHandler* eventSink)
{
  window.Connect(wxEVT_SIZE,
                 (wxObjectEventFunction)
                 (wxEventFunction)
                 method,
                 userData,
                 eventSink);

}
开发者ID:adakite,项目名称:main,代码行数:11,代码来源:XYPlotPanel.cpp

示例4: EvtUpdateMinSize

//----------------------------------------
void CZFXYPlotFrame::EvtUpdateMinSize(wxWindow& window, int32_t winId, const CZFXYUpdateMinSizeEventFunction& method,
                                wxObject* userData, wxEvtHandler* eventSink)
{
  window.Connect(winId,
                 wxEVT_ZFXY_UPDATE_MINSIZE,
                 (wxObjectEventFunction)
                 (wxEventFunction)
                 method,
                 userData,
                 eventSink);
}
开发者ID:adakite,项目名称:main,代码行数:12,代码来源:ZFXYPlotFrame.cpp

示例5: EvtContourPropFrameClose

//----------------------------------------
void CContourPropPanel::EvtContourPropFrameClose(wxWindow& window, int32_t winId, const CContourPropFrameCloseEventFunction& method,
                                wxObject* userData, wxEvtHandler* eventSink)
{
  window.Connect(winId,
                 wxEVT_CONTOUR_PROP_CLOSE,
                 (wxObjectEventFunction)
                 (wxEventFunction)
                 method,
                 userData,
                 eventSink);
}
开发者ID:adakite,项目名称:main,代码行数:12,代码来源:ContourPropFrame.cpp

示例6: Create

bool wxDynamicSashWindowLeaf::Create()
{
    m_hscroll = new wxScrollBar();
    m_vscroll = new wxScrollBar();
    m_viewport = new wxWindow();

    wxDynamicSashWindowImpl *add_child_target = m_impl->m_add_child_target;
    m_impl->m_add_child_target = NULL;

    bool success = m_hscroll->Create(m_impl->m_container, wxID_ANY,
                                     wxDefaultPosition, wxDefaultSize,
                                     wxSB_HORIZONTAL);
    if ( success )
        success = m_vscroll->Create(m_impl->m_container, wxID_ANY,
                                    wxDefaultPosition, wxDefaultSize,
                                    wxSB_VERTICAL);
    if ( success )
        success = m_viewport->Create(m_impl->m_container, wxID_ANY);
    if ( !success )
        return false;

    m_impl->m_add_child_target = add_child_target;

    wxCursor cursor(wxCURSOR_ARROW);
    m_hscroll->SetCursor(cursor);
    m_vscroll->SetCursor(cursor);
    m_viewport->SetCursor(cursor);

    // the viewport must resize its child when it is itself resized, but it's
    // more convenient to do it in our own method instead of deriving a new
    // class just for this: this is why we pass this as last Connect() argument
    m_viewport->Connect(wxEVT_SIZE,
                        wxSizeEventHandler(wxDynamicSashWindowLeaf::OnViewSize),
                        NULL, this);

    Connect(wxEVT_DYNAMIC_SASH_REPARENT,
            wxEventHandler(wxDynamicSashWindowLeaf::OnReparent));

    if (m_impl->m_window->GetWindowStyle() & wxDS_MANAGE_SCROLLBARS)
    {
        m_hscroll->SetEventHandler(this);
        m_vscroll->SetEventHandler(this);

        Connect(wxEVT_SET_FOCUS,
                wxFocusEventHandler(wxDynamicSashWindowLeaf::OnFocus));
        Connect(wxEVT_SCROLL_TOP,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_BOTTOM,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_LINEUP,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_LINEDOWN,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_PAGEUP,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_PAGEDOWN,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_THUMBTRACK,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_THUMBRELEASE,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
    }

    wxLayoutConstraints *layout = new wxLayoutConstraints();
    if (!layout)
        return false;

    wxSize size = m_hscroll->GetBestSize();

    layout->left.SameAs(m_impl->m_container, wxLeft, 10);
    layout->right.LeftOf(m_vscroll);
    layout->bottom.SameAs(m_impl->m_container, wxBottom, 3);
    layout->height.Absolute(size.GetHeight());
    m_hscroll->SetConstraints(layout);

    layout = new wxLayoutConstraints();
    if (!layout)
        return false;

    size = m_vscroll->GetBestSize();

    layout->top.SameAs(m_impl->m_container, wxTop, 10);
    layout->bottom.Above(m_hscroll);
    layout->right.SameAs(m_impl->m_container, wxRight, 3);
    layout->width.Absolute(size.GetWidth());
    m_vscroll->SetConstraints(layout);

    layout = new wxLayoutConstraints();
    if (!layout)
        return false;
    layout->left.SameAs(m_impl->m_container, wxLeft, 3);
    layout->right.LeftOf(m_vscroll);
    layout->top.SameAs(m_impl->m_container, wxTop, 3);
    layout->bottom.Above(m_hscroll);
    m_viewport->SetConstraints(layout);

    m_impl->m_container->Layout();

    return true;
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:100,代码来源:dynamicsash.cpp


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