Updated makefile for mobile sample.
Updated changes.txt. Moved contents of ::Update() to ::GtkUpdate() Moved internal idle functions in wxApp to its own function. Tried to fix themed background redraw problem (probably same bug in wxNotebook and in wxStatusBar and others). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
129223d68e
commit
010afced51
@ -1061,6 +1061,13 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/minimal/*.xpm $(DISTDIR)/samples/minimal
|
||||
cp $(SAMPDIR)/minimal/*.mms $(DISTDIR)/samples/minimal
|
||||
|
||||
mkdir $(DISTDIR)/samples/mobile
|
||||
cp $(SAMPDIR)/mobile/Makefile.in $(DISTDIR)/samples/mobile
|
||||
mkdir $(DISTDIR)/samples/mobile/wxedit
|
||||
cp $(SAMPDIR)/mobile/wxedit/Makefile.in $(DISTDIR)/samples/mobile/wxedit
|
||||
cp $(SAMPDIR)/mobile/wxedit/*.cpp $(DISTDIR)/samples/mobile/wxedit
|
||||
cp $(SAMPDIR)/mobile/wxedit/*.h $(DISTDIR)/samples/mobile/wxedit
|
||||
|
||||
mkdir $(DISTDIR)/samples/dialup
|
||||
cp $(SAMPDIR)/dialup/Makefile.in $(DISTDIR)/samples/dialup
|
||||
cp $(SAMPDIR)/dialup/makefile.unx $(DISTDIR)/samples/dialup
|
||||
|
@ -1,6 +1,23 @@
|
||||
|
||||
*** wxWindows 2.3.3 ***
|
||||
|
||||
Beta support for GTK 2.0.
|
||||
|
||||
Added wxArtProvider for changing default icons and more.
|
||||
|
||||
Corrected wxScrolledWindow in some rare cases.
|
||||
|
||||
Added wxIconBundle for mini- and normal icons.
|
||||
|
||||
Made wxWindow::SetFocus() work before a wxDialog
|
||||
is created. Until now always the first item
|
||||
was focussed.
|
||||
|
||||
Corrected wxComboBox's semantics of pressing <Enter>.
|
||||
|
||||
Corrected SeekI() return values and other related functions
|
||||
in wxFilterStream and wxBufferedStream.
|
||||
|
||||
Implemented new ref-counting for GDI classes.
|
||||
|
||||
New implemenation of wxCondition.
|
||||
@ -39,7 +56,7 @@ Added IFF image handler.
|
||||
|
||||
Added ICO, CUR and ANI image handler.
|
||||
|
||||
wxFrame::SetMenuBar() corrected.
|
||||
wxFrame::SetMenuBar() corrected (for NULL etc.)
|
||||
|
||||
wxButton honours wxBU_EXACTFIT.
|
||||
|
||||
|
@ -7,13 +7,10 @@ wxWindows GUI library.
|
||||
wxWindows no longer supports GTK 1.0 (as did some early
|
||||
snapshots) so that you will need GTK 1.2 when using it.
|
||||
GTK 1.2.6 or above is recommended although some programs
|
||||
will work with GTK 1.2.3 onwards.
|
||||
will work with GTK 1.2.3 onwards. There is now beta support
|
||||
for GTK 2.0.
|
||||
|
||||
More information is available from my homepage at:
|
||||
|
||||
http://wesley.informatik.uni-freiburg.de/~wxxt
|
||||
|
||||
and about the wxWindows project as a whole (and the MSW
|
||||
More info about the wxWindows project (and the Windows
|
||||
and Motif ports in particular) can be found at Julian's
|
||||
homepage at:
|
||||
|
||||
|
@ -87,6 +87,8 @@ private:
|
||||
bool m_isInAssert;
|
||||
#endif // __WXDEBUG__
|
||||
|
||||
bool CallInternalIdle( wxWindow* win );
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
@ -112,6 +112,9 @@ public:
|
||||
// OnInternalIdle
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
// Internal represention of Update()
|
||||
void GtkUpdate();
|
||||
|
||||
// For delayed background
|
||||
void GtkSetBackgroundColour( const wxColour &colour );
|
||||
void GtkSetForegroundColour( const wxColour &colour );
|
||||
|
@ -87,6 +87,8 @@ private:
|
||||
bool m_isInAssert;
|
||||
#endif // __WXDEBUG__
|
||||
|
||||
bool CallInternalIdle( wxWindow* win );
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
@ -112,6 +112,9 @@ public:
|
||||
// OnInternalIdle
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
// Internal represention of Update()
|
||||
void GtkUpdate();
|
||||
|
||||
// For delayed background
|
||||
void GtkSetBackgroundColour( const wxColour &colour );
|
||||
void GtkSetForegroundColour( const wxColour &colour );
|
||||
|
@ -486,12 +486,37 @@ bool wxApp::SendIdleEvents()
|
||||
wxWindow* win = node->GetData();
|
||||
if (SendIdleEvents(win))
|
||||
needMore = TRUE;
|
||||
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
node = wxTopLevelWindows.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxWindow* win = node->GetData();
|
||||
CallInternalIdle( win );
|
||||
|
||||
node = node->GetNext();
|
||||
}
|
||||
return needMore;
|
||||
}
|
||||
|
||||
bool wxApp::CallInternalIdle( wxWindow* win )
|
||||
{
|
||||
win->OnInternalIdle();
|
||||
|
||||
wxNode* node = win->GetChildren().First();
|
||||
while (node)
|
||||
{
|
||||
wxWindow* win = (wxWindow*) node->Data();
|
||||
CallInternalIdle( win );
|
||||
|
||||
node = node->Next();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxApp::SendIdleEvents( wxWindow* win )
|
||||
{
|
||||
bool needMore = FALSE;
|
||||
@ -514,8 +539,6 @@ bool wxApp::SendIdleEvents( wxWindow* win )
|
||||
node = node->Next();
|
||||
}
|
||||
|
||||
win->OnInternalIdle();
|
||||
|
||||
return needMore;
|
||||
}
|
||||
|
||||
|
@ -551,35 +551,13 @@ static int gtk_window_expose_callback( GtkWidget *widget,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __WXUNIVERSAL__
|
||||
GtkPizza *pizza = GTK_PIZZA (widget);
|
||||
|
||||
if (win->GetThemeEnabled())
|
||||
{
|
||||
wxWindow *parent = win->GetParent();
|
||||
while (parent && !parent->IsTopLevel())
|
||||
parent = parent->GetParent();
|
||||
if (!parent)
|
||||
parent = win;
|
||||
|
||||
gtk_paint_flat_box (parent->m_widget->style,
|
||||
pizza->bin_window,
|
||||
GTK_STATE_NORMAL,
|
||||
GTK_SHADOW_NONE,
|
||||
&gdk_event->area,
|
||||
parent->m_widget,
|
||||
(char *)"base",
|
||||
0, 0, -1, -1);
|
||||
}
|
||||
#endif
|
||||
|
||||
win->GetUpdateRegion().Union( gdk_event->area.x,
|
||||
gdk_event->area.y,
|
||||
gdk_event->area.width,
|
||||
gdk_event->area.height );
|
||||
|
||||
// Actual redrawing takes place in idle time.
|
||||
win->Update();
|
||||
win->GtkUpdate();
|
||||
|
||||
#ifdef __WXGTK20__
|
||||
|
||||
@ -686,7 +664,7 @@ static void gtk_window_draw_callback( GtkWidget *widget,
|
||||
|
||||
// Actual redrawing takes place in idle time.
|
||||
|
||||
win->Update();
|
||||
win->GtkUpdate();
|
||||
|
||||
#ifndef __WXUNIVERSAL__
|
||||
// Redraw child widgets
|
||||
@ -2902,7 +2880,7 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
|
||||
void wxWindowGTK::OnInternalIdle()
|
||||
{
|
||||
// Update invalidated regions.
|
||||
Update();
|
||||
GtkUpdate();
|
||||
|
||||
// Synthetize activate events.
|
||||
if ( g_sendActivateEvent != -1 )
|
||||
@ -3500,6 +3478,11 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect )
|
||||
}
|
||||
|
||||
void wxWindowGTK::Update()
|
||||
{
|
||||
GtkUpdate();
|
||||
}
|
||||
|
||||
void wxWindowGTK::GtkUpdate()
|
||||
{
|
||||
#ifdef __WXGTK20__
|
||||
if (m_wxwindow && GTK_PIZZA(m_wxwindow)->bin_window)
|
||||
@ -3538,11 +3521,41 @@ void wxWindowGTK::GtkSendPaintEvents()
|
||||
}
|
||||
gdk_gc_set_foreground( g_eraseGC, m_backgroundColour.GetColor() );
|
||||
|
||||
// widget to draw on
|
||||
GtkPizza *pizza = GTK_PIZZA (m_wxwindow);
|
||||
|
||||
// find ancestor from which to steal background
|
||||
wxWindow *parent = GetParent();
|
||||
while (parent && !parent->IsTopLevel())
|
||||
parent = parent->GetParent();
|
||||
if (!parent)
|
||||
parent = this;
|
||||
|
||||
wxRegionIterator upd( m_clearRegion );
|
||||
while (upd)
|
||||
{
|
||||
gdk_draw_rectangle( GTK_PIZZA(m_wxwindow)->bin_window, g_eraseGC, 1,
|
||||
upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
|
||||
if (GetThemeEnabled())
|
||||
{
|
||||
GdkRectangle rect;
|
||||
rect.x = upd.GetX();
|
||||
rect.y = upd.GetY();
|
||||
rect.width = upd.GetWidth();
|
||||
rect.height = upd.GetHeight();
|
||||
|
||||
gtk_paint_flat_box( parent->m_widget->style,
|
||||
pizza->bin_window,
|
||||
GTK_STATE_NORMAL,
|
||||
GTK_SHADOW_NONE,
|
||||
&rect,
|
||||
parent->m_widget,
|
||||
(char *)"base",
|
||||
0, 0, -1, -1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_draw_rectangle( pizza->bin_window, g_eraseGC, 1,
|
||||
upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
|
||||
}
|
||||
upd ++;
|
||||
}
|
||||
}
|
||||
@ -3619,7 +3632,7 @@ void wxWindowGTK::Clear()
|
||||
m_clearRegion.Union( 0,0,size.x,size.y );
|
||||
|
||||
// Better do this in idle?
|
||||
Update();
|
||||
GtkUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -486,12 +486,37 @@ bool wxApp::SendIdleEvents()
|
||||
wxWindow* win = node->GetData();
|
||||
if (SendIdleEvents(win))
|
||||
needMore = TRUE;
|
||||
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
node = wxTopLevelWindows.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxWindow* win = node->GetData();
|
||||
CallInternalIdle( win );
|
||||
|
||||
node = node->GetNext();
|
||||
}
|
||||
return needMore;
|
||||
}
|
||||
|
||||
bool wxApp::CallInternalIdle( wxWindow* win )
|
||||
{
|
||||
win->OnInternalIdle();
|
||||
|
||||
wxNode* node = win->GetChildren().First();
|
||||
while (node)
|
||||
{
|
||||
wxWindow* win = (wxWindow*) node->Data();
|
||||
CallInternalIdle( win );
|
||||
|
||||
node = node->Next();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxApp::SendIdleEvents( wxWindow* win )
|
||||
{
|
||||
bool needMore = FALSE;
|
||||
@ -514,8 +539,6 @@ bool wxApp::SendIdleEvents( wxWindow* win )
|
||||
node = node->Next();
|
||||
}
|
||||
|
||||
win->OnInternalIdle();
|
||||
|
||||
return needMore;
|
||||
}
|
||||
|
||||
|
@ -551,35 +551,13 @@ static int gtk_window_expose_callback( GtkWidget *widget,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __WXUNIVERSAL__
|
||||
GtkPizza *pizza = GTK_PIZZA (widget);
|
||||
|
||||
if (win->GetThemeEnabled())
|
||||
{
|
||||
wxWindow *parent = win->GetParent();
|
||||
while (parent && !parent->IsTopLevel())
|
||||
parent = parent->GetParent();
|
||||
if (!parent)
|
||||
parent = win;
|
||||
|
||||
gtk_paint_flat_box (parent->m_widget->style,
|
||||
pizza->bin_window,
|
||||
GTK_STATE_NORMAL,
|
||||
GTK_SHADOW_NONE,
|
||||
&gdk_event->area,
|
||||
parent->m_widget,
|
||||
(char *)"base",
|
||||
0, 0, -1, -1);
|
||||
}
|
||||
#endif
|
||||
|
||||
win->GetUpdateRegion().Union( gdk_event->area.x,
|
||||
gdk_event->area.y,
|
||||
gdk_event->area.width,
|
||||
gdk_event->area.height );
|
||||
|
||||
// Actual redrawing takes place in idle time.
|
||||
win->Update();
|
||||
win->GtkUpdate();
|
||||
|
||||
#ifdef __WXGTK20__
|
||||
|
||||
@ -686,7 +664,7 @@ static void gtk_window_draw_callback( GtkWidget *widget,
|
||||
|
||||
// Actual redrawing takes place in idle time.
|
||||
|
||||
win->Update();
|
||||
win->GtkUpdate();
|
||||
|
||||
#ifndef __WXUNIVERSAL__
|
||||
// Redraw child widgets
|
||||
@ -2902,7 +2880,7 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
|
||||
void wxWindowGTK::OnInternalIdle()
|
||||
{
|
||||
// Update invalidated regions.
|
||||
Update();
|
||||
GtkUpdate();
|
||||
|
||||
// Synthetize activate events.
|
||||
if ( g_sendActivateEvent != -1 )
|
||||
@ -3500,6 +3478,11 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect )
|
||||
}
|
||||
|
||||
void wxWindowGTK::Update()
|
||||
{
|
||||
GtkUpdate();
|
||||
}
|
||||
|
||||
void wxWindowGTK::GtkUpdate()
|
||||
{
|
||||
#ifdef __WXGTK20__
|
||||
if (m_wxwindow && GTK_PIZZA(m_wxwindow)->bin_window)
|
||||
@ -3538,11 +3521,41 @@ void wxWindowGTK::GtkSendPaintEvents()
|
||||
}
|
||||
gdk_gc_set_foreground( g_eraseGC, m_backgroundColour.GetColor() );
|
||||
|
||||
// widget to draw on
|
||||
GtkPizza *pizza = GTK_PIZZA (m_wxwindow);
|
||||
|
||||
// find ancestor from which to steal background
|
||||
wxWindow *parent = GetParent();
|
||||
while (parent && !parent->IsTopLevel())
|
||||
parent = parent->GetParent();
|
||||
if (!parent)
|
||||
parent = this;
|
||||
|
||||
wxRegionIterator upd( m_clearRegion );
|
||||
while (upd)
|
||||
{
|
||||
gdk_draw_rectangle( GTK_PIZZA(m_wxwindow)->bin_window, g_eraseGC, 1,
|
||||
upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
|
||||
if (GetThemeEnabled())
|
||||
{
|
||||
GdkRectangle rect;
|
||||
rect.x = upd.GetX();
|
||||
rect.y = upd.GetY();
|
||||
rect.width = upd.GetWidth();
|
||||
rect.height = upd.GetHeight();
|
||||
|
||||
gtk_paint_flat_box( parent->m_widget->style,
|
||||
pizza->bin_window,
|
||||
GTK_STATE_NORMAL,
|
||||
GTK_SHADOW_NONE,
|
||||
&rect,
|
||||
parent->m_widget,
|
||||
(char *)"base",
|
||||
0, 0, -1, -1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_draw_rectangle( pizza->bin_window, g_eraseGC, 1,
|
||||
upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
|
||||
}
|
||||
upd ++;
|
||||
}
|
||||
}
|
||||
@ -3619,7 +3632,7 @@ void wxWindowGTK::Clear()
|
||||
m_clearRegion.Union( 0,0,size.x,size.y );
|
||||
|
||||
// Better do this in idle?
|
||||
Update();
|
||||
GtkUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user