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

C++ MacPostControlCreate函数代码示例

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

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



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

示例1: DontCreatePeer

bool wxBitmapButton::Create( wxWindow *parent,
                             wxWindowID id,
                             const wxBitmap& bitmap,
                             const wxPoint& pos,
                             const wxSize& size,
                             long style,
                             const wxValidator& validator,
                             const wxString& name )
{
    DontCreatePeer();
    
    if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style,
                                     validator, name) )
        return false;

    if ( style & wxBU_AUTODRAW )
    {
        m_marginX =
        m_marginY = wxDEFAULT_BUTTON_MARGIN;
    }
    else
    {
        m_marginX =
        m_marginY = 0;
    }

    m_bitmaps[State_Normal] = bitmap;

    SetPeer(wxWidgetImpl::CreateBitmapButton( this, parent, id, bitmap, pos, size, style, GetExtraStyle() ));

    MacPostControlCreate( pos, size );

    return true;
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:34,代码来源:bmpbuttn_osx.cpp


示例2: wxSize

bool wxGauge::Create(wxWindow *parent, wxWindowID id,
           int range,
           const wxPoint& pos,
           const wxSize& s,
           long style,
           const wxValidator& validator,
           const wxString& name)
{
    m_macIsUserPane = FALSE ;

    if ( !wxGaugeBase::Create(parent, id, range, pos, s, style & 0xE0FFFFFF, validator, name) )
        return false;

    wxSize size = s ;
    /*
    if ( size.x == wxDefaultCoord && size.y == wxDefaultCoord)
    {
        size = wxSize( 200 , 16 ) ;
    }
    */
    Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
    m_peer = new wxMacControl(this) ;
    verify_noerr ( CreateProgressBarControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , 
     GetValue() , 0 , GetRange() , false /* not indeterminate */ , m_peer->GetControlRefAddr() ) );

    if ( GetValue() == 0 )
        m_peer->SetData<Boolean>( kControlEntireControl , kControlProgressBarAnimatingTag , (Boolean) false ) ;

    MacPostControlCreate(pos,size) ;
    
    return TRUE;
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:32,代码来源:gauge.cpp


示例3: label

bool wxButton::Create(wxWindow *parent,
    wxWindowID id,
    const wxString& lbl,
    const wxPoint& pos,
    const wxSize& size,
    long style,
    const wxValidator& validator,
    const wxString& name)
{
    wxString label(lbl);
    if (label.empty() && wxIsStockID(id) && !(id == wxID_HELP))
        label = wxGetStockLabel(id);

    m_macIsUserPane = false ;

    if ( !wxButtonBase::Create(parent, id, pos, size, style, validator, name) )
        return false;

    m_labelOrig = m_label = label ;
    
    m_peer = wxWidgetImpl::CreateButton( this, parent, id, label, pos, size, style, GetExtraStyle() );

    MacPostControlCreate( pos, size );

    return true;
}
开发者ID:jonntd,项目名称:dynamica,代码行数:26,代码来源:button_osx.cpp


示例4: MacPreControlCreate

bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
        long style, const wxString& name)
{
    if ( !wxSpinButtonBase::Create(parent, id, pos, size,
                                   style, wxDefaultValidator, name) )
        return false;

    m_min = 0;
    m_max = 100;

    if (!parent)
        return false;

    Rect bounds ;
    Str255 title ;

    MacPreControlCreate( parent , id ,  wxEmptyString , pos , size ,style,*( (wxValidator*) NULL ) , name , &bounds , title ) ;

    m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 100,
        kControlLittleArrowsProc , (long) this ) ;

    wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;

    MacPostControlCreate() ;

    return true;
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:27,代码来源:spinbutt.cpp


示例5: wxMacGetBoundsForControl

bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
        long style, const wxString& name)
{
    m_macIsUserPane = false ;

    if ( !wxSpinButtonBase::Create(parent, id, pos, size,
                                   style, wxDefaultValidator, name) )
        return false;

    m_min = 0;
    m_max = 100;

    if (!parent)
        return false;

    Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;

    m_peer = new wxMacControl(this) ;
    verify_noerr ( CreateLittleArrowsControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , 0 , m_min , m_max , 1 ,
     m_peer->GetControlRefAddr() ) );

    m_peer->SetActionProc( GetwxMacLiveScrollbarActionProc() ) ;
    MacPostControlCreate(pos,size) ;

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


示例6: DontCreatePeer

bool wxToggleButton::Create(wxWindow *parent, wxWindowID id,
                            const wxString& label,
                            const wxPoint& pos,
                            const wxSize& size, long style,
                            const wxValidator& validator,
                            const wxString& name)
{
    DontCreatePeer();
    
    m_marginX =
    m_marginY = 0;

    // FIXME: this hack is needed because we're called from
    //        wxBitmapToggleButton::Create() with this style and we currently use a
    //        different wxWidgetImpl method (CreateBitmapToggleButton() rather than
    //        CreateToggleButton()) for creating bitmap buttons, but we really ought
    //        to unify the creation of buttons of all kinds and then remove
    //        this check
    if ( style & wxBU_NOTEXT )
    {
        return wxControl::Create(parent, id, pos, size, style,
                                 validator, name);
    }

    if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
        return false;

    m_labelOrig = m_label = label ;

    SetPeer(wxWidgetImpl::CreateToggleButton( this, parent, id, label, pos, size, style, GetExtraStyle() )) ;

    MacPostControlCreate(pos,size) ;

  return TRUE;
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:35,代码来源:tglbtn_osx.cpp


示例7: DontCreatePeer

bool
wxDatePickerCtrl::Create(wxWindow *parent,
                         wxWindowID id,
                         const wxDateTime& dt,
                         const wxPoint& pos,
                         const wxSize& size,
                         long style,
                         const wxValidator& validator,
                         const wxString& name)
{
    DontCreatePeer();

    if ( !wxDatePickerCtrlBase::Create(parent, id, pos, size,
                                       style, validator, name) )
        return false;

    wxOSXWidgetImpl* const peer = wxDateTimeWidgetImpl::CreateDateTimePicker
                                  (
                                    this,
                                    dt,
                                    pos,
                                    size,
                                    style,
                                    wxDateTimeWidget_YearMonthDay
                                  );
    if ( !peer )
        return false;

    SetPeer(peer);

    MacPostControlCreate(pos, size);

    return true;
}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:34,代码来源:datectrl_osx.cpp


示例8: wxStripMenuCodes

bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
           const wxString& label,
           const wxPoint& pos,
           const wxSize& size,
           long style,
           const wxString& name)
{
    m_macIsUserPane = FALSE ;
    
    m_label = wxStripMenuCodes(label) ;

    if ( !wxControl::Create( parent, id, pos, size, style,
                             wxDefaultValidator , name ) )
    {
        return false;
    }

    Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
    wxMacCFStringHolder str(m_label,m_font.GetEncoding() ) ;
    m_peer = new wxMacControl(this) ;
    verify_noerr(CreateStaticTextControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, str , 
        NULL , m_peer->GetControlRefAddr() ) ) ;  

    MacPostControlCreate(pos,size) ;

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


示例9: wxMacGetBoundsForControl

// Single check box item
bool wxCheckBox::Create(wxWindow *parent,
                        wxWindowID id,
                        const wxString& label,
                        const wxPoint& pos,
                        const wxSize& size,
                        long style,
                        const wxValidator& validator,
                        const wxString& name)
{
    m_macIsUserPane = false ;

    if ( !wxCheckBoxBase::Create(parent, id, pos, size, style, validator, name) )
        return false;

    m_label = label ;

    SInt32 maxValue = 1 /* kControlCheckboxCheckedValue */;
    if (style & wxCHK_3STATE)
        maxValue = 2 /* kControlCheckboxMixedValue */;

    Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
    m_peer = new wxMacControl( this ) ;
    verify_noerr( CreateCheckBoxControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds ,
                                        CFSTR("") , 0 , false , m_peer->GetControlRefAddr() ) );

    m_peer->SetMaximum( maxValue ) ;

    MacPostControlCreate(pos, size) ;

    return true;
}
开发者ID:EdgarTx,项目名称:wx,代码行数:32,代码来源:checkbox.cpp


