#include "wx/dcclient.h"
#include "wx/gtk/win_gtk.h"
-const wxMENU_HEIGHT = 28;
-const wxSTATUS_HEIGHT = 25;
+const int wxMENU_HEIGHT = 28;
+const int wxSTATUS_HEIGHT = 25;
extern wxList wxTopLevelWindows;
extern wxList wxPendingDelete;
wxFrame::wxFrame()
{
- m_frameMenuBar = NULL;
- m_frameStatusBar = NULL;
- m_frameToolBar = NULL;
+ m_frameMenuBar = (wxMenuBar *) NULL;
+ m_frameStatusBar = (wxStatusBar *) NULL;
+ m_frameToolBar = (wxToolBar *) NULL;
m_sizeSet = FALSE;
m_addPrivateChild = FALSE;
- m_wxwindow = NULL;
- m_mainWindow = NULL;
+ m_wxwindow = (GtkWidget *) NULL;
+ m_mainWindow = (GtkWidget *) NULL;
wxTopLevelWindows.Insert( this );
}
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
- m_frameMenuBar = NULL;
- m_frameStatusBar = NULL;
- m_frameToolBar = NULL;
+ m_frameMenuBar = (wxMenuBar *) NULL;
+ m_frameStatusBar = (wxStatusBar *) NULL;
+ m_frameToolBar = (wxToolBar *) NULL;
m_sizeSet = FALSE;
m_addPrivateChild = FALSE;
- m_wxwindow = NULL;
- m_mainWindow = NULL;
+ m_wxwindow = (GtkWidget *) NULL;
+ m_mainWindow = (GtkWidget *) NULL;
Create( parent, id, title, pos, size, style, name );
wxTopLevelWindows.Insert( this );
}
if (m_frameToolBar)
{
int y = 0;
- m_frameToolBar->GetSize( NULL, &y );
+ m_frameToolBar->GetSize( (int *) NULL, &y );
(*height) -= y;
}
}
if (m_frameToolBar)
{
int y = 0;
- m_frameToolBar->GetSize( NULL, &y );
+ m_frameToolBar->GetSize( (int *) NULL, &y );
h += y;
}
wxWindow::SetClientSize( width, h );
m_width = width;
m_height = height;
- gtk_widget_set_usize( m_widget, width, height );
+ // VZ: why??
+ //gtk_widget_set_usize( m_widget, width, height );
int main_x = 0;
int main_y = 0;
}
int toolbar_height = 0;
- if (m_frameToolBar) m_frameToolBar->GetSize( NULL, &toolbar_height );
+ if (m_frameToolBar) m_frameToolBar->GetSize( (int *) NULL, &toolbar_height );
main_y += toolbar_height;
main_height -= toolbar_height;
return;
// do we have exactly one child?
- wxWindow *child = NULL;
+ wxWindow *child = (wxWindow *) NULL;
for(wxNode *node = GetChildren()->First(); node; node = node->Next())
{
wxWindow *win = (wxWindow *)node->Data();
wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id, const wxString& name )
{
- wxStatusBar *statusBar = NULL;
+ wxStatusBar *statusBar = (wxStatusBar *) NULL;
statusBar = new wxStatusBar(this, id, wxPoint(0, 0), wxSize(100, 20), style, name);
gtk_window_set_title( GTK_WINDOW(m_widget), title );
}
-void wxFrame::SetSizeHints(int minW, int minH, int maxW, int maxH, int WXUNUSED(incW) )
+void wxFrame::SetSizeHints(int minW, int minH,
+ int WXUNUSED(maxW), int WXUNUSED(maxH),
+ int WXUNUSED(incW) )
{
+ // gdk_window_set_hints alone doesn't really prevent the user from shrinking
+ // the window to the size smaller than (minW, minH)
+ gtk_widget_set_usize( GTK_WIDGET(m_widget), minW, minH );
+
+ /*
gdk_window_set_hints( m_widget->window, -1, -1,
- minW, minH, maxW, maxH, GDK_HINT_MIN_SIZE | GDK_HINT_MIN_SIZE );
+ minW, minH, maxW, maxH,
+ GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE );
+ */
}
void wxFrame::SetIcon( const wxIcon &icon )
if (!icon.Ok()) return;
wxMask *mask = icon.GetMask();
- GdkBitmap *bm = NULL;
+ GdkBitmap *bm = (GdkBitmap *) NULL;
if (mask) bm = mask->GetBitmap();
- gdk_window_set_icon( m_widget->window, NULL, icon.GetPixmap(), bm );
+ gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
}