int command = ancestor->GetAcceleratorTable()->GetCommand( event );
if (command != -1)
{
- wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command );
+ wxCommandEvent command_event( wxEVT_MENU, command );
ret = ancestor->HandleWindowEvent( command_event );
break;
}
if ( btnCancel )
{
- wxCommandEvent eventClick(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
+ wxCommandEvent eventClick(wxEVT_BUTTON, wxID_CANCEL);
eventClick.SetEventObject(btnCancel);
ret = btnCancel->HandleWindowEvent(eventClick);
}
if (event.GetEventType() == wxEVT_MOUSEWHEEL)
{
event.m_linesPerAction = 3;
+ event.m_columnsPerAction = 3;
event.m_wheelDelta = 120;
if (((GdkEventButton*)gdk_event)->button == 4)
event.m_wheelRotation = 120;
break;
default:
- // unknwon button, don't process
+ // unknown button, don't process
return FALSE;
}
GtkUpdate();
wxCursor cursor = m_cursor;
- if (g_globalCursor.Ok()) cursor = g_globalCursor;
+ if (g_globalCursor.IsOk()) cursor = g_globalCursor;
- if (cursor.Ok())
+ if (cursor.IsOk())
{
/* I now set the cursor anew in every OnInternalIdle call
as setting the cursor in a parent window also effects the
if (window)
gdk_window_set_cursor( window, cursor.GetCursor() );
- if (!g_globalCursor.Ok())
+ if (!g_globalCursor.IsOk())
cursor = *wxSTANDARD_CURSOR;
window = m_widget->window;
wxCHECK_MSG( (m_widget != NULL), 12, wxT("invalid window") );
wxFont font = GetFont();
- wxCHECK_MSG( font.Ok(), 12, wxT("invalid font") );
+ wxCHECK_MSG( font.IsOk(), 12, wxT("invalid font") );
GdkFont *gfont = font.GetInternalFont( 1.0 );
wxCHECK_MSG( (m_widget != NULL), 8, wxT("invalid window") );
wxFont font = GetFont();
- wxCHECK_MSG( font.Ok(), 8, wxT("invalid font") );
+ wxCHECK_MSG( font.IsOk(), 8, wxT("invalid font") );
GdkFont *gfont = font.GetInternalFont( 1.0 );
{
wxFont fontToUse = theFont ? *theFont : GetFont();
- wxCHECK_RET( fontToUse.Ok(), wxT("invalid font") );
+ wxCHECK_RET( fontToUse.IsOk(), wxT("invalid font") );
if (string.empty())
{
if (!wxWindowBase::SetBackgroundColour(colour))
return false;
- if (colour.Ok())
+ if (colour.IsOk())
{
// We need the pixel value e.g. for background clearing.
m_backgroundColour.CalcPixel(gtk_widget_get_colormap(m_widget));
return false;
}
- if (colour.Ok())
+ if (colour.IsOk())
{
// We need the pixel value e.g. for background clearing.
m_foregroundColour.CalcPixel(gtk_widget_get_colormap(m_widget));
{
// do we need to apply any changes at all?
if ( !forceStyle &&
- !m_font.Ok() &&
- !m_foregroundColour.Ok() && !m_backgroundColour.Ok() )
+ !m_font.IsOk() &&
+ !m_foregroundColour.IsOk() && !m_backgroundColour.IsOk() )
{
return NULL;
}
GtkRcStyle *style = gtk_rc_style_new();
- if ( m_font.Ok() )
+ if ( m_font.IsOk() )
{
wxString xfontname = m_font.GetNativeFontInfo()->GetXFontName();
style->fontset_name = g_strdup(xfontname.c_str());
}
- if ( m_foregroundColour.Ok() )
+ if ( m_foregroundColour.IsOk() )
{
GdkColor *fg = m_foregroundColour.GetColor();
style->color_flags[GTK_STATE_ACTIVE] = GTK_RC_FG;
}
- if ( m_backgroundColour.Ok() )
+ if ( m_backgroundColour.IsOk() )
{
GdkColor *bg = m_backgroundColour.GetColor();
wxCHECK_RET( window, wxT("CaptureMouse() failed") );
const wxCursor* cursor = &m_cursor;
- if (!cursor->Ok())
+ if (!cursor->IsOk())
cursor = wxSTANDARD_CURSOR;
gdk_pointer_grab( window, FALSE,