示例10: DontCreatePeer

bool wxStaticText::Create( wxWindow *parent,
    wxWindowID id,
    const wxString& label,
    const wxPoint& pos,
    const wxSize& size,
    long style,
    const wxString& name )
{    
    DontCreatePeer();
    
    if ( !wxControl::Create( parent, id, pos, size, style, wxDefaultValidator, name ) )
        return false;

    SetPeer(wxWidgetImpl::CreateStaticText( this, parent, id, label, pos, size, style, GetExtraStyle() ));

    MacPostControlCreate( pos, size );

    SetLabel(label);
    if ( HasFlag(wxST_NO_AUTORESIZE) )
    {
        // Normally this is done in SetLabel() below but we avoid doing it when
        // this style is used, so we need to explicitly do it in the ctor in
        // this case or otherwise the control would retain its initial tiny size.
        InvalidateBestSize();
        SetInitialSize(size);
    }

    return true;
}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:29,代码来源:stattext_osx.cpp


示例11: MacPreControlCreate

// Single check box item
bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
           const wxPoint& pos,
           const wxSize& size, long style,
           const wxValidator& validator,
           const wxString& name)
{
    if ( !wxCheckBoxBase::Create(parent, id, pos, size, style, validator, name) )
        return false;

    Rect bounds ;
    Str255 title ;
    
    MacPreControlCreate( parent , id ,  label , pos , size ,style, validator , name , &bounds , title ) ;

    SInt16 maxValue = 1 /* kControlCheckboxCheckedValue */;
    if (style & wxCHK_3STATE)
    {
        maxValue = 2 /* kControlCheckboxMixedValue */;
    }

    m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , maxValue, 
          kControlCheckBoxProc , (long) this ) ;
    
    MacPostControlCreate() ;

  return TRUE;
}
开发者ID:Duion,项目名称:Torsion,代码行数:28,代码来源:checkbox.cpp


示例12: wxMacGetBoundsForControl

bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
           const wxString& label,
           const wxPoint& pos,
           const wxSize& size,
           long style,
           const wxString& name)
{
    m_macIsUserPane = FALSE ;

    if ( !wxControl::Create(parent, id, pos, size,
                            style, wxDefaultValidator, name) )
        return false;

    m_label = label ;

    Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;

    m_peer = new wxMacControl(this) ;
    verify_noerr(CreateGroupBoxControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, CFSTR("") ,
        true /*primary*/ , m_peer->GetControlRefAddr() ) ) ;

    MacPostControlCreate(pos,size) ;

    return TRUE;
}
开发者ID:Duion,项目名称:Torsion,代码行数:25,代码来源:statbox.cpp


示例13: wxSize

bool wxGauge::Create(wxWindow *parent, wxWindowID id,
                     int range,
                     const wxPoint& pos,
                     const wxSize& s,
                     long style,
                     const wxValidator& validator,
                     const wxString& name)
{
    if ( !wxGaugeBase::Create(parent, id, range, pos, s, style, validator, name) )
        return false;

    wxSize size = s ;
    Rect bounds ;
    Str255 title ;
    m_rangeMax = range ;
    m_gaugePos = 0 ;

    if ( size.x == wxDefaultCoord && size.y == wxDefaultCoord)
    {
        size = wxSize( 200 , 16 ) ;
    }

    MacPreControlCreate( parent , id ,  wxEmptyString , pos , size ,style & 0xE0FFFFFF /* no borders on mac */ , validator , name , &bounds , title ) ;

    m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , range,
        kControlProgressBarProc , (long) this ) ;

    MacPostControlCreate() ;

    return true;
}
开发者ID:Bluehorn,项目名称:wxPython,代码行数:31,代码来源:gauge.cpp


