radiobox gets frames again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2361
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
const wxPoint &pos, const wxSize &size )
: wxScrolledWindow( parent, id, pos, size, wxSUNKEN_BORDER )
{
const wxPoint &pos, const wxSize &size )
: wxScrolledWindow( parent, id, pos, size, wxSUNKEN_BORDER )
{
- (void) new wxButton( this, -1, "wxButton", wxPoint(10,10) );
+
+// (void) new wxButton( this, -1, "wxButton", wxPoint(10,10) );
- (void) new wxTextCtrl( this, -1, "wxTextCtrl", wxPoint(10,50) );
+// (void) new wxTextCtrl( this, -1, "wxTextCtrl", wxPoint(10,50) );
- (void) new wxCheckBox( this, -1, "Disable", wxPoint(10,90) );
+ (void) new wxRadioButton( this, -1, "Disable", wxPoint(10,90) );
- (void) new wxComboBox( this, -1, "This", wxPoint(10,130), wxDefaultSize, 5, choices );
+// (void) new wxComboBox( this, -1, "This", wxPoint(10,130), wxDefaultSize, 5, choices );
- (void) new wxRadioBox( this, -1, "This", wxPoint(10,200), wxDefaultSize, 5, choices );
+// (void) new wxRadioBox( this, -1, "This", wxPoint(10,200), wxDefaultSize, 5, choices );
void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
{
void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
{
wxPaintDC dc( this );
PrepareDC( dc );
wxPaintDC dc( this );
PrepareDC( dc );
- if ((m_windowStyle & wxNO_BORDER) == 0)
+ if ((m_windowStyle & wxNO_BORDER) != 0)
gtk_widget_hide( m_widget );
wxNode *node = m_boxes.First();
gtk_widget_hide( m_widget );
wxNode *node = m_boxes.First();
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
wxPrintf( win->GetClassInfo()->GetClassName() );
wxPrintf( _T(".\n") );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
wxPrintf( win->GetClassInfo()->GetClassName() );
wxPrintf( _T(".\n") );
+
+ wxPrintf( _T("keyval: %d.\n"), (int) gdk_event->keyval );
wxCHECK_RET( m_wxwindow != NULL, _T("window needs client area for scrolling") );
wxCHECK_RET( m_wxwindow != NULL, _T("window needs client area for scrolling") );
- wxNode *node = m_children.First();
- while (node)
- wxWindow *child = (wxWindow*) node->Data();
- child->Move( child->m_x + dx, child->m_y + dy );
- node = node->Next();
+ m_scrollGC = gdk_gc_new( m_wxwindow->window );
+ gdk_gc_set_exposures( m_scrollGC, TRUE );
}
int cw = 0;
int ch = 0;
GetClientSize( &cw, &ch );
}
int cw = 0;
int ch = 0;
GetClientSize( &cw, &ch );
int w = cw - abs(dx);
int h = ch - abs(dy);
int w = cw - abs(dx);
int h = ch - abs(dy);
if ((h < 0) || (w < 0))
{
Refresh();
if ((h < 0) || (w < 0))
{
Refresh();
- int s_x = 0;
- int s_y = 0;
- if (dx < 0) s_x = -dx;
- if (dy < 0) s_y = -dy;
- int d_x = 0;
- int d_y = 0;
- if (dx > 0) d_x = dx;
- if (dy > 0) d_y = dy;
-
- if (!m_scrollGC)
- m_scrollGC = gdk_gc_new( m_wxwindow->window );
- gdk_gc_set_exposures( m_scrollGC, TRUE );
- }
+ int s_x = 0;
+ int s_y = 0;
+ if (dx < 0) s_x = -dx;
+ if (dy < 0) s_y = -dy;
+ int d_x = 0;
+ int d_y = 0;
+ if (dx > 0) d_x = dx;
+ if (dy > 0) d_y = dy;
+
+ gdk_window_copy_area( m_wxwindow->window, m_scrollGC, d_x, d_y,
+ m_wxwindow->window, s_x, s_y, w, h );
- gdk_window_copy_area( m_wxwindow->window, m_scrollGC, d_x, d_y,
- m_wxwindow->window, s_x, s_y, w, h );
+ wxRect rect;
+ if (dx < 0) rect.x = cw+dx; else rect.x = 0;
+ if (dy < 0) rect.y = ch+dy; else rect.y = 0;
+ if (dy != 0) rect.width = cw; else rect.width = abs(dx);
+ if (dx != 0) rect.height = ch; else rect.height = abs(dy);
- wxRect rect;
- if (dx < 0) rect.x = cw+dx; else rect.x = 0;
- if (dy < 0) rect.y = ch+dy; else rect.y = 0;
- if (dy != 0) rect.width = cw; else rect.width = abs(dx);
- if (dx != 0) rect.height = ch; else rect.height = abs(dy);
+ Refresh( TRUE, &rect );
+ }
+
+ wxNode *node = m_children.First();
+ while (node)
+ {
+ wxWindow *child = (wxWindow*) node->Data();
+ child->Move( child->m_x + dx, child->m_y + dy );
+ node = node->Next();
+ }
- Refresh( TRUE, &rect );
}
//-------------------------------------------------------------------------------------
}
//-------------------------------------------------------------------------------------
- if ((m_windowStyle & wxNO_BORDER) == 0)
+ if ((m_windowStyle & wxNO_BORDER) != 0)
gtk_widget_hide( m_widget );
wxNode *node = m_boxes.First();
gtk_widget_hide( m_widget );
wxNode *node = m_boxes.First();
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
wxPrintf( win->GetClassInfo()->GetClassName() );
wxPrintf( _T(".\n") );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
wxPrintf( win->GetClassInfo()->GetClassName() );
wxPrintf( _T(".\n") );
+
+ wxPrintf( _T("keyval: %d.\n"), (int) gdk_event->keyval );
wxCHECK_RET( m_wxwindow != NULL, _T("window needs client area for scrolling") );
wxCHECK_RET( m_wxwindow != NULL, _T("window needs client area for scrolling") );
- wxNode *node = m_children.First();
- while (node)
- wxWindow *child = (wxWindow*) node->Data();
- child->Move( child->m_x + dx, child->m_y + dy );
- node = node->Next();
+ m_scrollGC = gdk_gc_new( m_wxwindow->window );
+ gdk_gc_set_exposures( m_scrollGC, TRUE );
}
int cw = 0;
int ch = 0;
GetClientSize( &cw, &ch );
}
int cw = 0;
int ch = 0;
GetClientSize( &cw, &ch );
int w = cw - abs(dx);
int h = ch - abs(dy);
int w = cw - abs(dx);
int h = ch - abs(dy);
if ((h < 0) || (w < 0))
{
Refresh();
if ((h < 0) || (w < 0))
{
Refresh();
- int s_x = 0;
- int s_y = 0;
- if (dx < 0) s_x = -dx;
- if (dy < 0) s_y = -dy;
- int d_x = 0;
- int d_y = 0;
- if (dx > 0) d_x = dx;
- if (dy > 0) d_y = dy;
-
- if (!m_scrollGC)
- m_scrollGC = gdk_gc_new( m_wxwindow->window );
- gdk_gc_set_exposures( m_scrollGC, TRUE );
- }
+ int s_x = 0;
+ int s_y = 0;
+ if (dx < 0) s_x = -dx;
+ if (dy < 0) s_y = -dy;
+ int d_x = 0;
+ int d_y = 0;
+ if (dx > 0) d_x = dx;
+ if (dy > 0) d_y = dy;
+
+ gdk_window_copy_area( m_wxwindow->window, m_scrollGC, d_x, d_y,
+ m_wxwindow->window, s_x, s_y, w, h );
- gdk_window_copy_area( m_wxwindow->window, m_scrollGC, d_x, d_y,
- m_wxwindow->window, s_x, s_y, w, h );
+ wxRect rect;
+ if (dx < 0) rect.x = cw+dx; else rect.x = 0;
+ if (dy < 0) rect.y = ch+dy; else rect.y = 0;
+ if (dy != 0) rect.width = cw; else rect.width = abs(dx);
+ if (dx != 0) rect.height = ch; else rect.height = abs(dy);
- wxRect rect;
- if (dx < 0) rect.x = cw+dx; else rect.x = 0;
- if (dy < 0) rect.y = ch+dy; else rect.y = 0;
- if (dy != 0) rect.width = cw; else rect.width = abs(dx);
- if (dx != 0) rect.height = ch; else rect.height = abs(dy);
+ Refresh( TRUE, &rect );
+ }
+
+ wxNode *node = m_children.First();
+ while (node)
+ {
+ wxWindow *child = (wxWindow*) node->Data();
+ child->Move( child->m_x + dx, child->m_y + dy );
+ node = node->Next();
+ }
- Refresh( TRUE, &rect );
}
//-------------------------------------------------------------------------------------
}
//-------------------------------------------------------------------------------------