bool m_hasFocus:1; // true if == FindFocus()
bool m_isScrolling:1; // dragging scrollbar thumb?
bool m_clipPaintRegion:1; // true after ScrollWindow()
+ wxRegion m_nativeUpdateRegion; // not transformed for RTL
bool m_dirtyTabOrder:1; // tab order changed, GTK focus
// chain needs update
bool m_needsStyleChange:1; // May not be able to change
if ( !parent->GetEventHandler()->ProcessEvent( keyEvt ) )
{
+ if (GetLayoutDirection() == wxLayout_RightToLeft)
+ {
+ if (event.GetKeyCode() == WXK_RIGHT)
+ event.m_keyCode = WXK_LEFT;
+ else if (event.GetKeyCode() == WXK_LEFT)
+ event.m_keyCode = WXK_RIGHT;
+ }
+
// try local handlers
switch ( event.GetKeyCode() )
{
rect.width -= penWidth - 1;
rect.height -= penWidth - 1;
+#ifdef __WXGTK__
+ // FIXME: why is the rect drawn off-by-one?
+ if ((penWidth == 2) && (GetLayoutDirection() == wxLayout_RightToLeft))
+ rect.x -= 1;
+#endif
+
// Now draw the rectangle
// use the cellHighlightColour if the cell is inside a selection, this
// will ensure the cell is always visible.
bool wxWindowGTK::DoIsExposed( int x, int y, int w, int h ) const
{
+#if 0
if (GetLayoutDirection() == wxLayout_RightToLeft)
return m_updateRegion.Contains(x-w, y, w, h) != wxOutRegion;
else
+#endif
return m_updateRegion.Contains(x, y, w, h) != wxOutRegion;
}
// Clip to paint region in wxClientDC
m_clipPaintRegion = true;
-#if 0
+ m_nativeUpdateRegion = m_updateRegion;
+
if (GetLayoutDirection() == wxLayout_RightToLeft)
{
- maybe_rtl_region.Clear();
+ // Transform m_updateRegion under RTL
+ m_updateRegion.Clear();
gint width;
gdk_window_get_geometry( GTK_PIZZA(m_wxwindow)->bin_window,
NULL, NULL, &width, NULL, NULL );
- wxRegionIterator upd( m_updateRegion );
+ wxRegionIterator upd( m_nativeUpdateRegion );
while (upd)
{
wxRect rect;
rect.height = upd.GetHeight();
rect.x = width - rect.x - rect.width;
- maybe_rtl_region.Union( rect );
+ m_updateRegion.Union( rect );
++upd;
}
}
-#endif
// widget to draw on
GtkPizza *pizza = GTK_PIZZA (m_wxwindow);
if (GTK_WIDGET_MAPPED(parent->m_widget))
{
- wxRegionIterator upd( m_updateRegion );
+ wxRegionIterator upd( m_nativeUpdateRegion );
while (upd)
{
GdkRectangle rect;
m_clipPaintRegion = false;
m_updateRegion.Clear();
+ m_nativeUpdateRegion.Clear();
}
void wxWindowGTK::SetDoubleBuffered( bool on )