示例14: wxMacGetBoundsForControl

bool wxNotebook::Create( wxWindow *parent,
                         wxWindowID id,
                         const wxPoint& pos,
                         const wxSize& size,
                         long style,
                         const wxString& name )
{
    m_macIsUserPane = false ;

    if (! (style & wxBK_ALIGN_MASK))
        style |= wxBK_TOP;

    if ( !wxNotebookBase::Create( parent, id, pos, size, style, name ) )
        return false;

    Rect bounds = wxMacGetBoundsForControl( this, pos, size );

    if ( bounds.right <= bounds.left )
        bounds.right = bounds.left + 100;
    if ( bounds.bottom <= bounds.top )
        bounds.bottom = bounds.top + 100;

    UInt16 tabstyle = kControlTabDirectionNorth;
    if ( HasFlag(wxBK_LEFT) )
        tabstyle = kControlTabDirectionWest;
    else if ( HasFlag( wxBK_RIGHT ) )
        tabstyle = kControlTabDirectionEast;
    else if ( HasFlag( wxBK_BOTTOM ) )
        tabstyle = kControlTabDirectionSouth;

    ControlTabSize tabsize;
    switch (GetWindowVariant())
    {
    case wxWINDOW_VARIANT_MINI:
        if ( UMAGetSystemVersion() >= 0x1030 )
            tabsize = 3 ;
        else
            tabsize = kControlSizeSmall;
        break;

    case wxWINDOW_VARIANT_SMALL:
        tabsize = kControlTabSizeSmall;
        break;

    default:
        tabsize = kControlTabSizeLarge;
        break;
    }

    m_peer = new wxMacControl( this );
    OSStatus err = CreateTabsControl(
                       MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds,
                       tabsize, tabstyle, 0, NULL, m_peer->GetControlRefAddr() );
    verify_noerr( err );

    MacPostControlCreate( pos, size );

    return true ;
}
开发者ID:stefanhusmann,项目名称:Amaya,代码行数:59,代码来源:notebmac.cpp


示例15: DontCreatePeer

