git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14865
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#define NOTEBOOK_PANEL(nb) GTK_NOTEBOOK(nb)->panel
#endif
#define NOTEBOOK_PANEL(nb) GTK_NOTEBOOK(nb)->panel
#endif
-// VZ: I _think_ that in GTK+ 2.0 the scroll type is passed to the
-// value_changed callback as a 2nd argument but I'm not at all sure about
-// it, if this is false all occurences of this macro must be changed!
- #define SCROLLBAR_CBACK_ARG GtkScrollType scrollType,
- #define GET_SCROLL_TYPE(w) scrollType
+ #define SCROLLBAR_CBACK_ARG
+ #define GET_SCROLL_TYPE(w) GTK_SCROLL_JUMP
#else
#define SCROLLBAR_CBACK_ARG
#define GET_SCROLL_TYPE(w) GTK_RANGE((w))->scroll_type
#else
#define SCROLLBAR_CBACK_ARG
#define GET_SCROLL_TYPE(w) GTK_RANGE((w))->scroll_type
#define NOTEBOOK_PANEL(nb) GTK_NOTEBOOK(nb)->panel
#endif
#define NOTEBOOK_PANEL(nb) GTK_NOTEBOOK(nb)->panel
#endif
-// VZ: I _think_ that in GTK+ 2.0 the scroll type is passed to the
-// value_changed callback as a 2nd argument but I'm not at all sure about
-// it, if this is false all occurences of this macro must be changed!
- #define SCROLLBAR_CBACK_ARG GtkScrollType scrollType,
- #define GET_SCROLL_TYPE(w) scrollType
+ #define SCROLLBAR_CBACK_ARG
+ #define GET_SCROLL_TYPE(w) GTK_SCROLL_JUMP
#else
#define SCROLLBAR_CBACK_ARG
#define GET_SCROLL_TYPE(w) GTK_RANGE((w))->scroll_type
#else
#define SCROLLBAR_CBACK_ARG
#define GET_SCROLL_TYPE(w) GTK_RANGE((w))->scroll_type
void OnPaint( wxPaintEvent &event );
void OnEraseBackground( wxEraseEvent &event );
void OnPaint( wxPaintEvent &event );
void OnEraseBackground( wxEraseEvent &event );
private:
DECLARE_EVENT_TABLE()
private:
DECLARE_EVENT_TABLE()
wxScrolledWindowStyle|wxNO_FULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER )
{
SetScrollbars( 10, 10, 40, 100, 0, 0 );
wxScrolledWindowStyle|wxNO_FULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER )
{
SetScrollbars( 10, 10, 40, 100, 0, 0 );
+
+ m_bitmap = wxBitmap( mondrian_xpm );
+
+ new wxStaticBitmap( this, -1, m_bitmap, wxPoint(80,20) );
}
void MyCanvas::OnPaint( wxPaintEvent &event )
}
void MyCanvas::OnPaint( wxPaintEvent &event )
wxPaintDC dc(this);
PrepareDC( dc );
wxPaintDC dc(this);
PrepareDC( dc );
+ dc.SetBrush( *wxBLACK_BRUSH );
+ dc.DrawRectangle( 0,0,200,50 );
+
+ dc.DrawBitmap( m_bitmap, 10, 20, TRUE );
+
#if 0
wxRegionIterator upd( GetUpdateRegion() );
while (upd)
#if 0
wxRegionIterator upd( GetUpdateRegion() );
while (upd)
/* XPM */
static char *mondrian_xpm[] = {
/* columns rows colors chars-per-pixel */
/* XPM */
static char *mondrian_xpm[] = {
/* columns rows colors chars-per-pixel */
" c Black",
". c Blue",
"X c #00bf00",
"o c Red",
"O c Yellow",
"+ c Gray100",
" c Black",
". c Blue",
"X c #00bf00",
"o c Red",
"O c Yellow",
"+ c Gray100",
/* pixels */
" ",
" oooooo +++++++++++++++++++++++ ",
/* pixels */
" ",
" oooooo +++++++++++++++++++++++ ",
" ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
+" ++++++ +aaaaaaaaaaaaaaaa+ .... ",
+" ++++++ +aaaaaaaaaaaaaaaa+ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
-" ++++++ ++++++++++++++++++ .... ",
-" ++++++ ++++++++++++++++++ .... ",
-" ++++++ ++++++++++++++++++ ",
-" ++++++ ++++++++++++++++++ ++++ ",
-" ++++++ ++++++++++++++++++ ++++ ",
-" ++++++ ++++++++++++++++++ ++++ ",
+" ++++++ +aaaaaaaaaaaaaaaa+ ",
+" ++++++ +aaaaaaaaaaaaaaaa+ ++++ ",
+" ++++++ +aaaaaaaaaaaaaaaa+ ++++ ",
+" ++++++ +aaaaaaaaaaaaaaaa+ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
m_clipPaintRegion = FALSE;
#else
m_clipPaintRegion = FALSE;
#else
- gdk_window_scroll( GTK_PIZZA(m_wxwindow)->bin_window, -dx, -dy );
+ gdk_window_scroll( GTK_PIZZA(m_wxwindow)->bin_window, dx, dy );
- GTK_PIZZA(m_wxwindow)->xoffset -= dx;
- GTK_PIZZA(m_wxwindow)->yoffset -= dy;
+ GTK_PIZZA(m_wxwindow)->xoffset += dx;
+ GTK_PIZZA(m_wxwindow)->yoffset += dy;
m_clipPaintRegion = FALSE;
#else
m_clipPaintRegion = FALSE;
#else
- gdk_window_scroll( GTK_PIZZA(m_wxwindow)->bin_window, -dx, -dy );
+ gdk_window_scroll( GTK_PIZZA(m_wxwindow)->bin_window, dx, dy );
- GTK_PIZZA(m_wxwindow)->xoffset -= dx;
- GTK_PIZZA(m_wxwindow)->yoffset -= dy;
+ GTK_PIZZA(m_wxwindow)->xoffset += dx;
+ GTK_PIZZA(m_wxwindow)->yoffset += dy;