summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b6af8d8)
Added wxFrame::SetClientSize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@477
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
virtual void Enable( bool enable );
virtual void GetClientSize( int *width, int *height ) const;
virtual void Enable( bool enable );
virtual void GetClientSize( int *width, int *height ) const;
+ virtual void SetClientSize( int const width, int const height );
// set minimal/maxmimal size for the frame
virtual void SetSizeHints( int minW, int minH, int maxW, int maxH, int incW = -1 );
// set minimal/maxmimal size for the frame
virtual void SetSizeHints( int minW, int minH, int maxW, int maxH, int incW = -1 );
virtual void Enable( bool enable );
virtual void GetClientSize( int *width, int *height ) const;
virtual void Enable( bool enable );
virtual void GetClientSize( int *width, int *height ) const;
+ virtual void SetClientSize( int const width, int const height );
// set minimal/maxmimal size for the frame
virtual void SetSizeHints( int minW, int minH, int maxW, int maxH, int incW = -1 );
// set minimal/maxmimal size for the frame
virtual void SetSizeHints( int minW, int minH, int maxW, int maxH, int incW = -1 );
PreCreation( parent, id, pos, newSize, style, name );
PreCreation( parent, id, pos, newSize, style, name );
m_widget = gtk_button_new_with_label( m_label );
m_widget = gtk_button_new_with_label( m_label );
if (newSize.x == -1) newSize.x = 15+gdk_string_measure( m_widget->style->font, label );
if (newSize.y == -1) newSize.y = 26;
if (newSize.x == -1) newSize.x = 15+gdk_string_measure( m_widget->style->font, label );
if (newSize.y == -1) newSize.y = 26;
void wxButton::SetLabel( const wxString &label )
{
wxControl::SetLabel( label );
void wxButton::SetLabel( const wxString &label )
{
wxControl::SetLabel( label );
- GtkBin *bin = GTK_BIN( m_widget );
+ GtkButton *bin = GTK_BUTTON( m_widget );
GtkLabel *g_label = GTK_LABEL( bin->child );
gtk_label_set( g_label, GetLabel() );
};
GtkLabel *g_label = GTK_LABEL( bin->child );
gtk_label_set( g_label, GetLabel() );
};
void wxControl::SetLabel( const wxString &label )
{
void wxControl::SetLabel( const wxString &label )
{
for ( const char *pc = label; *pc != '\0'; pc++ ) {
if ( *pc == '&' ) {
pc++; // skip it
for ( const char *pc = label; *pc != '\0'; pc++ ) {
if ( *pc == '&' ) {
pc++; // skip it
+void wxFrame::SetClientSize( int const width, int const height )
+{
+ int h = height;
+ if (m_frameMenuBar) h += wxMENU_HEIGHT;
+ if (m_frameStatusBar) h += wxSTATUS_HEIGHT;
+ if (m_frameToolBar)
+ {
+ int y = 0;
+ m_frameToolBar->GetSize( NULL, &y );
+ h += y;
+ }
+ wxWindow::SetClientSize( width, h );
+};
+
void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height )
{
// due to a bug in gtk, x,y are always 0
void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height )
{
// due to a bug in gtk, x,y are always 0
PreCreation( parent, id, pos, newSize, style, name );
PreCreation( parent, id, pos, newSize, style, name );
m_widget = gtk_button_new_with_label( m_label );
m_widget = gtk_button_new_with_label( m_label );
if (newSize.x == -1) newSize.x = 15+gdk_string_measure( m_widget->style->font, label );
if (newSize.y == -1) newSize.y = 26;
if (newSize.x == -1) newSize.x = 15+gdk_string_measure( m_widget->style->font, label );
if (newSize.y == -1) newSize.y = 26;
void wxButton::SetLabel( const wxString &label )
{
wxControl::SetLabel( label );
void wxButton::SetLabel( const wxString &label )
{
wxControl::SetLabel( label );
- GtkBin *bin = GTK_BIN( m_widget );
+ GtkButton *bin = GTK_BUTTON( m_widget );
GtkLabel *g_label = GTK_LABEL( bin->child );
gtk_label_set( g_label, GetLabel() );
};
GtkLabel *g_label = GTK_LABEL( bin->child );
gtk_label_set( g_label, GetLabel() );
};
void wxControl::SetLabel( const wxString &label )
{
void wxControl::SetLabel( const wxString &label )
{
for ( const char *pc = label; *pc != '\0'; pc++ ) {
if ( *pc == '&' ) {
pc++; // skip it
for ( const char *pc = label; *pc != '\0'; pc++ ) {
if ( *pc == '&' ) {
pc++; // skip it
+void wxFrame::SetClientSize( int const width, int const height )
+{
+ int h = height;
+ if (m_frameMenuBar) h += wxMENU_HEIGHT;
+ if (m_frameStatusBar) h += wxSTATUS_HEIGHT;
+ if (m_frameToolBar)
+ {
+ int y = 0;
+ m_frameToolBar->GetSize( NULL, &y );
+ h += y;
+ }
+ wxWindow::SetClientSize( width, h );
+};
+
void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height )
{
// due to a bug in gtk, x,y are always 0
void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height )
{
// due to a bug in gtk, x,y are always 0