bool wxRadioBox::Create( wxWindow *parent,
    wxWindowID id, const wxString& label,
    const wxPoint& pos, const wxSize& size,
    int n, const wxString choices[],
    int majorDim, long style,
    const wxValidator& val, const wxString& name )
{    
    DontCreatePeer();
    
    if ( !wxControl::Create( parent, id, pos, size, style, val, name ) )
        return false;

    // during construction we must keep this at 0, otherwise GetBestSize fails
    m_noItems = 0;
    m_noRowsOrCols = majorDim;
    m_radioButtonCycle = NULL;

    SetMajorDim( majorDim == 0 ? n : majorDim, style );

    m_labelOrig = m_label = label;

    SetPeer(wxWidgetImpl::CreateGroupBox( this, parent, id, label, pos, size, style, GetExtraStyle() ));

#if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */
#   pragma ivdep
#   pragma swp
#   pragma unroll
#   pragma prefetch
#   if 0
#       pragma simd noassert
#   endif
#endif /* VDM auto patch */
    for (int i = 0; i < n; i++)
    {
        wxRadioButton *radBtn = new wxRadioButton(
            this,
            wxID_ANY,
            GetLabelText(choices[i]),
            wxPoint( 5, 20 * i + 10 ),
            wxDefaultSize,
            i == 0 ? wxRB_GROUP : 0 );

        if ( i == 0 )
            m_radioButtonCycle = radBtn;
//        m_radioButtonCycle = radBtn->AddInCycle( m_radioButtonCycle );
    }

    // as all radiobuttons have been set-up, set the correct dimensions
    m_noItems = (unsigned int)n;
    SetMajorDim( majorDim == 0 ? n : majorDim, style );

    SetSelection( 0 );
    InvalidateBestSize();
    SetInitialSize( size );
    MacPostControlCreate( pos, size );

    return true;
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:58,代码来源:radiobox_osx.cpp


示例16: wxMacGetBoundsForControl

bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
                        const wxPoint& pos, const wxSize& size,
                        int n, const wxString choices[],
                        int majorDim, long style,
                        const wxValidator& val, const wxString& name)
{
    m_macIsUserPane = false ;

    if ( !wxControl::Create(parent, id, pos, size, style, val, name) )
        return false;

    int i;

    m_noItems = n;
    m_noRowsOrCols = majorDim;
    m_radioButtonCycle = NULL;

    if (majorDim==0)
        m_majorDim = n ;
    else
        m_majorDim = majorDim ;


    m_label = label ;

    Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
    if( bounds.right <= bounds.left )
        bounds.right = bounds.left + 100 ;
    if ( bounds.bottom <= bounds.top )
        bounds.bottom = bounds.top + 100 ;

    m_peer = new wxMacControl(this) ;

    verify_noerr(CreateGroupBoxControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, CFSTR("") ,
        true /*primary*/ , m_peer->GetControlRefAddr() ) ) ;

    for (i = 0; i < n; i++)
    {
        wxRadioButton *radBtn = new wxRadioButton
                                    (
                                        this,
                                        wxID_ANY,
                                        wxStripMenuCodes(choices[i]),
                                        wxPoint(5,20*i+10),
                                        wxDefaultSize,
                                        i == 0 ? wxRB_GROUP : 0
                                    );
        if ( i == 0 )
            m_radioButtonCycle = radBtn ;
        //        m_radioButtonCycle=radBtn->AddInCycle(m_radioButtonCycle);
    }

    SetSelection(0);
    MacPostControlCreate(pos,size) ;

    return true;
}
开发者ID:Duion,项目名称:Torsion,代码行数:57,代码来源:radiobox.cpp


示例17: wxMacGetBoundsForControl

bool wxRadioButton::Create( wxWindow *parent,
    wxWindowID id,
    const wxString& label,
    const wxPoint& pos,
    const wxSize& size,
    long style,
    const wxValidator& validator,
    const wxString& name )
{
    m_macIsUserPane = false;

    if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
        return false;

    m_label = label;

    Rect bounds = wxMacGetBoundsForControl( this, pos, size );

    m_peer = new wxMacControl( this );
    OSStatus err = CreateRadioButtonControl(
        MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, CFSTR(""),
        0, false /* no autotoggle */, m_peer->GetControlRefAddr() );
    verify_noerr( err );

    MacPostControlCreate( pos, size );

    m_cycle = this;

    if (HasFlag( wxRB_GROUP ))
    {
        AddInCycle( NULL );
    }
    else
    {
        // search backward for last group start
        wxRadioButton *chief = NULL;
        wxWindowList::compatibility_iterator node = parent->GetChildren().GetLast();
        while (node)
        {
            wxWindow *child = node->GetData();
            if (child->IsKindOf( CLASSINFO( wxRadioButton ) ))
            {
                chief = (wxRadioButton*)child;
                if (child->HasFlag( wxRB_GROUP ))
                    break;
            }

            node = node->GetPrevious();
        }

        AddInCycle( chief );
    }

    return true;
}
开发者ID:EdgarTx,项目名称:wx,代码行数:55,代码来源:radiobut.cpp


示例18: DontCreatePeer

