void MyFrame::OnEditOptions(wxCommandEvent& event)
{
  // Create a really basic dialog that gets dynamically populated
  // with controls based on the m_pSpellCheckEngine->GetOptions();
  SpellCheckerOptionsDialog OptionsDialog(this, ReturnSelectedSpellCheckEngine()->GetSpellCheckEngineName() + _T(" Options"), ReturnSelectedSpellCheckEngine());
  if (OptionsDialog.ShowModal() == wxID_OK)
  {
    // Set the modified options
    OptionsMap* pOptionsMap = OptionsDialog.GetModifiedOptions();
    if (pOptionsMap)
    {
      for (OptionsMap::iterator it = pOptionsMap->begin(); it != pOptionsMap->end(); it++)
        ReturnSelectedSpellCheckEngine()->AddOptionToMap(it->second);
    }
    ReturnSelectedSpellCheckEngine()->ApplyOptions();
  }
}
Beispiel #2
0
void cb_menu_key_down(Ewl_Widget *w, void *ev, void *data)
{
    Ewl_Widget *curwidget;
    char temp[50];
    Ewl_Event_Key_Down *e;
    e = (Ewl_Event_Key_Down*)ev;
    int k = translate_key(e);
    
    switch(k)
    {
    case 1:
        sprintf(temp,"menuitem1");
        curwidget=ewl_widget_name_find(temp);
        ewl_menu_cb_expand(curwidget,NULL,NULL);
        ewl_widget_focus_send(EWL_WIDGET(EWL_MENU(curwidget)->popup));
        int curpage=ewl_pdf_page_get(EWL_PDF(pdfwidget))+1;
        //sprintf(temp,"%d",curpage);
        ewl_text_text_set(EWL_TEXT(goto_entry),"");
        ewl_widget_focus_send(goto_entry);
        break;
    case 2:
        /*ewl_widget_hide(menu);
        opt_dlg_init();    
        ewl_window_transient_for(EWL_WINDOW(opt_dlg_widget_get()),EWL_WINDOW(win));
        ewl_widget_show(opt_dlg_widget_get());
        ewl_widget_focus_send(opt_dlg_widget_get());*/
        ewl_widget_hide(menu);
        OptionsDialog();
        
        break;
    case K_ESCAPE:
        ewl_widget_hide(menu);
        break;
    default:
        return;
    }
    
}