/*
	WARNING: This file was generated by dkct.
	Changes you make here will be lost if dkct is run again!
	You should modify the original source and run dkct on it.
	Original source: DkWxTraceFrame.wxc
*/

/*
Copyright (C) 2011, Dirk Krause

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
  this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above opyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.
* Neither the name of the author nor the names of contributors may be used
  to endorse or promote products derived from this software without specific
  prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/**	@file DkWxTraceFrame.cpp The DkWxTraceFrame module.
*/


#line 174 "DkWxTraceFrame.wxc"


#include "dkwxtrace.h"

/*
	Icons and bitmaps
*/
#include "dkicon.xpm"
#include "choose-dir.xpm"
#include "exit-program.xpm"
#include "run-conversion.xpm"
#include "set-options.xpm"



#line 188 "DkWxTraceFrame.wxc"



/**	Event table for the DkWxTraceFrame class.
 */
BEGIN_EVENT_TABLE(DkWxTraceFrame, wxFrame)
    EVT_MENU(DkWxTrace_Quit,  DkWxTraceFrame::OnQuit)
    EVT_MENU(DkWxTrace_About, DkWxTraceFrame::OnAbout)
    EVT_MENU(DkWxTrace_ChooseDirectory, DkWxTraceFrame::OnChooseDirectory)
    EVT_MENU(DkWxTrace_SetOptions, DkWxTraceFrame::OnSetOptions)
    EVT_MENU(DkWxTrace_Run, DkWxTraceFrame::OnRunConversion)
END_EVENT_TABLE()





