Ejemplo n.º 1
0
bool
dlgFontEditShowModal(const TCHAR * FontDescription,
                     LOGFONT &log_font,
                     LOGFONT autoLogFont)
{
  bool bRetVal = false;

  wf = LoadDialog(CallBackTable,
                      XCSoarInterface::main_window, _T("IDR_XML_FONTEDIT"));
  if (wf == NULL)
    return false;

  NewLogFont = log_font;
  resetLogFont = autoLogFont;

  InitGUI(FontDescription);
  LoadGUI();

  if (wf->ShowModal() == mrOK) {
    log_font = NewLogFont;
    bRetVal = true;
  }

  delete wf;

  return bRetVal;
}
Ejemplo n.º 2
0
static void
OnResetClicked(WndButton &Sender)
{
  (void)Sender;

  NewLogFont = resetLogFont;
  LoadGUI();
}
Ejemplo n.º 3
0
bool dlgFontEditShowModal(const TCHAR * FontDescription, 
                          const TCHAR * FontRegKey, 
                          LOGFONT autoLogFont){

  bool bRetVal=false;
  char filename[MAX_PATH];
  IsInitialized=false;

  LocalPathS(filename, TEXT("dlgFontEdit.xml"));
  wf = dlgLoadFromXML(CallBackTable, 
                      filename, 
		      hWndMainWindow,
		      TEXT("IDR_XML_FONTEDIT"));


  int UseCustomFontsold = UseCustomFonts; 
  UseCustomFonts=1;// global var
  InitializeOneFont (&NewFont, 
                        FontRegKey, 
                        autoLogFont,
                        &OriginalLogFont);
  UseCustomFonts=UseCustomFontsold;


  OriginalFontRegKey=FontRegKey;
  NewLogFont=OriginalLogFont;
  resetLogFont = autoLogFont;


  if (wf) {

    InitGUI(FontDescription);
    LoadGUI();

    if (wf->ShowModal()==mrOK) {
      SaveValues(FontRegKey);  
      bRetVal=true;
    }
    delete wf;
  }
  wf = NULL;

  return bRetVal;
}
Ejemplo n.º 4
0
static void OnResetClicked(WindowControl * Sender){
(void)Sender;

  NewLogFont=resetLogFont;
  LoadGUI();
}