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


C++ DoGetBestSize函数代码示例

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


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

示例1: DoGetBestSize

wxSize wxSheetCellStringRendererRefData::GetBestSize(wxSheet& sheet,
        const wxSheetCellAttr& attr,
        wxDC& dc,
        const wxSheetCoords& coords)
{
    return DoGetBestSize(sheet, attr, dc, GetString(sheet, coords));
}
开发者ID:stahta01,项目名称:wxCode_components,代码行数:7,代码来源:sheetren.cpp

示例2: SetMinSize

void wxRibbonBar::ShowPanels(bool show)
{
    m_arePanelsShown = show;
    SetMinSize(wxSize(GetSize().GetWidth(), DoGetBestSize().GetHeight()));
    Realise();
    GetParent()->Layout();
}
开发者ID:Kaoswerk,项目名称:newton-dynamics,代码行数:7,代码来源:bar.cpp

示例3: wxGetDisplay

void WXAppBar::UnSetDockedModeStep2()
{
	Display *dd= (Display *) wxGetDisplay();

	// Window X11 handle
	GtkWidget *gtkWidget= (GtkWidget *) this->GetHandle();
	Window w= GDK_WINDOW_XWINDOW (gtkWidget->window);
	
	Refresh();
	Update();
	
	//
	// Set window style back to normal again
	//
	Atom atomTmp= XInternAtom (dd, "_NET_WM_WINDOW_TYPE", False);
	Atom atom_NET_WM_WINDOW_TYPE_NORMAL= XInternAtom (dd, "_NET_WM_WINDOW_TYPE_NORMAL", False);
	unsigned long propInfo= atom_NET_WM_WINDOW_TYPE_NORMAL;
	XChangeProperty (dd, w, atomTmp, XA_ATOM, 32, PropModeReplace, (unsigned char *) &propInfo, 1);
	XSync(dd, False);
	
	// The code above disables the sticky property, so we enable it again
	SetSticky(true);
	
	// Restore decorations when needed
	SetBorderDecorations(m_dialogHadBorderDecorations);
	
	// Restore original size
	wxSize proposedSize= DoGetBestSize();
	//SetSize (0, 0, proposedSize.GetWidth(), proposedSize.GetHeight());
	SetSize (proposedSize.GetWidth(), proposedSize.GetHeight());
}
开发者ID:rkvsraman,项目名称:eviacam,代码行数:31,代码来源:wxappbar.cpp

示例4: OldGetMinSize

wxSize wxButton::GetMinSize() const
{
    if( wxMotifLargeButtons() )
        return OldGetMinSize();

    return DoGetBestSize();
}
开发者ID:hgwells,项目名称:tive,代码行数:7,代码来源:button.cpp

示例5: wxCHECK_RET

void wxSpinButton::OnSize( wxSizeEvent &WXUNUSED(event) )
{
    wxCHECK_RET( (m_widget != NULL), wxT("invalid spin button") );

    m_width = DoGetBestSize().x;
    gtk_widget_set_size_request( m_widget, m_width, m_height );
}
开发者ID:krossell,项目名称:wxWidgets,代码行数:7,代码来源:spinbutt.cpp

示例6: CalcLayout

void wxCustomButton::SetMargins(const wxSize &margin, bool fit)
{
    m_labelMargin = margin;
    m_bitmapMargin = margin;
    CalcLayout(TRUE);
    if (fit) SetSize(DoGetBestSize());
}
开发者ID:erelh,项目名称:gpac,代码行数:7,代码来源:menubtn.cpp

示例7: DoGetBestSize

wxSize wxGridCellStringRenderer::GetBestSize(wxGrid& grid,
                                             wxGridCellAttr& attr,
                                             wxDC& dc,
                                             int row, int col)
{
    return DoGetBestSize(attr, dc, grid.GetCellValue(row, col));
}
开发者ID:3v1n0,项目名称:wxWidgets,代码行数:7,代码来源:gridctrl.cpp

示例8: WXUNUSED

void wxComboBox::DoSetSize(int x, int y,
                           int width, int WXUNUSED(height),
                           int sizeFlags)
{
    // Necessary so it doesn't call wxChoice::SetSize
    wxWindow::DoSetSize(x, y, width, DoGetBestSize().y, sizeFlags);
}
开发者ID:EdgarTx,项目名称:wx,代码行数:7,代码来源:combobox.cpp

示例9: SetBackgroundColour

bool wxMenuButton::Create( wxWindow* parent, wxWindowID id,
                           const wxString &label,
                           const wxBitmap &bitmap,
                           const wxPoint& pos,
                           const wxSize& size,
                           long style,
                           const wxValidator& val,
                           const wxString& name)
{
    m_style = style;

    long flat = style & wxMENUBUT_FLAT;

    wxControl::Create(parent,id,pos,size,wxNO_BORDER|wxCLIP_CHILDREN,val,name);
    wxControl::SetLabel(label);
    SetBackgroundColour(parent->GetBackgroundColour());
    SetForegroundColour(parent->GetForegroundColour());
    SetFont(parent->GetFont());

    m_labelButton = new MenuLabelButton(this, id, label, bitmap, wxCUSTBUT_BUTTON|flat);
    m_dropdownButton = new MenuDropButton(this, IDD_DROPDOWN_BUTTON, wxCUSTBUT_BUTTON|flat);

    wxSize bestSize = DoGetBestSize();
    SetSize( wxSize(size.x < 0 ? bestSize.x : size.x,
                    size.y < 0 ? bestSize.y : size.y) );

#if (wxMINOR_VERSION<8)
    SetBestSize(GetSize());
#else
    SetInitialSize(GetSize());
#endif

    return TRUE;
}
开发者ID:erelh,项目名称:gpac,代码行数:34,代码来源:menubtn.cpp

