Added a couple of const to == and != operators.
Removed no-flicker hack which seems to be a problem on Sun. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -70,8 +70,8 @@ public:
|
|||||||
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
||||||
~wxBitmap();
|
~wxBitmap();
|
||||||
wxBitmap& operator = ( const wxBitmap& bmp );
|
wxBitmap& operator = ( const wxBitmap& bmp );
|
||||||
bool operator == ( const wxBitmap& bmp );
|
bool operator == ( const wxBitmap& bmp ) const;
|
||||||
bool operator != ( const wxBitmap& bmp );
|
bool operator != ( const wxBitmap& bmp ) const;
|
||||||
bool Ok() const;
|
bool Ok() const;
|
||||||
|
|
||||||
bool Create(int width, int height, int depth = -1);
|
bool Create(int width, int height, int depth = -1);
|
||||||
|
@@ -40,8 +40,8 @@ public:
|
|||||||
wxBrush( const wxBrush &brush );
|
wxBrush( const wxBrush &brush );
|
||||||
~wxBrush();
|
~wxBrush();
|
||||||
wxBrush& operator = ( const wxBrush& brush );
|
wxBrush& operator = ( const wxBrush& brush );
|
||||||
bool operator == ( const wxBrush& brush );
|
bool operator == ( const wxBrush& brush ) const;
|
||||||
bool operator != ( const wxBrush& brush );
|
bool operator != ( const wxBrush& brush ) const;
|
||||||
bool Ok() const;
|
bool Ok() const;
|
||||||
|
|
||||||
int GetStyle() const;
|
int GetStyle() const;
|
||||||
|
@@ -45,8 +45,8 @@ public:
|
|||||||
wxPen( const wxPen& pen );
|
wxPen( const wxPen& pen );
|
||||||
~wxPen();
|
~wxPen();
|
||||||
wxPen& operator = ( const wxPen& pen );
|
wxPen& operator = ( const wxPen& pen );
|
||||||
bool operator == ( const wxPen& pen );
|
bool operator == ( const wxPen& pen ) const;
|
||||||
bool operator != ( const wxPen& pen );
|
bool operator != ( const wxPen& pen ) const;
|
||||||
|
|
||||||
void SetColour( const wxColour &colour );
|
void SetColour( const wxColour &colour );
|
||||||
void SetColour( int red, int green, int blue );
|
void SetColour( int red, int green, int blue );
|
||||||
|
@@ -70,8 +70,8 @@ public:
|
|||||||
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
||||||
~wxBitmap();
|
~wxBitmap();
|
||||||
wxBitmap& operator = ( const wxBitmap& bmp );
|
wxBitmap& operator = ( const wxBitmap& bmp );
|
||||||
bool operator == ( const wxBitmap& bmp );
|
bool operator == ( const wxBitmap& bmp ) const;
|
||||||
bool operator != ( const wxBitmap& bmp );
|
bool operator != ( const wxBitmap& bmp ) const;
|
||||||
bool Ok() const;
|
bool Ok() const;
|
||||||
|
|
||||||
bool Create(int width, int height, int depth = -1);
|
bool Create(int width, int height, int depth = -1);
|
||||||
|
@@ -40,8 +40,8 @@ public:
|
|||||||
wxBrush( const wxBrush &brush );
|
wxBrush( const wxBrush &brush );
|
||||||
~wxBrush();
|
~wxBrush();
|
||||||
wxBrush& operator = ( const wxBrush& brush );
|
wxBrush& operator = ( const wxBrush& brush );
|
||||||
bool operator == ( const wxBrush& brush );
|
bool operator == ( const wxBrush& brush ) const;
|
||||||
bool operator != ( const wxBrush& brush );
|
bool operator != ( const wxBrush& brush ) const;
|
||||||
bool Ok() const;
|
bool Ok() const;
|
||||||
|
|
||||||
int GetStyle() const;
|
int GetStyle() const;
|
||||||
|
@@ -45,8 +45,8 @@ public:
|
|||||||
wxPen( const wxPen& pen );
|
wxPen( const wxPen& pen );
|
||||||
~wxPen();
|
~wxPen();
|
||||||
wxPen& operator = ( const wxPen& pen );
|
wxPen& operator = ( const wxPen& pen );
|
||||||
bool operator == ( const wxPen& pen );
|
bool operator == ( const wxPen& pen ) const;
|
||||||
bool operator != ( const wxPen& pen );
|
bool operator != ( const wxPen& pen ) const;
|
||||||
|
|
||||||
void SetColour( const wxColour &colour );
|
void SetColour( const wxColour &colour );
|
||||||
void SetColour( int red, int green, int blue );
|
void SetColour( int red, int green, int blue );
|
||||||
|
@@ -351,12 +351,12 @@ wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp )
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxBitmap::operator == ( const wxBitmap& bmp )
|
bool wxBitmap::operator == ( const wxBitmap& bmp ) const
|
||||||
{
|
{
|
||||||
return m_refData == bmp.m_refData;
|
return m_refData == bmp.m_refData;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxBitmap::operator != ( const wxBitmap& bmp )
|
bool wxBitmap::operator != ( const wxBitmap& bmp ) const
|
||||||
{
|
{
|
||||||
return m_refData != bmp.m_refData;
|
return m_refData != bmp.m_refData;
|
||||||
}
|
}
|
||||||
|
@@ -96,12 +96,12 @@ wxBrush& wxBrush::operator = ( const wxBrush& brush )
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxBrush::operator == ( const wxBrush& brush )
|
bool wxBrush::operator == ( const wxBrush& brush ) const
|
||||||
{
|
{
|
||||||
return m_refData == brush.m_refData;
|
return m_refData == brush.m_refData;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxBrush::operator != ( const wxBrush& brush )
|
bool wxBrush::operator != ( const wxBrush& brush ) const
|
||||||
{
|
{
|
||||||
return m_refData != brush.m_refData;
|
return m_refData != brush.m_refData;
|
||||||
}
|
}
|
||||||
|
@@ -100,12 +100,12 @@ wxPen& wxPen::operator = ( const wxPen& pen )
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPen::operator == ( const wxPen& pen )
|
bool wxPen::operator == ( const wxPen& pen ) const
|
||||||
{
|
{
|
||||||
return m_refData == pen.m_refData;
|
return m_refData == pen.m_refData;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPen::operator != ( const wxPen& pen )
|
bool wxPen::operator != ( const wxPen& pen ) const
|
||||||
{
|
{
|
||||||
return m_refData != pen.m_refData;
|
return m_refData != pen.m_refData;
|
||||||
}
|
}
|
||||||
|
@@ -636,9 +636,6 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!win->m_queuedFullRedraw)
|
|
||||||
{
|
|
||||||
|
|
||||||
win->GetUpdateRegion().Union( gdk_event->area.x,
|
win->GetUpdateRegion().Union( gdk_event->area.x,
|
||||||
gdk_event->area.y,
|
gdk_event->area.y,
|
||||||
gdk_event->area.width,
|
gdk_event->area.width,
|
||||||
@@ -683,7 +680,6 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev
|
|||||||
gtk_widget_event (child->widget, (GdkEvent*) &child_event);
|
gtk_widget_event (child->widget, (GdkEvent*) &child_event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -738,9 +734,6 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW
|
|||||||
|
|
||||||
GtkPizza *pizza = GTK_PIZZA (widget);
|
GtkPizza *pizza = GTK_PIZZA (widget);
|
||||||
|
|
||||||
if (!win->m_queuedFullRedraw)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (!(GTK_WIDGET_APP_PAINTABLE (widget)) &&
|
if (!(GTK_WIDGET_APP_PAINTABLE (widget)) &&
|
||||||
(pizza->clear_on_draw))
|
(pizza->clear_on_draw))
|
||||||
{
|
{
|
||||||
@@ -777,7 +770,6 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW
|
|||||||
gtk_widget_draw (child->widget, &child_area /* (GdkRectangle*) NULL*/ );
|
gtk_widget_draw (child->widget, &child_area /* (GdkRectangle*) NULL*/ );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -2062,7 +2054,6 @@ void wxWindow::Init()
|
|||||||
m_acceptsFocus = FALSE;
|
m_acceptsFocus = FALSE;
|
||||||
|
|
||||||
m_clipPaintRegion = FALSE;
|
m_clipPaintRegion = FALSE;
|
||||||
m_queuedFullRedraw = FALSE;
|
|
||||||
|
|
||||||
m_cursor = *wxSTANDARD_CURSOR;
|
m_cursor = *wxSTANDARD_CURSOR;
|
||||||
|
|
||||||
@@ -2403,24 +2394,6 @@ bool wxWindow::Destroy()
|
|||||||
|
|
||||||
void wxWindow::DoMoveWindow(int x, int y, int width, int height)
|
void wxWindow::DoMoveWindow(int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
if (m_wxwindow && GTK_PIZZA(m_wxwindow)->bin_window)
|
|
||||||
{
|
|
||||||
/* Normally, GTK will send expose events only for the regions
|
|
||||||
which actually got exposed. Sadly, wxMSW invalidates
|
|
||||||
the whole window so we have to do that, too. We could
|
|
||||||
simply add a complete refresh, but we would then get
|
|
||||||
the normal GTK expose events in surplus, so we shut
|
|
||||||
off the expose events and schedule a full redraw to
|
|
||||||
be done in OnInternalIdle, where we restore the handling
|
|
||||||
of expose events. */
|
|
||||||
|
|
||||||
m_queuedFullRedraw = TRUE;
|
|
||||||
|
|
||||||
GdkEventMask mask = gdk_window_get_events( GTK_PIZZA(m_wxwindow)->bin_window );
|
|
||||||
mask = (GdkEventMask)(mask & ~GDK_EXPOSURE_MASK);
|
|
||||||
gdk_window_set_events( GTK_PIZZA(m_wxwindow)->bin_window, mask );
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), m_widget, x, y, width, height );
|
gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), m_widget, x, y, width, height );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2568,39 +2541,6 @@ void wxWindow::OnInternalIdle()
|
|||||||
}
|
}
|
||||||
|
|
||||||
UpdateWindowUI();
|
UpdateWindowUI();
|
||||||
|
|
||||||
if (m_queuedFullRedraw)
|
|
||||||
{
|
|
||||||
/* See also wxWindow::DoMoveWindow for explanation of this code. What
|
|
||||||
we test here is if the requested size of the window is the same as
|
|
||||||
the actual size of window, in which case all expose events that resulted
|
|
||||||
from resizing the window have been sent (and discarded) and we can
|
|
||||||
now do our full redraw and switch on expose event handling again. */
|
|
||||||
|
|
||||||
bool child_already_resized = FALSE;
|
|
||||||
if (IsTopLevel() && !m_isFrame)
|
|
||||||
{
|
|
||||||
child_already_resized = ((m_wxwindow->parent) &&
|
|
||||||
(gtk_pizza_child_resized( GTK_PIZZA(m_wxwindow->parent), m_wxwindow )));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
child_already_resized = ((m_widget->parent) &&
|
|
||||||
(gtk_pizza_child_resized( GTK_PIZZA(m_widget->parent), m_widget )));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (child_already_resized)
|
|
||||||
{
|
|
||||||
m_queuedFullRedraw = FALSE;
|
|
||||||
m_updateRegion.Clear();
|
|
||||||
m_updateRegion.Union( 0,0,m_width,m_height );
|
|
||||||
gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL );
|
|
||||||
|
|
||||||
GdkEventMask mask = gdk_window_get_events( GTK_PIZZA(m_wxwindow)->bin_window );
|
|
||||||
mask = (GdkEventMask)(mask | GDK_EXPOSURE_MASK);
|
|
||||||
gdk_window_set_events( GTK_PIZZA(m_wxwindow)->bin_window, mask );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::DoGetSize( int *width, int *height ) const
|
void wxWindow::DoGetSize( int *width, int *height ) const
|
||||||
|
@@ -351,12 +351,12 @@ wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp )
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxBitmap::operator == ( const wxBitmap& bmp )
|
bool wxBitmap::operator == ( const wxBitmap& bmp ) const
|
||||||
{
|
{
|
||||||
return m_refData == bmp.m_refData;
|
return m_refData == bmp.m_refData;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxBitmap::operator != ( const wxBitmap& bmp )
|
bool wxBitmap::operator != ( const wxBitmap& bmp ) const
|
||||||
{
|
{
|
||||||
return m_refData != bmp.m_refData;
|
return m_refData != bmp.m_refData;
|
||||||
}
|
}
|
||||||
|
@@ -96,12 +96,12 @@ wxBrush& wxBrush::operator = ( const wxBrush& brush )
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxBrush::operator == ( const wxBrush& brush )
|
bool wxBrush::operator == ( const wxBrush& brush ) const
|
||||||
{
|
{
|
||||||
return m_refData == brush.m_refData;
|
return m_refData == brush.m_refData;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxBrush::operator != ( const wxBrush& brush )
|
bool wxBrush::operator != ( const wxBrush& brush ) const
|
||||||
{
|
{
|
||||||
return m_refData != brush.m_refData;
|
return m_refData != brush.m_refData;
|
||||||
}
|
}
|
||||||
|
@@ -100,12 +100,12 @@ wxPen& wxPen::operator = ( const wxPen& pen )
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPen::operator == ( const wxPen& pen )
|
bool wxPen::operator == ( const wxPen& pen ) const
|
||||||
{
|
{
|
||||||
return m_refData == pen.m_refData;
|
return m_refData == pen.m_refData;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPen::operator != ( const wxPen& pen )
|
bool wxPen::operator != ( const wxPen& pen ) const
|
||||||
{
|
{
|
||||||
return m_refData != pen.m_refData;
|
return m_refData != pen.m_refData;
|
||||||
}
|
}
|
||||||
|
@@ -636,9 +636,6 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!win->m_queuedFullRedraw)
|
|
||||||
{
|
|
||||||
|
|
||||||
win->GetUpdateRegion().Union( gdk_event->area.x,
|
win->GetUpdateRegion().Union( gdk_event->area.x,
|
||||||
gdk_event->area.y,
|
gdk_event->area.y,
|
||||||
gdk_event->area.width,
|
gdk_event->area.width,
|
||||||
@@ -683,7 +680,6 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev
|
|||||||
gtk_widget_event (child->widget, (GdkEvent*) &child_event);
|
gtk_widget_event (child->widget, (GdkEvent*) &child_event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -738,9 +734,6 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW
|
|||||||
|
|
||||||
GtkPizza *pizza = GTK_PIZZA (widget);
|
GtkPizza *pizza = GTK_PIZZA (widget);
|
||||||
|
|
||||||
if (!win->m_queuedFullRedraw)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (!(GTK_WIDGET_APP_PAINTABLE (widget)) &&
|
if (!(GTK_WIDGET_APP_PAINTABLE (widget)) &&
|
||||||
(pizza->clear_on_draw))
|
(pizza->clear_on_draw))
|
||||||
{
|
{
|
||||||
@@ -777,7 +770,6 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW
|
|||||||
gtk_widget_draw (child->widget, &child_area /* (GdkRectangle*) NULL*/ );
|
gtk_widget_draw (child->widget, &child_area /* (GdkRectangle*) NULL*/ );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -2062,7 +2054,6 @@ void wxWindow::Init()
|
|||||||
m_acceptsFocus = FALSE;
|
m_acceptsFocus = FALSE;
|
||||||
|
|
||||||
m_clipPaintRegion = FALSE;
|
m_clipPaintRegion = FALSE;
|
||||||
m_queuedFullRedraw = FALSE;
|
|
||||||
|
|
||||||
m_cursor = *wxSTANDARD_CURSOR;
|
m_cursor = *wxSTANDARD_CURSOR;
|
||||||
|
|
||||||
@@ -2403,24 +2394,6 @@ bool wxWindow::Destroy()
|
|||||||
|
|
||||||
void wxWindow::DoMoveWindow(int x, int y, int width, int height)
|
void wxWindow::DoMoveWindow(int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
if (m_wxwindow && GTK_PIZZA(m_wxwindow)->bin_window)
|
|
||||||
{
|
|
||||||
/* Normally, GTK will send expose events only for the regions
|
|
||||||
which actually got exposed. Sadly, wxMSW invalidates
|
|
||||||
the whole window so we have to do that, too. We could
|
|
||||||
simply add a complete refresh, but we would then get
|
|
||||||
the normal GTK expose events in surplus, so we shut
|
|
||||||
off the expose events and schedule a full redraw to
|
|
||||||
be done in OnInternalIdle, where we restore the handling
|
|
||||||
of expose events. */
|
|
||||||
|
|
||||||
m_queuedFullRedraw = TRUE;
|
|
||||||
|
|
||||||
GdkEventMask mask = gdk_window_get_events( GTK_PIZZA(m_wxwindow)->bin_window );
|
|
||||||
mask = (GdkEventMask)(mask & ~GDK_EXPOSURE_MASK);
|
|
||||||
gdk_window_set_events( GTK_PIZZA(m_wxwindow)->bin_window, mask );
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), m_widget, x, y, width, height );
|
gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), m_widget, x, y, width, height );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2568,39 +2541,6 @@ void wxWindow::OnInternalIdle()
|
|||||||
}
|
}
|
||||||
|
|
||||||
UpdateWindowUI();
|
UpdateWindowUI();
|
||||||
|
|
||||||
if (m_queuedFullRedraw)
|
|
||||||
{
|
|
||||||
/* See also wxWindow::DoMoveWindow for explanation of this code. What
|
|
||||||
we test here is if the requested size of the window is the same as
|
|
||||||
the actual size of window, in which case all expose events that resulted
|
|
||||||
from resizing the window have been sent (and discarded) and we can
|
|
||||||
now do our full redraw and switch on expose event handling again. */
|
|
||||||
|
|
||||||
bool child_already_resized = FALSE;
|
|
||||||
if (IsTopLevel() && !m_isFrame)
|
|
||||||
{
|
|
||||||
child_already_resized = ((m_wxwindow->parent) &&
|
|
||||||
(gtk_pizza_child_resized( GTK_PIZZA(m_wxwindow->parent), m_wxwindow )));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
child_already_resized = ((m_widget->parent) &&
|
|
||||||
(gtk_pizza_child_resized( GTK_PIZZA(m_widget->parent), m_widget )));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (child_already_resized)
|
|
||||||
{
|
|
||||||
m_queuedFullRedraw = FALSE;
|
|
||||||
m_updateRegion.Clear();
|
|
||||||
m_updateRegion.Union( 0,0,m_width,m_height );
|
|
||||||
gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL );
|
|
||||||
|
|
||||||
GdkEventMask mask = gdk_window_get_events( GTK_PIZZA(m_wxwindow)->bin_window );
|
|
||||||
mask = (GdkEventMask)(mask | GDK_EXPOSURE_MASK);
|
|
||||||
gdk_window_set_events( GTK_PIZZA(m_wxwindow)->bin_window, mask );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::DoGetSize( int *width, int *height ) const
|
void wxWindow::DoGetSize( int *width, int *height ) const
|
||||||
|
Reference in New Issue
Block a user