bool wxRadioButton::Create( wxWindow *parent,
    wxWindowID id,
    const wxString& label,
    const wxPoint& pos,
    const wxSize& size,
    long style,
    const wxValidator& validator,
    const wxString& name )
{    
    DontCreatePeer();
    
    if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
        return false;

    m_labelOrig = m_label = label;

    SetPeer(wxWidgetImpl::CreateRadioButton( this, parent, id, label, pos, size, style, GetExtraStyle() ));

    MacPostControlCreate( pos, size );

    m_cycle = this;

    if (HasFlag( wxRB_GROUP ))
    {
        AddInCycle( NULL );
    }
    else
    {
        // search backward for last group start
        wxRadioButton *chief = NULL;
        wxWindowList::compatibility_iterator node = parent->GetChildren().GetLast();
        while (node)
        {
            wxWindow *child = node->GetData();
            if (child->IsKindOf( CLASSINFO( wxRadioButton ) ))
            {
                chief = (wxRadioButton*)child;
                if (child->HasFlag( wxRB_GROUP ))
                    break;
            }

            node = node->GetPrevious();
        }

        AddInCycle( chief );
    }

    return true;
}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:49,代码来源:radiobut_osx.cpp


示例19: MacPreControlCreate

bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
                        const wxPoint& pos, const wxSize& size,
                        int n, const wxString choices[],
                        int majorDim, long style,
                        const wxValidator& val, const wxString& name)
{
    if ( !wxControl::Create(parent, id, pos, size, style, val, name) )
        return false;

    int i;

    m_noItems = n;
    m_noRowsOrCols = majorDim;
    m_radioButtonCycle = NULL;

    if (majorDim==0)
        m_majorDim = n ;
    else
        m_majorDim = majorDim ;

    Rect bounds ;
    Str255 title ;

    MacPreControlCreate( parent , id ,  wxStripMenuCodes(label) , pos , size ,style, val , name , &bounds , title ) ;

    m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
        kControlGroupBoxTextTitleProc , (long) this ) ;

    for (i = 0; i < n; i++)
    {
        wxRadioButton *radBtn = new wxRadioButton
                                    (
                                        this,
                                        wxID_ANY,
                                        wxStripMenuCodes(choices[i]),
                                        wxPoint(5,20*i+10),
                                        wxDefaultSize,
                                        i == 0 ? wxRB_GROUP : 0
                                    );
        if ( i == 0 )
            m_radioButtonCycle = radBtn ;
        //        m_radioButtonCycle=radBtn->AddInCycle(m_radioButtonCycle);
    }

    SetSelection(0);
    MacPostControlCreate() ;

    return true;
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:49,代码来源:radiobox.cpp


示例20: DontCreatePeer

bool wxButton::Create(wxWindow *parent,
    wxWindowID id,
    const wxString& labelOrig,
    const wxPoint& pos,
    const wxSize& size,
    long style,
    const wxValidator& validator,
    const wxString& name)
{
    DontCreatePeer();
    
    m_marginX =
    m_marginY = 0;

    // FIXME: this hack is needed because we're called from
    //        wxBitmapButton::Create() with this style and we currently use a
    //        different wxWidgetImpl method (CreateBitmapButton() rather than
    //        CreateButton()) for creating bitmap buttons, but we really ought
    //        to unify the creation of buttons of all kinds and then remove
    //        this check
    if ( style & wxBU_NOTEXT )
    {
        return wxControl::Create(parent, id, pos, size, style,
                                 validator, name);
    }

    wxString label;

    // Ignore the standard label for help buttons if possible, they use "?"
    // label under Mac which looks better.
    if ( !IsHelpButtonWithStandardLabel(id, labelOrig) )
    {
        label = labelOrig.empty() && wxIsStockID(id) ? wxGetStockLabel(id)
                                                     : labelOrig;
    }


    if ( !wxButtonBase::Create(parent, id, pos, size, style, validator, name) )
        return false;

    m_labelOrig =
    m_label = label ;

    SetPeer(wxWidgetImpl::CreateButton( this, parent, id, label, pos, size, style, GetExtraStyle() ));

    MacPostControlCreate( pos, size );

    return true;
}
开发者ID:madnessw,项目名称:thesnow,代码行数:49,代码来源:button_osx.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ MailDraft函数代码示例发布时间:2022-05-30
下一篇:
C++ M_throw函数代码示例发布时间: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