示例10: DoGetBestSize

bool wxCustomButton::Create(wxWindow* parent, wxWindowID id,
                            const wxString& label, const wxBitmap &bitmap,
                            const wxPoint& pos, const wxSize& size,
                            long style, const wxValidator& val,
                            const wxString& name)
{
    if (!wxControl::Create(parent,id,pos,size,wxNO_BORDER|wxCLIP_CHILDREN,val,name))
        return FALSE;

    wxControl::SetLabel(label);
    wxControl::SetBackgroundColour(parent->GetBackgroundColour());
    wxControl::SetForegroundColour(parent->GetForegroundColour());
    wxControl::SetFont(parent->GetFont());

    if (bitmap.Ok()) m_bmpLabel = bitmap;

    if (!SetButtonStyle(style)) return FALSE;

    wxSize bestSize = DoGetBestSize();
    SetSize(wxSize(size.x<0 ? bestSize.x:size.x, size.y<0 ? bestSize.y:size.y));
#if (wxMINOR_VERSION<8)
    SetBestSize(GetSize());
#else
    SetInitialSize(GetSize());
#endif

    CalcLayout(TRUE);
    return TRUE;
}
开发者ID:erelh,项目名称:gpac,代码行数:29,代码来源:menubtn.cpp

示例11: DoGetBestSize

void WXAppBar::SetDockedModeStep1()
{
	// TODO: manage different docking locations on windows
	APPBARDATA abd;		

	// Set metrics (TOP location only)
	wxSize proposedSize= DoGetBestSize();
	m_X= 0;
	m_Y= 0;
	m_Width= GetSystemMetrics(SM_CXSCREEN);
	m_Height= proposedSize.GetHeight();	

	// Register appbar
	abd.cbSize= sizeof(APPBARDATA);
	abd.hWnd= (HWND) GetHandle();
	abd.uCallbackMessage= 12345; //WX_APPBAR_CALLBACK; // TODO: respond to these callback messages
	SHAppBarMessage (ABM_NEW, &abd);

	// Set size
	abd.uEdge= ABE_TOP;
	abd.rc.left = m_X;
	abd.rc.top = m_Y;
	abd.rc.right = m_X + m_Width;
	abd.rc.bottom = m_Y + m_Height;

	SHAppBarMessage(ABM_QUERYPOS,&abd);	// Correct size if needed

	m_X= abd.rc.left;
	m_Y= abd.rc.top;		
	m_Width= abd.rc.right - m_X;
	// Re-calculate bottom corner
	abd.rc.bottom = m_Y + m_Height;		
	SHAppBarMessage(ABM_SETPOS, &abd);
}
开发者ID:rkvsraman,项目名称:eviacam,代码行数:34,代码来源:wxappbar.cpp

示例12: PrepareBackground

/** Prepares the backgroundimage, to optimze speed */
void wxLEDPanel::PrepareBackground()
{
    wxSize s=DoGetBestSize();
    wxBitmap bmpBG(s.GetWidth(),s.GetHeight());

    m_mdc_background.SelectObject(bmpBG);

    // clear the background
    m_mdc_background.SetBackground(this->GetBackgroundColour());
    m_mdc_background.Clear();

    if(m_invert || m_show_inactivs)
        DrawField(m_mdc_background, true);
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:15,代码来源:wxledpanel.cpp

示例13: DoGetBestSize

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

    wxSize new_size = size,
           sizeBest = DoGetBestSize();
    new_size.x = sizeBest.x;            // override width always
    if (new_size.y == -1)
        new_size.y = sizeBest.y;

    if (!PreCreation( parent, pos, new_size ) ||
        !CreateBase( parent, id, pos, new_size, style, wxDefaultValidator, name ))
    {
        wxFAIL_MSG( wxT("wxXX creation failed") );
        return false;
    }

    m_oldPos = 0.0;

    m_adjust = (GtkAdjustment*) gtk_adjustment_new( 0.0, 0.0, 100.0, 1.0, 5.0, 0.0);

    m_widget = gtk_spin_button_new( m_adjust, 0, 0 );

    gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget),
                              (int)(m_windowStyle & wxSP_WRAP) );

    gtk_signal_connect( GTK_OBJECT (m_adjust),
                        "value_changed",
                        (GtkSignalFunc) gtk_spinbutt_callback,
                        (gpointer) this );

    m_parent->DoAddChild( this );

    PostCreation(new_size);

    return true;
}
开发者ID:EEmmanuel7,项目名称:wxWidgets,代码行数:42,代码来源:spinbutt.cpp

示例14: SetFieldsCount

bool wxStatusBarUniv::Create(wxWindow *parent,
                             wxWindowID id,
                             long style,
                             const wxString& name)
{
    if ( !wxWindow::Create(parent, id,
                           wxDefaultPosition, wxDefaultSize,
                           style, name) )
    {
        return false;
    }

    SetFieldsCount(1);

    CreateInputHandler(wxINP_HANDLER_STATUSBAR);

    SetSize(DoGetBestSize());

    return true;
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:20,代码来源:statusbr.cpp

示例15: switch

void wxRibbonBar::ShowPanels(wxRibbonDisplayMode mode)
{
    switch ( mode )
    {
        case wxRIBBON_BAR_PINNED:
        case wxRIBBON_BAR_EXPANDED:
            m_arePanelsShown = true;
            break;

        case wxRIBBON_BAR_MINIMIZED:
            m_arePanelsShown = false;
            break;
    }

    SetMinSize(wxSize(GetSize().GetWidth(), DoGetBestSize().GetHeight()));
    Realise();
    GetParent()->Layout();

    m_ribbon_state = mode;
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:20,代码来源:bar.cpp


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