#line 205 "DkWxTraceFrame.wxc"
DkWxTraceFrame::DkWxTraceFrame(
  wxChar const		*applicationName,
  wxChar const * const	*messageTexts,
  DkWxAppHelper		*applicationHelper,
  int			 wxid
) : DkWxFrame(applicationName, applicationHelper, wxid)
{
  

#line 213 "DkWxTraceFrame.wxc"
  sTexts = messageTexts;
  wxIcon	dkicon_bitmap(dkicon_xpm);
  dkctGUILayoutOK = false;
  dkctGUIContentsPanel = NULL;
  mbMain = NULL;
  mainSizer = NULL;
  tbMain = NULL;
  bDir = NULL;
  bOptions = NULL;
  bRun = NULL;
  bExit = NULL;
  menuFile = NULL;
  menuHelp = NULL;
  miFileExit = NULL;
  miFileAbout = NULL;
  verticalSizer = NULL;
  contentsSizer = NULL;
  lDirectory = NULL;
  tDirectory = NULL;
  lLines = NULL;
  tLines = NULL;
  lDebug = NULL;
  tDebug = NULL;
  dkctGUIContentsPanel = new wxPanel(this);
  if(!(dkctGUIContentsPanel)) {
    goto dkctGUILayoutFinished;
  }
#if wxUSE_MENUS
  mbMain = new wxMenuBar(
  );
  if(!(mbMain)) {
    goto dkctGUILayoutFinished;
  }
  menuFile = new wxMenu(
  );
  if(!(menuFile)) {
    goto dkctGUILayoutFinished;
  }
  miFileExit = menuFile->Append(
    DkWxTrace_Quit,
    sTexts[5],
    sTexts[7]
  );
  if(!(miFileExit)) {
    goto dkctGUILayoutFinished;
  }
  mbMain->Append(menuFile, sTexts[3]);
  menuHelp = new wxMenu(
  );
  if(!(menuHelp)) {
    goto dkctGUILayoutFinished;
  }
  miFileAbout = menuHelp->Append(
    DkWxTrace_About,
    sTexts[6],
    sTexts[8]
  );
  if(!(miFileAbout)) {
    goto dkctGUILayoutFinished;
  }
  mbMain->Append(menuHelp, sTexts[4]);
  SetMenuBar(mbMain);
#endif
#if wxUSE_TOOLBAR
  tbMain = new wxToolBar(
    this,
    wxID_ANY
  );
  if(!(tbMain)) {
    goto dkctGUILayoutFinished;
  }
  bDir = tbMain->AddTool(
    DkWxTrace_ChooseDirectory,
    sTexts[17],
    choose_dir_xpm,
    wxNullBitmap,
    wxITEM_NORMAL,
    sTexts[21]
  );
  if(!(bDir)) {
    goto dkctGUILayoutFinished;
  }
  bOptions = tbMain->AddTool(
    DkWxTrace_SetOptions,
    sTexts[18],
    set_options_xpm,
    wxNullBitmap,
    wxITEM_NORMAL,
    sTexts[22]
  );
  if(!(bOptions)) {
    goto dkctGUILayoutFinished;
  }
  bRun = tbMain->AddTool(
    DkWxTrace_Run,
    sTexts[19],
    run_conversion_xpm,
    wxNullBitmap,
    wxITEM_NORMAL,
    sTexts[23]
  );
  if(!(bRun)) {
    goto dkctGUILayoutFinished;
  }
  bExit = tbMain->AddTool(
    DkWxTrace_Quit,
    sTexts[20],
    exit_program_xpm,
    wxNullBitmap,
    wxITEM_NORMAL,
    sTexts[24]
  );
  if(!(bExit)) {
    goto dkctGUILayoutFinished;
  }
  tbMain->Realize();
  SetToolBar(tbMain);
#endif
  mainSizer = new wxBoxSizer(
    wxHORIZONTAL
  );
  if(!(mainSizer)) {
    goto dkctGUILayoutFinished;
  }
  mainSizer->Add(10, 10, 1);
  verticalSizer = new wxBoxSizer(
    wxVERTICAL
  );
  if(!(verticalSizer)) {
    goto dkctGUILayoutFinished;
  }
  verticalSizer->Add(10, 10, 1);
  contentsSizer = new wxGridBagSizer(
    5, 5
  );
  if(!(contentsSizer)) {
    goto dkctGUILayoutFinished;
  }
  lDirectory = new wxStaticText(
    dkctGUIContentsPanel,
    wxID_ANY,
    sTexts[11]
  );
  if(!(lDirectory)) {
    goto dkctGUILayoutFinished;
  }
  contentsSizer->Add(
    lDirectory,
    wxGBPosition(0, 0),
    wxGBSpan(1, 1)
  );
  tDirectory = new wxStaticText(
    dkctGUIContentsPanel,
    wxID_ANY,
    sTexts[25]
  );
  if(!(tDirectory)) {
    goto dkctGUILayoutFinished;
  }
  contentsSizer->Add(
    tDirectory,
    wxGBPosition(0, 1),
    wxGBSpan(1, 1)
  );
  lLines = new wxStaticText(
    dkctGUIContentsPanel,
    wxID_ANY,
    sTexts[13]
  );
  if(!(lLines)) {
    goto dkctGUILayoutFinished;
  }
  contentsSizer->Add(
    lLines,
    wxGBPosition(1, 0),
    wxGBSpan(1, 1)
  );
  tLines = new wxStaticText(
    dkctGUIContentsPanel,
    wxID_ANY,
    sTexts[14]
  );
  if(!(tLines)) {
    goto dkctGUILayoutFinished;
  }
  contentsSizer->Add(
    tLines,
    wxGBPosition(1, 1),
    wxGBSpan(1, 1)
  );
  lDebug = new wxStaticText(
    dkctGUIContentsPanel,
    wxID_ANY,
    sTexts[12]
  );
  if(!(lDebug)) {
    goto dkctGUILayoutFinished;
  }
  contentsSizer->Add(
    lDebug,
    wxGBPosition(2, 0),
    wxGBSpan(1, 1)
  );
  tDebug = new wxStaticText(
    dkctGUIContentsPanel,
    wxID_ANY,
    sTexts[15]
  );
  if(!(tDebug)) {
    goto dkctGUILayoutFinished;
  }
  contentsSizer->Add(
    tDebug,
    wxGBPosition(2, 1),
    wxGBSpan(1, 1)
  );
  verticalSizer->Add(
    contentsSizer
  );
  verticalSizer->Add(10, 10, 1);
  mainSizer->Add(
    verticalSizer
  );
  mainSizer->Add(10, 10, 1);
  dkctGUIContentsPanel->SetSizer(mainSizer);
  SetIcon(dkicon_bitmap);
  dkctGUILayoutOK = true;
  dkctGUILayoutFinished:
#if wxUSE_STATUSBAR
  if(dkctGUILayoutOK) {
    CreateStatusBar(1);
    SetStatusText(sTexts[10]);
  }
#endif
  if(dkctGUILayoutOK) {
    mainSizer->Fit(this);
    mainSizer->SetSizeHints(this);
  }

#line 216 "DkWxTraceFrame.wxc"
  

#line 217 "DkWxTraceFrame.wxc"
  restorePosition();
  

#line 219 "DkWxTraceFrame.wxc"
}


#line 222 "DkWxTraceFrame.wxc"


void DkWxTraceFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
  Close();
}


void DkWxTraceFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
  

#line 233 "DkWxTraceFrame.wxc"
  

#line 234 "DkWxTraceFrame.wxc"
}

void DkWxTraceFrame::OnChooseDirectory(wxCommandEvent& WXUNUSED(event))
{
  

#line 239 "DkWxTraceFrame.wxc"
  

#line 240 "DkWxTraceFrame.wxc"
}

void DkWxTraceFrame::OnSetOptions(wxCommandEvent& WXUNUSED(event))
{
  

#line 245 "DkWxTraceFrame.wxc"
  {
    DkWxTraceOptionsDialog dlg((DkWxTraceFrame *)this, sTexts[30], sTexts);
    dlg.ShowModal();
  }
  

#line 250 "DkWxTraceFrame.wxc"
}

void DkWxTraceFrame::OnRunConversion(wxCommandEvent& WXUNUSED(event))
{
  

#line 255 "DkWxTraceFrame.wxc"
  

#line 256 "DkWxTraceFrame.wxc"
}

