Small distrib updates,
tried to find a bug in html which was somewhere else, added wxYield() call to wxBeginBusyCursor() which should make the cursor appear immediately, corrected wxMiniFrame so that clicking on the titlebar makes it come to the front Used CreateBase() in all controls git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,6 +27,15 @@ make install
|
|||||||
ldconfig
|
ldconfig
|
||||||
exit
|
exit
|
||||||
|
|
||||||
|
You may also want to try to edit the wrongly created libtool script
|
||||||
|
in your build directory, if you need shared libraries on Unix. The
|
||||||
|
wrong entries are something like
|
||||||
|
archive_cmds="\$LD -shared ....
|
||||||
|
archive_expsym_cmds="\$LD -shared ....
|
||||||
|
which should be something like
|
||||||
|
archive_cmds="\$CC -shared ....
|
||||||
|
archive_expsym_cmds="\$CC -shared ....
|
||||||
|
|
||||||
If you want to remove wxWindows on Unix you can do this:
|
If you want to remove wxWindows on Unix you can do this:
|
||||||
|
|
||||||
su <type root password>
|
su <type root password>
|
||||||
|
@@ -26,7 +26,8 @@ at Julian Smart's homepage at:
|
|||||||
|
|
||||||
Information on how to install can be found in the file
|
Information on how to install can be found in the file
|
||||||
INSTALL.txt, but if you cannot wait, this should work on
|
INSTALL.txt, but if you cannot wait, this should work on
|
||||||
many systems (when using GTK 1.0 read the INSTALL.txt):
|
many systems (when using GTK 1.0 or when not using Linux
|
||||||
|
read the INSTALL.txt):
|
||||||
|
|
||||||
./configure
|
./configure
|
||||||
make
|
make
|
||||||
|
@@ -16,6 +16,26 @@ make install
|
|||||||
ldconfig
|
ldconfig
|
||||||
exit
|
exit
|
||||||
|
|
||||||
|
On all other Unices (maybe except *BSD), shared libraries are not supported
|
||||||
|
out of the box due to the utter stupidity of libtool, so you'll have to do
|
||||||
|
this instead:
|
||||||
|
|
||||||
|
./configure --enable-static --disable-shared
|
||||||
|
make
|
||||||
|
su <type root password>
|
||||||
|
make install
|
||||||
|
ldconfig
|
||||||
|
exit
|
||||||
|
|
||||||
|
You may also want to try to edit the wrongly created libtool script
|
||||||
|
in your build directory, if you need shared libraries on Unix. The
|
||||||
|
wrong entries are something like
|
||||||
|
archive_cmds="\$LD -shared ....
|
||||||
|
archive_expsym_cmds="\$LD -shared ....
|
||||||
|
which should be something like
|
||||||
|
archive_cmds="\$CC -shared ....
|
||||||
|
archive_expsym_cmds="\$CC -shared ....
|
||||||
|
|
||||||
If you want to remove wxWindows on Unix you can do this:
|
If you want to remove wxWindows on Unix you can do this:
|
||||||
|
|
||||||
su <type root password>
|
su <type root password>
|
||||||
|
@@ -120,9 +120,8 @@ public:
|
|||||||
/* For compatibility across platforms (not in event table) */
|
/* For compatibility across platforms (not in event table) */
|
||||||
void OnIdle(wxIdleEvent& WXUNUSED(event)) {};
|
void OnIdle(wxIdleEvent& WXUNUSED(event)) {};
|
||||||
|
|
||||||
/* used by all classes in the widget creation process */
|
/* used by all window classes in the widget creation process */
|
||||||
void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos,
|
bool PreCreation( wxWindow *parent, const wxPoint &pos, const wxSize &size );
|
||||||
const wxSize &size, long style, const wxString &name );
|
|
||||||
void PostCreation();
|
void PostCreation();
|
||||||
|
|
||||||
/* internal addition of child windows. differs from class
|
/* internal addition of child windows. differs from class
|
||||||
|
@@ -120,9 +120,8 @@ public:
|
|||||||
/* For compatibility across platforms (not in event table) */
|
/* For compatibility across platforms (not in event table) */
|
||||||
void OnIdle(wxIdleEvent& WXUNUSED(event)) {};
|
void OnIdle(wxIdleEvent& WXUNUSED(event)) {};
|
||||||
|
|
||||||
/* used by all classes in the widget creation process */
|
/* used by all window classes in the widget creation process */
|
||||||
void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos,
|
bool PreCreation( wxWindow *parent, const wxPoint &pos, const wxSize &size );
|
||||||
const wxSize &size, long style, const wxString &name );
|
|
||||||
void PostCreation();
|
void PostCreation();
|
||||||
|
|
||||||
/* internal addition of child windows. differs from class
|
/* internal addition of child windows. differs from class
|
||||||
|
@@ -12,16 +12,16 @@
|
|||||||
#define __HTMLCELL_H__
|
#define __HTMLCELL_H__
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma interface
|
#pragma interface "htmlcell.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
#if wxUSE_HTML
|
#if wxUSE_HTML
|
||||||
|
|
||||||
|
#include "wx/html/htmltag.h"
|
||||||
#include <wx/html/htmltag.h>
|
#include "wx/html/htmldefs.h"
|
||||||
#include <wx/html/htmldefs.h>
|
#include "wx/window.h"
|
||||||
#include <wx/window.h>
|
|
||||||
|
|
||||||
class wxHtmlCell;
|
class wxHtmlCell;
|
||||||
class wxHtmlContainerCell;
|
class wxHtmlContainerCell;
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
#define __HTMLDEFS_H__
|
#define __HTMLDEFS_H__
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
#if wxUSE_HTML
|
|
||||||
|
|
||||||
|
#if wxUSE_HTML
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
// ALIGNMENTS
|
// ALIGNMENTS
|
||||||
|
@@ -11,13 +11,14 @@
|
|||||||
#define __HTMLFILTER_H__
|
#define __HTMLFILTER_H__
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma interface
|
#pragma interface "htmlfilter.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
#if wxUSE_HTML
|
#if wxUSE_HTML
|
||||||
|
|
||||||
#include <wx/filesys.h>
|
#include "wx/filesys.h"
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
|
@@ -11,18 +11,19 @@
|
|||||||
#define __HTMLHELP_H__
|
#define __HTMLHELP_H__
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma interface
|
#pragma interface "htmlhelp.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
#if wxUSE_HTML
|
#if wxUSE_HTML
|
||||||
|
|
||||||
#include <wx/window.h>
|
#include "wx/window.h"
|
||||||
#include <wx/config.h>
|
#include "wx/config.h"
|
||||||
#include <wx/splitter.h>
|
#include "wx/splitter.h"
|
||||||
#include <wx/notebook.h>
|
#include "wx/notebook.h"
|
||||||
#include <wx/listctrl.h>
|
#include "wx/listctrl.h"
|
||||||
#include <wx/html/htmlwin.h>
|
#include "wx/html/htmlwin.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -118,13 +118,12 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
wxSize newSize = size;
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
PreCreation( parent, id, pos, newSize, style, name );
|
{
|
||||||
|
wxFAIL_MSG( _T("wxBitmapButton creation failed") );
|
||||||
#if wxUSE_VALIDATORS
|
return FALSE;
|
||||||
SetValidator( validator );
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
m_bitmap = bitmap;
|
m_bitmap = bitmap;
|
||||||
m_disabled = bitmap;
|
m_disabled = bitmap;
|
||||||
@@ -142,6 +141,8 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
|
|||||||
|
|
||||||
if (m_bitmap.Ok())
|
if (m_bitmap.Ok())
|
||||||
{
|
{
|
||||||
|
wxSize newSize = size;
|
||||||
|
|
||||||
GdkBitmap *mask = (GdkBitmap *) NULL;
|
GdkBitmap *mask = (GdkBitmap *) NULL;
|
||||||
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
|
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
|
||||||
GtkWidget *pixmap = gtk_pixmap_new( m_bitmap.GetPixmap(), mask );
|
GtkWidget *pixmap = gtk_pixmap_new( m_bitmap.GetPixmap(), mask );
|
||||||
|
@@ -75,13 +75,13 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
wxSize newSize = size;
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxButton creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
PreCreation( parent, id, pos, newSize, style, name );
|
|
||||||
|
|
||||||
#if wxUSE_VALIDATORS
|
|
||||||
SetValidator( validator );
|
|
||||||
#endif // wxUSE_VALIDATORS
|
|
||||||
|
|
||||||
m_widget = gtk_button_new_with_label( "" );
|
m_widget = gtk_button_new_with_label( "" );
|
||||||
|
|
||||||
@@ -92,6 +92,7 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
|||||||
|
|
||||||
SetLabel(label);
|
SetLabel(label);
|
||||||
|
|
||||||
|
wxSize newSize = size;
|
||||||
if (newSize.x == -1) newSize.x = 15+gdk_string_measure( m_widget->style->font, label.mbc_str() );
|
if (newSize.x == -1) newSize.x = 15+gdk_string_measure( m_widget->style->font, label.mbc_str() );
|
||||||
if (newSize.y == -1) newSize.y = 26;
|
if (newSize.y == -1) newSize.y = 26;
|
||||||
SetSize( newSize.x, newSize.y );
|
SetSize( newSize.x, newSize.y );
|
||||||
|
@@ -72,11 +72,12 @@ bool wxCheckBox::Create(wxWindow *parent,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxCheckBox creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
wxControl::SetLabel( label );
|
wxControl::SetLabel( label );
|
||||||
|
|
||||||
|
@@ -38,7 +38,8 @@ extern bool g_blockEventsOnDrag;
|
|||||||
|
|
||||||
static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice *choice )
|
static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice *choice )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
if (!choice->m_hasVMT) return;
|
if (!choice->m_hasVMT) return;
|
||||||
|
|
||||||
@@ -71,11 +72,12 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
|
|||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxChoice creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_widget = gtk_option_menu_new();
|
m_widget = gtk_option_menu_new();
|
||||||
|
|
||||||
|
@@ -101,11 +101,12 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxComboBox creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_widget = gtk_combo_new();
|
m_widget = gtk_combo_new();
|
||||||
|
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/cursor.h"
|
#include "wx/cursor.h"
|
||||||
|
#include "wx/utils.h"
|
||||||
|
|
||||||
#include "gdk/gdk.h"
|
#include "gdk/gdk.h"
|
||||||
|
|
||||||
@@ -170,6 +171,8 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
|
|||||||
gs_savedCursor = g_globalCursor;
|
gs_savedCursor = g_globalCursor;
|
||||||
|
|
||||||
wxSetCursor( wxCursor(wxCURSOR_WATCH) );
|
wxSetCursor( wxCursor(wxCURSOR_WATCH) );
|
||||||
|
|
||||||
|
wxYield();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxIsBusy()
|
bool wxIsBusy()
|
||||||
|
@@ -248,7 +248,12 @@ bool wxDialog::Create( wxWindow *parent,
|
|||||||
|
|
||||||
m_needParent = FALSE;
|
m_needParent = FALSE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxDialog creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_insertCallback = (wxInsertChildFunction) wxInsertChildInDialog;
|
m_insertCallback = (wxInsertChildFunction) wxInsertChildInDialog;
|
||||||
|
|
||||||
|
@@ -116,7 +116,13 @@ wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message,
|
|||||||
{
|
{
|
||||||
m_needParent = FALSE;
|
m_needParent = FALSE;
|
||||||
|
|
||||||
PreCreation( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, "filedialog" );
|
if (!PreCreation( parent, pos, wxDefaultSize ) ||
|
||||||
|
!CreateBase( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, wxDefaultValidator, _T("filedialog") ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_message = message;
|
m_message = message;
|
||||||
m_path = _T("");
|
m_path = _T("");
|
||||||
m_fileName = defaultFileName;
|
m_fileName = defaultFileName;
|
||||||
|
@@ -224,7 +224,6 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
|||||||
decor |= GDK_DECOR_RESIZEH;
|
decor |= GDK_DECOR_RESIZEH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)decor);
|
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)decor);
|
||||||
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)func);
|
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)func);
|
||||||
|
|
||||||
@@ -361,7 +360,12 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
|||||||
|
|
||||||
m_needParent = FALSE;
|
m_needParent = FALSE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxFrame creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_title = title;
|
m_title = title;
|
||||||
|
|
||||||
|
@@ -30,11 +30,12 @@ bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range,
|
|||||||
{
|
{
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxGauge creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_rangeMax = range;
|
m_rangeMax = range;
|
||||||
m_gaugePos = 0;
|
m_gaugePos = 0;
|
||||||
@@ -67,12 +68,12 @@ void wxGauge::SetValue( int pos )
|
|||||||
gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), ((float)m_gaugePos)/m_rangeMax );
|
gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), ((float)m_gaugePos)/m_rangeMax );
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGauge::GetRange(void) const
|
int wxGauge::GetRange() const
|
||||||
{
|
{
|
||||||
return m_rangeMax;
|
return m_rangeMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGauge::GetValue(void) const
|
int wxGauge::GetValue() const
|
||||||
{
|
{
|
||||||
return m_gaugePos;
|
return m_gaugePos;
|
||||||
}
|
}
|
||||||
|
@@ -244,11 +244,12 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxListBox creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_widget = gtk_scrolled_window_new( (GtkAdjustment*) NULL, (GtkAdjustment*) NULL );
|
m_widget = gtk_scrolled_window_new( (GtkAdjustment*) NULL, (GtkAdjustment*) NULL );
|
||||||
if (style & wxLB_ALWAYS_SB)
|
if (style & wxLB_ALWAYS_SB)
|
||||||
|
@@ -409,7 +409,12 @@ bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
|
|||||||
|
|
||||||
m_insertCallback = (wxInsertChildFunction)wxInsertChildInMDI;
|
m_insertCallback = (wxInsertChildFunction)wxInsertChildInMDI;
|
||||||
|
|
||||||
PreCreation( parent, -1, wxPoint(10,10), wxSize(100,100), style, "wxMDIClientWindow" );
|
if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
|
||||||
|
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, _T("wxMDIClientWindow") ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxMDIClientWindow creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_widget = gtk_notebook_new();
|
m_widget = gtk_notebook_new();
|
||||||
|
|
||||||
|
@@ -39,7 +39,12 @@ wxMenuBar::wxMenuBar( long style )
|
|||||||
m_needParent = FALSE;
|
m_needParent = FALSE;
|
||||||
m_style = style;
|
m_style = style;
|
||||||
|
|
||||||
PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, style, "menu" );
|
if (!PreCreation( (wxWindow*) NULL, wxDefaultPosition, wxDefaultSize ) ||
|
||||||
|
!CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, _T("menubar") ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxMenuBar creation failed") );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_menus.DeleteContents( TRUE );
|
m_menus.DeleteContents( TRUE );
|
||||||
|
|
||||||
@@ -72,7 +77,12 @@ wxMenuBar::wxMenuBar()
|
|||||||
m_needParent = FALSE;
|
m_needParent = FALSE;
|
||||||
m_style = 0;
|
m_style = 0;
|
||||||
|
|
||||||
PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" );
|
if (!PreCreation( (wxWindow*) NULL, wxDefaultPosition, wxDefaultSize ) ||
|
||||||
|
!CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("menubar") ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxMenuBar creation failed") );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_menus.DeleteContents( TRUE );
|
m_menus.DeleteContents( TRUE );
|
||||||
|
|
||||||
|
@@ -163,6 +163,8 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
|
|||||||
|
|
||||||
if (win->m_isDragging) return TRUE;
|
if (win->m_isDragging) return TRUE;
|
||||||
|
|
||||||
|
gdk_window_raise( win->m_widget->window );
|
||||||
|
|
||||||
gdk_pointer_grab( widget->window, FALSE,
|
gdk_pointer_grab( widget->window, FALSE,
|
||||||
(GdkEventMask)
|
(GdkEventMask)
|
||||||
(GDK_BUTTON_PRESS_MASK |
|
(GDK_BUTTON_PRESS_MASK |
|
||||||
|
@@ -220,7 +220,13 @@ bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
m_insertCallback = (wxInsertChildFunction)wxInsertChildInNotebook;
|
m_insertCallback = (wxInsertChildFunction)wxInsertChildInNotebook;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxNoteBook creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
m_widget = gtk_notebook_new();
|
m_widget = gtk_notebook_new();
|
||||||
|
|
||||||
|
@@ -85,11 +85,12 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxRadioBox creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_widget = gtk_frame_new( title.mbc_str() );
|
m_widget = gtk_frame_new( title.mbc_str() );
|
||||||
|
|
||||||
|
@@ -63,17 +63,14 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab
|
|||||||
{
|
{
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
wxSize newSize = size;
|
|
||||||
|
|
||||||
PreCreation( parent, id, pos, newSize, style, name );
|
|
||||||
|
|
||||||
m_isRadioButton = TRUE;
|
m_isRadioButton = TRUE;
|
||||||
|
|
||||||
#if wxUSE_VALIDATORS
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
SetValidator( validator );
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#endif
|
{
|
||||||
|
wxFAIL_MSG( _T("wxRadioButton creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (HasFlag(wxRB_GROUP))
|
if (HasFlag(wxRB_GROUP))
|
||||||
{
|
{
|
||||||
@@ -111,6 +108,7 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab
|
|||||||
|
|
||||||
SetLabel(label);
|
SetLabel(label);
|
||||||
|
|
||||||
|
wxSize newSize = size;
|
||||||
if (newSize.x == -1) newSize.x = 22+gdk_string_measure( m_widget->style->font, label.mbc_str() );
|
if (newSize.x == -1) newSize.x = 22+gdk_string_measure( m_widget->style->font, label.mbc_str() );
|
||||||
if (newSize.y == -1) newSize.y = 26;
|
if (newSize.y == -1) newSize.y = 26;
|
||||||
SetSize( newSize.x, newSize.y );
|
SetSize( newSize.x, newSize.y );
|
||||||
|
@@ -137,11 +137,12 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxScrollBar creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_oldPos = 0.0;
|
m_oldPos = 0.0;
|
||||||
|
|
||||||
|
@@ -98,11 +98,12 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxSlider creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_oldPos = 0.0;
|
m_oldPos = 0.0;
|
||||||
|
|
||||||
|
@@ -98,9 +98,12 @@ bool wxSpinButton::Create(wxWindow *parent,
|
|||||||
if (new_size.y == -1)
|
if (new_size.y == -1)
|
||||||
new_size.y = 30;
|
new_size.y = 30;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, new_size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, new_size, style, wxDefaultValidator, name ))
|
||||||
// SetValidator( validator );
|
{
|
||||||
|
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_oldPos = 0.0;
|
m_oldPos = 0.0;
|
||||||
|
|
||||||
|
@@ -58,14 +58,19 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
|
|||||||
{
|
{
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
wxSize newSize = size;
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
{
|
||||||
|
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_bitmap = bitmap;
|
m_bitmap = bitmap;
|
||||||
|
|
||||||
if (m_bitmap.Ok())
|
if (m_bitmap.Ok())
|
||||||
{
|
{
|
||||||
|
wxSize newSize = size;
|
||||||
|
|
||||||
GdkBitmap *mask = (GdkBitmap *) NULL;
|
GdkBitmap *mask = (GdkBitmap *) NULL;
|
||||||
if ( m_bitmap.GetMask() )
|
if ( m_bitmap.GetMask() )
|
||||||
mask = m_bitmap.GetMask()->GetBitmap();
|
mask = m_bitmap.GetMask()->GetBitmap();
|
||||||
|
@@ -41,7 +41,12 @@ bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label
|
|||||||
{
|
{
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxStaticBox creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_isStaticBox = TRUE;
|
m_isStaticBox = TRUE;
|
||||||
|
|
||||||
|
@@ -41,7 +41,12 @@ bool wxStaticLine::Create( wxWindow *parent, wxWindowID id,
|
|||||||
{
|
{
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxStaticLine creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if ( IsVertical() )
|
if ( IsVertical() )
|
||||||
m_widget = gtk_vseparator_new();
|
m_widget = gtk_vseparator_new();
|
||||||
|
@@ -48,9 +48,12 @@ bool wxStaticText::Create(wxWindow *parent,
|
|||||||
{
|
{
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
wxSize newSize = size;
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
{
|
||||||
|
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
// notice that we call the base class version which will just remove the
|
// notice that we call the base class version which will just remove the
|
||||||
// '&' characters from the string, but not set the label's text to it
|
// '&' characters from the string, but not set the label's text to it
|
||||||
@@ -77,9 +80,9 @@ bool wxStaticText::Create(wxWindow *parent,
|
|||||||
GtkRequisition req;
|
GtkRequisition req;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(m_widget)->klass )->size_request ) (m_widget, &req );
|
(* GTK_WIDGET_CLASS( GTK_OBJECT(m_widget)->klass )->size_request ) (m_widget, &req );
|
||||||
|
|
||||||
|
wxSize newSize = size;
|
||||||
if (newSize.x == -1) newSize.x = req.width;
|
if (newSize.x == -1) newSize.x = req.width;
|
||||||
if (newSize.y == -1) newSize.y = req.height;
|
if (newSize.y == -1) newSize.y = req.height;
|
||||||
|
|
||||||
SetSize( newSize.x, newSize.y );
|
SetSize( newSize.x, newSize.y );
|
||||||
|
|
||||||
m_parent->DoAddChild( this );
|
m_parent->DoAddChild( this );
|
||||||
|
@@ -147,7 +147,12 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id,
|
|||||||
{
|
{
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxToolBar creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_tools.DeleteContents( TRUE );
|
m_tools.DeleteContents( TRUE );
|
||||||
|
|
||||||
|
@@ -114,11 +114,13 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxTextCtrl creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
#if wxUSE_VALIDATORS
|
|
||||||
SetValidator( validator );
|
|
||||||
#endif // wxUSE_VALIDATORS
|
|
||||||
|
|
||||||
m_vScrollbarVisible = FALSE;
|
m_vScrollbarVisible = FALSE;
|
||||||
|
|
||||||
|
@@ -1821,7 +1821,12 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
|
|||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
long style, const wxString &name )
|
long style, const wxString &name )
|
||||||
{
|
{
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxWindow creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_insertCallback = wxInsertChildInWindow;
|
m_insertCallback = wxInsertChildInWindow;
|
||||||
|
|
||||||
@@ -2002,27 +2007,22 @@ wxWindow::~wxWindow()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::PreCreation( wxWindow *parent,
|
bool wxWindow::PreCreation( wxWindow *parent, const wxPoint &pos, const wxSize &size )
|
||||||
wxWindowID id,
|
|
||||||
const wxPoint &pos,
|
|
||||||
const wxSize &size,
|
|
||||||
long style,
|
|
||||||
const wxString &name )
|
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( !m_needParent || parent, _T("Need complete parent.") );
|
wxCHECK_MSG( !m_needParent || parent, FALSE, _T("Need complete parent.") );
|
||||||
|
|
||||||
if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
|
|
||||||
{
|
|
||||||
wxFAIL_MSG(_T("window creation failed"));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/* this turns -1 into 20 so that a minimal window is
|
||||||
|
visible even although -1,-1 has been given as the
|
||||||
|
size of the window. the same trick is used in other
|
||||||
|
ports and should make debugging easier */
|
||||||
m_width = WidthDefault(size.x);
|
m_width = WidthDefault(size.x);
|
||||||
m_height = HeightDefault(size.y);
|
m_height = HeightDefault(size.y);
|
||||||
|
|
||||||
m_x = (int)pos.x;
|
m_x = (int)pos.x;
|
||||||
m_y = (int)pos.y;
|
m_y = (int)pos.y;
|
||||||
|
|
||||||
if (!parent) /* some reasonable defaults */
|
/* some reasonable defaults */
|
||||||
|
if (!parent)
|
||||||
{
|
{
|
||||||
if (m_x == -1)
|
if (m_x == -1)
|
||||||
{
|
{
|
||||||
@@ -2035,6 +2035,8 @@ void wxWindow::PreCreation( wxWindow *parent,
|
|||||||
if (m_y < 10) m_y = 10;
|
if (m_y < 10) m_y = 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::PostCreation()
|
void wxWindow::PostCreation()
|
||||||
|
@@ -118,13 +118,12 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
wxSize newSize = size;
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
PreCreation( parent, id, pos, newSize, style, name );
|
{
|
||||||
|
wxFAIL_MSG( _T("wxBitmapButton creation failed") );
|
||||||
#if wxUSE_VALIDATORS
|
return FALSE;
|
||||||
SetValidator( validator );
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
m_bitmap = bitmap;
|
m_bitmap = bitmap;
|
||||||
m_disabled = bitmap;
|
m_disabled = bitmap;
|
||||||
@@ -142,6 +141,8 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
|
|||||||
|
|
||||||
if (m_bitmap.Ok())
|
if (m_bitmap.Ok())
|
||||||
{
|
{
|
||||||
|
wxSize newSize = size;
|
||||||
|
|
||||||
GdkBitmap *mask = (GdkBitmap *) NULL;
|
GdkBitmap *mask = (GdkBitmap *) NULL;
|
||||||
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
|
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
|
||||||
GtkWidget *pixmap = gtk_pixmap_new( m_bitmap.GetPixmap(), mask );
|
GtkWidget *pixmap = gtk_pixmap_new( m_bitmap.GetPixmap(), mask );
|
||||||
|
@@ -75,13 +75,13 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
wxSize newSize = size;
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxButton creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
PreCreation( parent, id, pos, newSize, style, name );
|
|
||||||
|
|
||||||
#if wxUSE_VALIDATORS
|
|
||||||
SetValidator( validator );
|
|
||||||
#endif // wxUSE_VALIDATORS
|
|
||||||
|
|
||||||
m_widget = gtk_button_new_with_label( "" );
|
m_widget = gtk_button_new_with_label( "" );
|
||||||
|
|
||||||
@@ -92,6 +92,7 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
|||||||
|
|
||||||
SetLabel(label);
|
SetLabel(label);
|
||||||
|
|
||||||
|
wxSize newSize = size;
|
||||||
if (newSize.x == -1) newSize.x = 15+gdk_string_measure( m_widget->style->font, label.mbc_str() );
|
if (newSize.x == -1) newSize.x = 15+gdk_string_measure( m_widget->style->font, label.mbc_str() );
|
||||||
if (newSize.y == -1) newSize.y = 26;
|
if (newSize.y == -1) newSize.y = 26;
|
||||||
SetSize( newSize.x, newSize.y );
|
SetSize( newSize.x, newSize.y );
|
||||||
|
@@ -72,11 +72,12 @@ bool wxCheckBox::Create(wxWindow *parent,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxCheckBox creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
wxControl::SetLabel( label );
|
wxControl::SetLabel( label );
|
||||||
|
|
||||||
|
@@ -38,7 +38,8 @@ extern bool g_blockEventsOnDrag;
|
|||||||
|
|
||||||
static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice *choice )
|
static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice *choice )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
if (!choice->m_hasVMT) return;
|
if (!choice->m_hasVMT) return;
|
||||||
|
|
||||||
@@ -71,11 +72,12 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
|
|||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxChoice creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_widget = gtk_option_menu_new();
|
m_widget = gtk_option_menu_new();
|
||||||
|
|
||||||
|
@@ -101,11 +101,12 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxComboBox creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_widget = gtk_combo_new();
|
m_widget = gtk_combo_new();
|
||||||
|
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/cursor.h"
|
#include "wx/cursor.h"
|
||||||
|
#include "wx/utils.h"
|
||||||
|
|
||||||
#include "gdk/gdk.h"
|
#include "gdk/gdk.h"
|
||||||
|
|
||||||
@@ -170,6 +171,8 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
|
|||||||
gs_savedCursor = g_globalCursor;
|
gs_savedCursor = g_globalCursor;
|
||||||
|
|
||||||
wxSetCursor( wxCursor(wxCURSOR_WATCH) );
|
wxSetCursor( wxCursor(wxCURSOR_WATCH) );
|
||||||
|
|
||||||
|
wxYield();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxIsBusy()
|
bool wxIsBusy()
|
||||||
|
@@ -248,7 +248,12 @@ bool wxDialog::Create( wxWindow *parent,
|
|||||||
|
|
||||||
m_needParent = FALSE;
|
m_needParent = FALSE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxDialog creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_insertCallback = (wxInsertChildFunction) wxInsertChildInDialog;
|
m_insertCallback = (wxInsertChildFunction) wxInsertChildInDialog;
|
||||||
|
|
||||||
|
@@ -116,7 +116,13 @@ wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message,
|
|||||||
{
|
{
|
||||||
m_needParent = FALSE;
|
m_needParent = FALSE;
|
||||||
|
|
||||||
PreCreation( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, "filedialog" );
|
if (!PreCreation( parent, pos, wxDefaultSize ) ||
|
||||||
|
!CreateBase( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, wxDefaultValidator, _T("filedialog") ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_message = message;
|
m_message = message;
|
||||||
m_path = _T("");
|
m_path = _T("");
|
||||||
m_fileName = defaultFileName;
|
m_fileName = defaultFileName;
|
||||||
|
@@ -224,7 +224,6 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
|||||||
decor |= GDK_DECOR_RESIZEH;
|
decor |= GDK_DECOR_RESIZEH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)decor);
|
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)decor);
|
||||||
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)func);
|
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)func);
|
||||||
|
|
||||||
@@ -361,7 +360,12 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
|||||||
|
|
||||||
m_needParent = FALSE;
|
m_needParent = FALSE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxFrame creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_title = title;
|
m_title = title;
|
||||||
|
|
||||||
|
@@ -30,11 +30,12 @@ bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range,
|
|||||||
{
|
{
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxGauge creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_rangeMax = range;
|
m_rangeMax = range;
|
||||||
m_gaugePos = 0;
|
m_gaugePos = 0;
|
||||||
@@ -67,12 +68,12 @@ void wxGauge::SetValue( int pos )
|
|||||||
gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), ((float)m_gaugePos)/m_rangeMax );
|
gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), ((float)m_gaugePos)/m_rangeMax );
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGauge::GetRange(void) const
|
int wxGauge::GetRange() const
|
||||||
{
|
{
|
||||||
return m_rangeMax;
|
return m_rangeMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGauge::GetValue(void) const
|
int wxGauge::GetValue() const
|
||||||
{
|
{
|
||||||
return m_gaugePos;
|
return m_gaugePos;
|
||||||
}
|
}
|
||||||
|
@@ -244,11 +244,12 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxListBox creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_widget = gtk_scrolled_window_new( (GtkAdjustment*) NULL, (GtkAdjustment*) NULL );
|
m_widget = gtk_scrolled_window_new( (GtkAdjustment*) NULL, (GtkAdjustment*) NULL );
|
||||||
if (style & wxLB_ALWAYS_SB)
|
if (style & wxLB_ALWAYS_SB)
|
||||||
|
@@ -409,7 +409,12 @@ bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
|
|||||||
|
|
||||||
m_insertCallback = (wxInsertChildFunction)wxInsertChildInMDI;
|
m_insertCallback = (wxInsertChildFunction)wxInsertChildInMDI;
|
||||||
|
|
||||||
PreCreation( parent, -1, wxPoint(10,10), wxSize(100,100), style, "wxMDIClientWindow" );
|
if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
|
||||||
|
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, _T("wxMDIClientWindow") ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxMDIClientWindow creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_widget = gtk_notebook_new();
|
m_widget = gtk_notebook_new();
|
||||||
|
|
||||||
|
@@ -39,7 +39,12 @@ wxMenuBar::wxMenuBar( long style )
|
|||||||
m_needParent = FALSE;
|
m_needParent = FALSE;
|
||||||
m_style = style;
|
m_style = style;
|
||||||
|
|
||||||
PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, style, "menu" );
|
if (!PreCreation( (wxWindow*) NULL, wxDefaultPosition, wxDefaultSize ) ||
|
||||||
|
!CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, _T("menubar") ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxMenuBar creation failed") );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_menus.DeleteContents( TRUE );
|
m_menus.DeleteContents( TRUE );
|
||||||
|
|
||||||
@@ -72,7 +77,12 @@ wxMenuBar::wxMenuBar()
|
|||||||
m_needParent = FALSE;
|
m_needParent = FALSE;
|
||||||
m_style = 0;
|
m_style = 0;
|
||||||
|
|
||||||
PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" );
|
if (!PreCreation( (wxWindow*) NULL, wxDefaultPosition, wxDefaultSize ) ||
|
||||||
|
!CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("menubar") ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxMenuBar creation failed") );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_menus.DeleteContents( TRUE );
|
m_menus.DeleteContents( TRUE );
|
||||||
|
|
||||||
|
@@ -163,6 +163,8 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
|
|||||||
|
|
||||||
if (win->m_isDragging) return TRUE;
|
if (win->m_isDragging) return TRUE;
|
||||||
|
|
||||||
|
gdk_window_raise( win->m_widget->window );
|
||||||
|
|
||||||
gdk_pointer_grab( widget->window, FALSE,
|
gdk_pointer_grab( widget->window, FALSE,
|
||||||
(GdkEventMask)
|
(GdkEventMask)
|
||||||
(GDK_BUTTON_PRESS_MASK |
|
(GDK_BUTTON_PRESS_MASK |
|
||||||
|
@@ -220,7 +220,13 @@ bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
m_insertCallback = (wxInsertChildFunction)wxInsertChildInNotebook;
|
m_insertCallback = (wxInsertChildFunction)wxInsertChildInNotebook;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxNoteBook creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
m_widget = gtk_notebook_new();
|
m_widget = gtk_notebook_new();
|
||||||
|
|
||||||
|
@@ -85,11 +85,12 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxRadioBox creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_widget = gtk_frame_new( title.mbc_str() );
|
m_widget = gtk_frame_new( title.mbc_str() );
|
||||||
|
|
||||||
|
@@ -63,17 +63,14 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab
|
|||||||
{
|
{
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
wxSize newSize = size;
|
|
||||||
|
|
||||||
PreCreation( parent, id, pos, newSize, style, name );
|
|
||||||
|
|
||||||
m_isRadioButton = TRUE;
|
m_isRadioButton = TRUE;
|
||||||
|
|
||||||
#if wxUSE_VALIDATORS
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
SetValidator( validator );
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#endif
|
{
|
||||||
|
wxFAIL_MSG( _T("wxRadioButton creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (HasFlag(wxRB_GROUP))
|
if (HasFlag(wxRB_GROUP))
|
||||||
{
|
{
|
||||||
@@ -111,6 +108,7 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab
|
|||||||
|
|
||||||
SetLabel(label);
|
SetLabel(label);
|
||||||
|
|
||||||
|
wxSize newSize = size;
|
||||||
if (newSize.x == -1) newSize.x = 22+gdk_string_measure( m_widget->style->font, label.mbc_str() );
|
if (newSize.x == -1) newSize.x = 22+gdk_string_measure( m_widget->style->font, label.mbc_str() );
|
||||||
if (newSize.y == -1) newSize.y = 26;
|
if (newSize.y == -1) newSize.y = 26;
|
||||||
SetSize( newSize.x, newSize.y );
|
SetSize( newSize.x, newSize.y );
|
||||||
|
@@ -137,11 +137,12 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxScrollBar creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_oldPos = 0.0;
|
m_oldPos = 0.0;
|
||||||
|
|
||||||
|
@@ -98,11 +98,12 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
#if wxUSE_VALIDATORS
|
{
|
||||||
SetValidator( validator );
|
wxFAIL_MSG( _T("wxSlider creation failed") );
|
||||||
#endif
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_oldPos = 0.0;
|
m_oldPos = 0.0;
|
||||||
|
|
||||||
|
@@ -98,9 +98,12 @@ bool wxSpinButton::Create(wxWindow *parent,
|
|||||||
if (new_size.y == -1)
|
if (new_size.y == -1)
|
||||||
new_size.y = 30;
|
new_size.y = 30;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, new_size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, new_size, style, wxDefaultValidator, name ))
|
||||||
// SetValidator( validator );
|
{
|
||||||
|
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_oldPos = 0.0;
|
m_oldPos = 0.0;
|
||||||
|
|
||||||
|
@@ -58,14 +58,19 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
|
|||||||
{
|
{
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
wxSize newSize = size;
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
{
|
||||||
|
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_bitmap = bitmap;
|
m_bitmap = bitmap;
|
||||||
|
|
||||||
if (m_bitmap.Ok())
|
if (m_bitmap.Ok())
|
||||||
{
|
{
|
||||||
|
wxSize newSize = size;
|
||||||
|
|
||||||
GdkBitmap *mask = (GdkBitmap *) NULL;
|
GdkBitmap *mask = (GdkBitmap *) NULL;
|
||||||
if ( m_bitmap.GetMask() )
|
if ( m_bitmap.GetMask() )
|
||||||
mask = m_bitmap.GetMask()->GetBitmap();
|
mask = m_bitmap.GetMask()->GetBitmap();
|
||||||
|
@@ -41,7 +41,12 @@ bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label
|
|||||||
{
|
{
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxStaticBox creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_isStaticBox = TRUE;
|
m_isStaticBox = TRUE;
|
||||||
|
|
||||||
|
@@ -41,7 +41,12 @@ bool wxStaticLine::Create( wxWindow *parent, wxWindowID id,
|
|||||||
{
|
{
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxStaticLine creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if ( IsVertical() )
|
if ( IsVertical() )
|
||||||
m_widget = gtk_vseparator_new();
|
m_widget = gtk_vseparator_new();
|
||||||
|
@@ -48,9 +48,12 @@ bool wxStaticText::Create(wxWindow *parent,
|
|||||||
{
|
{
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
wxSize newSize = size;
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
{
|
||||||
|
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
// notice that we call the base class version which will just remove the
|
// notice that we call the base class version which will just remove the
|
||||||
// '&' characters from the string, but not set the label's text to it
|
// '&' characters from the string, but not set the label's text to it
|
||||||
@@ -77,9 +80,9 @@ bool wxStaticText::Create(wxWindow *parent,
|
|||||||
GtkRequisition req;
|
GtkRequisition req;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(m_widget)->klass )->size_request ) (m_widget, &req );
|
(* GTK_WIDGET_CLASS( GTK_OBJECT(m_widget)->klass )->size_request ) (m_widget, &req );
|
||||||
|
|
||||||
|
wxSize newSize = size;
|
||||||
if (newSize.x == -1) newSize.x = req.width;
|
if (newSize.x == -1) newSize.x = req.width;
|
||||||
if (newSize.y == -1) newSize.y = req.height;
|
if (newSize.y == -1) newSize.y = req.height;
|
||||||
|
|
||||||
SetSize( newSize.x, newSize.y );
|
SetSize( newSize.x, newSize.y );
|
||||||
|
|
||||||
m_parent->DoAddChild( this );
|
m_parent->DoAddChild( this );
|
||||||
|
@@ -147,7 +147,12 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id,
|
|||||||
{
|
{
|
||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxToolBar creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_tools.DeleteContents( TRUE );
|
m_tools.DeleteContents( TRUE );
|
||||||
|
|
||||||
|
@@ -114,11 +114,13 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
|
|||||||
m_needParent = TRUE;
|
m_needParent = TRUE;
|
||||||
m_acceptsFocus = TRUE;
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxTextCtrl creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
#if wxUSE_VALIDATORS
|
|
||||||
SetValidator( validator );
|
|
||||||
#endif // wxUSE_VALIDATORS
|
|
||||||
|
|
||||||
m_vScrollbarVisible = FALSE;
|
m_vScrollbarVisible = FALSE;
|
||||||
|
|
||||||
|
@@ -1821,7 +1821,12 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
|
|||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
long style, const wxString &name )
|
long style, const wxString &name )
|
||||||
{
|
{
|
||||||
PreCreation( parent, id, pos, size, style, name );
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
|
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("wxWindow creation failed") );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
m_insertCallback = wxInsertChildInWindow;
|
m_insertCallback = wxInsertChildInWindow;
|
||||||
|
|
||||||
@@ -2002,27 +2007,22 @@ wxWindow::~wxWindow()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::PreCreation( wxWindow *parent,
|
bool wxWindow::PreCreation( wxWindow *parent, const wxPoint &pos, const wxSize &size )
|
||||||
wxWindowID id,
|
|
||||||
const wxPoint &pos,
|
|
||||||
const wxSize &size,
|
|
||||||
long style,
|
|
||||||
const wxString &name )
|
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( !m_needParent || parent, _T("Need complete parent.") );
|
wxCHECK_MSG( !m_needParent || parent, FALSE, _T("Need complete parent.") );
|
||||||
|
|
||||||
if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
|
|
||||||
{
|
|
||||||
wxFAIL_MSG(_T("window creation failed"));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/* this turns -1 into 20 so that a minimal window is
|
||||||
|
visible even although -1,-1 has been given as the
|
||||||
|
size of the window. the same trick is used in other
|
||||||
|
ports and should make debugging easier */
|
||||||
m_width = WidthDefault(size.x);
|
m_width = WidthDefault(size.x);
|
||||||
m_height = HeightDefault(size.y);
|
m_height = HeightDefault(size.y);
|
||||||
|
|
||||||
m_x = (int)pos.x;
|
m_x = (int)pos.x;
|
||||||
m_y = (int)pos.y;
|
m_y = (int)pos.y;
|
||||||
|
|
||||||
if (!parent) /* some reasonable defaults */
|
/* some reasonable defaults */
|
||||||
|
if (!parent)
|
||||||
{
|
{
|
||||||
if (m_x == -1)
|
if (m_x == -1)
|
||||||
{
|
{
|
||||||
@@ -2035,6 +2035,8 @@ void wxWindow::PreCreation( wxWindow *parent,
|
|||||||
if (m_y < 10) m_y = 10;
|
if (m_y < 10) m_y = 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::PostCreation()
|
void wxWindow::PostCreation()
|
||||||
|
@@ -6,14 +6,12 @@
|
|||||||
// Licence: wxWindows Licence
|
// Licence: wxWindows Licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation "htmlcell.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/wxprec.h>
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#include "wx/defs.h"
|
|
||||||
#if wxUSE_HTML
|
#if wxUSE_HTML
|
||||||
|
|
||||||
#ifdef __BORDLANDC__
|
#ifdef __BORDLANDC__
|
||||||
@@ -21,16 +19,14 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WXPRECOMP
|
#ifndef WXPRECOMP
|
||||||
#include <wx/wx.h>
|
#include "wx/wx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/html/htmlcell.h>
|
#include "wx/html/htmlcell.h"
|
||||||
#include <wx/html/htmlwin.h>
|
#include "wx/html/htmlwin.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxHtmlCell
|
// wxHtmlCell
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -71,10 +67,6 @@ void wxHtmlWordCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxHtmlContainerCell
|
// wxHtmlContainerCell
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@@ -8,12 +8,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation "htmlfilter.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/wxprec.h>
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#include "wx/defs.h"
|
|
||||||
#if wxUSE_HTML
|
#if wxUSE_HTML
|
||||||
|
|
||||||
#ifdef __BORDLANDC__
|
#ifdef __BORDLANDC__
|
||||||
@@ -21,11 +20,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WXPRECOMP
|
#ifndef WXPRECOMP
|
||||||
#include <wx/wx.h>
|
#include "wx/wx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/html/htmlfilter.h>
|
#include "wx/html/htmlfilter.h"
|
||||||
#include <wx/html/htmlwin.h>
|
#include "wx/html/htmlwin.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -7,12 +7,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation "htmlhelp.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/wxprec.h>
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#include "wx/defs.h"
|
|
||||||
#if wxUSE_HTML
|
#if wxUSE_HTML
|
||||||
|
|
||||||
#ifdef __BORDLANDC__
|
#ifdef __BORDLANDC__
|
||||||
|
Reference in New Issue
Block a user