wx menus

Kai-Uwe Behrmann ku.b at gmx.de
Thu Apr 17 16:20:29 BST 2003


I send the menus updated only and will continue next week with the other
layout parts (controlpoint window, preferences). Funtions can allready go
in.

Thanks Bruno for the snapshot pics.

I am over the next days outdor.
Kai-Uwe
-------------- next part --------------
#ifdef __BIDE__

// Definitions for Borland IDE + debugger

#define _NO_VCL

#include "condefs.h"

#define WinMain WinMain

	//USERC("name_of_res_file.rc");

USELIB("..\..\lib\zlib.lib");

USELIB("..\..\lib\odbc32.lib");

USELIB("..\..\lib\regex.lib");

USELIB("..\..\lib\tiff.lib");

USELIB("..\..\lib\winpng.lib");

USELIB("..\..\lib\wx32ds.lib");

USELIB("..\..\lib\jpeg.lib");

USEUNIT("ptopengui_ui.cpp");

USEUNIT("ptopengui_parser.cpp");

//---------------------------------------------------------------------------

#endif



# ifdef __GNUG__

  #pragma implementation "ptopengui.h"

#endif



#include "wx/wxprec.h"

#include <wx/image.h>

#include <wx/statline.h>

#include <wx/spinbutt.h>

#include <wx/spinctrl.h>

#include <wx/splitter.h>

#include <wx/listctrl.h>

#include <wx/treectrl.h>

#include <wx/notebook.h>

#include <wx/grid.h>

#ifdef __BORLANDC__

  #pragma hdrstop

#endif



#include "ptopengui.h"



#if defined(__WXGTK__) || defined(__WXMOTIF__)

  #include "ptopengui.xpm"

#endif



BEGIN_EVENT_TABLE(MainFrame,wxFrame)

  EVT_MENU(ID_TEST, MainFrame::OnTest)

  EVT_MENU(ID_OPEN, MainFrame::OnOpen)

  EVT_MENU(ID_SAVE, MainFrame::OnSave)

  EVT_MENU(ID_EDIT, MainFrame::OnEdit)

  EVT_BUTTON(ID_EDIT, MainFrame::OnEdit)

  EVT_MENU(ID_QUIT, MainFrame::OnQuit)

  EVT_CLOSE(MainFrame::OnCloseWindow)

  EVT_MENU(ID_ABOUT, MainFrame::OnAbout)

END_EVENT_TABLE()



MainFrame::MainFrame( wxWindow *parent, wxWindowID id, const wxString &title,

   const wxPoint &position, const wxSize& size, long style )

   : wxFrame( parent, id, title, position, size, style )

{

  CreateMainMenuBar();



  // the notebook

  main_panel = (wxPanel*) NULL;

  main_panel = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxCLIP_CHILDREN);

  DialogFunc( main_panel, TRUE , TRUE );



#if wxUSE_STATUSBAR

  CreateStatusBar(2);

  SetStatusText( wxT("PTOpenGui is ready") );

#endif



  SetIcon(wxICON(ptopengui));

}



void MainFrame::CreateMainMenuBar()

{

#ifdef __WXMAC__

  wxApp::s_macAboutMenuItemId = ID_ABOUT;

#endif



  wxMenu *file_menu = new wxMenu;

  file_menu->Append( ID_ABOUT, wxT("New"), wxT("New project") );

  file_menu->Append( ID_OPEN, wxT("&Open project\tCtrl-o"), wxT("") );

  file_menu->Append( ID_SAVE, wxT("&Save project\tCtrl-s"), wxT("") );

  file_menu->Append( ID_TEST, wxT("Save project As"), wxT("") );

  file_menu->Append( ID_TEST, wxT("Close project"), wxT("") );

  file_menu->Append( ID_TEST, wxT("Preferences"), wxT("") );

  file_menu->AppendSeparator();

  file_menu->Append( ID_QUIT, wxT("E&xit\tCtrl-x"), wxT("Quit PTOpenGui") );



  wxMenu *edit_menu = new wxMenu;

  edit_menu->Append( ID_EDIT, wxT("Project in text format\tF2"), wxT("Set parameters. view datas") );

  edit_menu->Append( ID_ABOUT, wxT("Fine tune control point"), wxT("Experimental function") );

  edit_menu->Append( ID_ABOUT, wxT("Add control point"), wxT("Same function as add button") );

  edit_menu->Append( ID_ABOUT, wxT("Update control point"), wxT("Same function as update button") );



  wxMenu *view_menu = new wxMenu;

  view_menu->Append( ID_ABOUT, wxT("&Control point table\tF3"), wxT("Shows all controlpoint distances") );

  view_menu->Append( ID_ABOUT, wxT("&Optimized control points"), wxT("Last optimization result") );

  view_menu->Append( ID_ABOUT, wxT("&Last preview stitch"), wxT("") );



  wxMenu *opts_menu = new wxMenu;

  opts_menu->Append( ID_ABOUT, wxT("&Hide statusbar"), wxT("Toggle statusbar visibility"), TRUE );

  opts_menu->Append( ID_ABOUT, wxT("&Auto optimization\tF4"), wxT("Toggle optimization status"), TRUE );

  opts_menu->Append( ID_ABOUT, wxT("&Other\tF8"), wxT("General settings") );



  wxMenu *exec_menu = new wxMenu;

  exec_menu->Append( ID_ABOUT, wxT("&Optimization\tCtrl-r"), wxT("Optimize with current parameters") );

  exec_menu->Append( ID_ABOUT, wxT("&Accept previous optimization result\tCtrl-Alt-a"), wxT("Last result was OK?") );

  exec_menu->Append( ID_ABOUT, wxT("&Preview\tCtrl-p"), wxT("") );



  wxMenu *help_menu = new wxMenu;

  help_menu->Append( ID_ABOUT, wxT("About") );



  wxMenuBar *menu_bar = new wxMenuBar();

  menu_bar->Append( file_menu, wxT("&File") );

  menu_bar->Append( edit_menu, wxT("&Edit") );

  menu_bar->Append( view_menu, wxT("&View") );

  menu_bar->Append( opts_menu, wxT("&Options") );

  menu_bar->Append( exec_menu, wxT("&Execute") );

  menu_bar->Append( help_menu, wxT("&Help") );



#ifndef __WIN95__

  // commented in Win95 by JuHe as assert says that this cannot be checked

  menu_bar->Check(ID_ABOUT, TRUE);

#endif



  SetMenuBar( menu_bar );

}



void MainFrame::OnOpen( wxCommandEvent &event )

{

  wxString str;

  wxFileDialog *dlg = new wxFileDialog(this,wxT("Open project file"), "", "",

	"Project files (*.pto)|*.pto|All files (*.*)|*.*", wxOPEN, wxDefaultPosition);

  if (dlg->ShowModal() == wxID_OK) {

	str = dlg->GetFilename();

	SetStatusText( wxT("Open project: ")+str);

  } else {

	// do not close old project

  }

  dlg->Destroy();

  if (str == wxT("")) {

	// nothing to open

	SetStatusText( wxT("Open project: cancel"));

	return;

  }

  // parse project

  //OpenProject(str);

  // store current project name as last opened project

#if 0

	// code from: TFormMain::Open1Click(TObject *Sender)

	AnsiString str;

	if (Sender != 0) {

		//CloseProjectClick(0);

		TRegistry &regKey = *new TRegistry();

		regKey.OpenKey(

			"Software\\JuHe\\PTOpenGui", true);

		try {

			OpenDialogProject->InitialDir = regKey.ReadString("LastProjDir");

			OpenDialogProject->FileName = regKey.ReadString("LastProjFile");

			OpenDialogProject->FilterIndex = regKey.ReadInteger("FilterProjIndex");

		} catch (ERegistryException &e) {}

		delete &regKey;

		if (!OpenDialogProject->Execute()) {

			return;

		}

	} else {

		str = ExtractFilePath(OpenDialogProject->FileName);

		if (str.Length() > 0) {

			//OpenDialogProject->InitialDir = str;

			// change current working directory on specified _drive_

			// currently needed only in debug and when parameter is non zero

			chdir(str.c_str());

		}

	}

	CloseProjectClick(0);

	{

		OpenProject(OpenDialogProject->FileName);

		TRegistry &regKey = *new TRegistry();

		regKey.OpenKey(

			"Software\\JuHe\\PTOpenGui", true);

		str = ExtractFilePath(OpenDialogProject->FileName);

		regKey.WriteString("LastProjDir", str);

		str = ExtractFileName(OpenDialogProject->FileName);

		regKey.WriteString("LastProjFile", str);

		regKey.WriteInteger

			("FilterProjIndex", OpenDialogProject->FilterIndex);

		delete &regKey;

		TabbedNotebook1Change(0,TabbedNotebook1->PageIndex,allowChange);

		MemoProjectEnter(0);

		Fainf.fov_not_yet_set = false;	// no automatical update

	}

#endif

}



void MainFrame::OnSave( wxCommandEvent &event )

{

}



void MainFrame::OnEdit( wxCommandEvent &event )

{

  wxDialog edit_dialog( this, -1, wxT("PTOpenGui - Text mode"), wxDefaultPosition );

  edit_dialog.SetSizeHints( 600, 800, 700, 800);

  ProjectEditFunc( &edit_dialog, TRUE );

  edit_dialog.CentreOnParent();

  edit_dialog.ShowModal();

#if 0

	bool allowChange = true;

	FormParser->PrintScript(PRINT_PROJECT,&Fainf);

	FormParser->ShowModal();

	ButtonUpdateProjectMemoClick(0);

	MemoStitchScript->Clear();

	// opadate page 0: TabbedNotebook1Change(0,TabbedNotebook1->PageIndex,allowChange);

#endif

}



void MainFrame::OnTest( wxCommandEvent &event )

{

  wxDialog dialog( this, -1, wxT("PTOpenGui"), wxDefaultPosition );

  DialogFunc( &dialog, TRUE );

  dialog.CentreOnParent();

  dialog.ShowModal();

}



void MainFrame::OnQuit( wxCommandEvent &event )

{

  Close( TRUE );

}



void MainFrame::OnCloseWindow( wxCloseEvent &event )

{

  Destroy();

}



void MainFrame::OnAbout( wxCommandEvent &event )

{

  wxMessageDialog dialog( this, wxT("PTOpengui\nVersion:           0.8pre_wx\nCompile date:   2003/04/11\n\nCopyright 2003 Juha Helminen  2003\nunder the GPL\n\nURL: http://www.nic.fi/~juhe/ptbcgui/"),

	wxT("About PTOpenGui"), wxOK|wxICON_INFORMATION );

  dialog.ShowModal();

  dialog.Show(TRUE);

}





IMPLEMENT_APP(PTGui)



PTGui::PTGui()

{

}



bool PTGui::OnInit()

{

  MainFrame *frame = new MainFrame( NULL, -1, wxT("PTOpenGui"), wxPoint(20,20), wxSize(820,690) , wxMAXIMIZE_BOX );





  frame->Show( TRUE );



  return TRUE;

}



int PTGui::OnExit()

{

  return 0;

}





wxSizer *DialogFunc( wxWindow *parent, bool call_fit, bool set_sizer )

{

    wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );



    wxNotebook *item2 = new wxNotebook( parent, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, 0 );

    wxNotebookSizer *item1 = new wxNotebookSizer( item2 );



    wxPanel *item3 = new wxPanel( item2, -1 );

    Page1Func( item3, FALSE );

    item2->AddPage( item3, wxT("Files") );



    wxPanel *item4 = new wxPanel( item2, -1 );

    Page2Func( item4, FALSE );

    item2->AddPage( item4, wxT("Lens settings") );



    wxPanel *item5 = new wxPanel( item2, -1 );

    Page3Func( item5, FALSE );

    item2->AddPage( item5, wxT("Panorama settings") );



    wxPanel *item6 = new wxPanel( item2, -1 );

    Page4Func( item6, FALSE );

    item2->AddPage( item6, wxT("Image settings") );



    wxPanel *item7 = new wxPanel( item2, -1 );

    Page5Func( item7, FALSE );

    item2->AddPage( item7, wxT("Control points") );



    wxPanel *item14 = new wxPanel( item2, -1 );

    Page6Func( item14, FALSE );

    item2->AddPage( item14, wxT("Optimize") );



    wxPanel *item15 = new wxPanel( item2, -1 );

    Page7Func( item15, FALSE );

    item2->AddPage( item15, wxT("Preview") );



    wxPanel *item16 = new wxPanel( item2, -1 );

    Page8Func( item16, FALSE );

    item2->AddPage( item16, wxT("Stitch") );



    item0->Add( item1, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxStaticLine *item10 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );

    item0->Add( item10, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    wxBoxSizer *item11 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item12 = new wxButton( parent, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );

    item12->SetDefault();

    item11->Add( item12, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxButton *item13 = new wxButton( parent, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );

    item11->Add( item13, 0, wxALIGN_CENTRE|wxALL, 5 );



    item0->Add( item11, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxBOTTOM, 5 );



    if (set_sizer)

    {

        parent->SetAutoLayout( TRUE );

        parent->SetSizer( item0 );

        if (call_fit)

        {

            item0->Fit( parent );

            item0->SetSizeHints( parent );

        }

    }

    

    return item0;

}



wxSizer *Page1Func( wxWindow *parent, bool call_fit, bool set_sizer )

{

  wxBoxSizer *item0 = new wxBoxSizer( wxHORIZONTAL );



  wxBoxSizer *item1 = new wxBoxSizer( wxVERTICAL );



  wxStaticText *item2 = new wxStaticText( parent, ID_TEXT, wxT("Image files"), wxDefaultPosition, wxDefaultSize, 0 );

  item1->Add( item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxListCtrl *filelist = new wxListCtrl( parent, ID_LISTCTRL, wxDefaultPosition, wxSize(160,120), wxLC_REPORT|wxSUNKEN_BORDER );

  filelist->SetToolTip( wxT("image in project") );

  item1->Add( filelist, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

  filelist->InsertColumn( 0, wxT("#"), wxLIST_FORMAT_LEFT, 25 );

  filelist->InsertColumn( 1, wxT("Filename"), wxLIST_FORMAT_LEFT, 270 );

  filelist->InsertColumn( 2, wxT("width"), wxLIST_FORMAT_LEFT, 60 );

  filelist->InsertColumn( 3, wxT("height"), wxLIST_FORMAT_LEFT, 60 );

  filelist->InsertColumn( 4, wxT("rotate"), wxLIST_FORMAT_LEFT, 60 );

  // Here comes an sample entry 

  wxString buf;

  int filenumber;

  filenumber=0;

  buf.Printf( wxT("%d"), filenumber);

  filelist->InsertItem(0, buf, 0);

  buf.Printf( wxT("--------"));

  filelist->SetItem(0, 1, buf);

  buf.Printf( wxT("%d"), filenumber);

  filelist->SetItem(0, 2, buf);

  filelist->SetItem(0, 3, buf);

  filelist->SetItem(0, 4, buf);



  wxBoxSizer *item4 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item5 = new wxStaticText( parent, ID_TEXT, wxT("Project file"), wxDefaultPosition, wxDefaultSize, 0 );

  item4->Add( item5, 0, wxALIGN_CENTRE|wxALL, 5 );



  item4->Add( 120, 20, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxButton *item6 = new wxButton( parent, ID_EDIT, wxT("Edit project"), wxDefaultPosition, wxDefaultSize, 0 );

  item6->SetToolTip( wxT("Show project in project parser") );

  item4->Add( item6, 0, wxALIGN_CENTRE|wxALL, 5 );



  item1->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxTextCtrl *item7 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("#- scanResolution 2900.00000"), wxDefaultPosition, wxSize(480,262), wxTE_MULTILINE|wxVSCROLL|wxHSCROLL );

  item7->SetToolTip( wxT("Project description") );

  item1->Add( item7, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  wxBoxSizer *item8 = new wxBoxSizer( wxVERTICAL );



  wxBoxSizer *item9 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticBox *item11 = new wxStaticBox( parent, -1, wxT("File operations") );

  wxStaticBoxSizer *item10 = new wxStaticBoxSizer( item11, wxVERTICAL );



  wxButton *item12 = new wxButton( parent, ID_BUTTON, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );

  item12->SetToolTip( wxT("Add new image to project") );

  item10->Add( item12, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxButton *item13 = new wxButton( parent, ID_BUTTON, wxT("Remove"), wxDefaultPosition, wxDefaultSize, 0 );

  item13->SetToolTip( wxT("Remove image from project") );

  item10->Add( item13, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxButton *item14 = new wxButton( parent, ID_BUTTON, wxT("Up"), wxDefaultPosition, wxDefaultSize, 0 );

  item14->SetToolTip( wxT("Move image up in list") );

  item10->Add( item14, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxButton *item15 = new wxButton( parent, ID_BUTTON, wxT("Down"), wxDefaultPosition, wxDefaultSize, 0 );

  item15->SetToolTip( wxT("Move image down in list") );

  item10->Add( item15, 0, wxALIGN_CENTRE|wxALL, 5 );



  item9->Add( item10, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  wxStaticBox *item17 = new wxStaticBox( parent, -1, wxT("Export project") );

  wxStaticBoxSizer *item16 = new wxStaticBoxSizer( item17, wxVERTICAL );



  wxStaticText *item18 = new wxStaticText( parent, ID_TEXT, wxT("Scale factor:"), wxDefaultPosition, wxDefaultSize, 0 );

  item16->Add( item18, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxTextCtrl *item19 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("1"), wxDefaultPosition, wxSize(80,-1), 0 );

  item19->SetToolTip( wxT("image scale ratio") );

  item16->Add( item19, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxCheckBox *item20 = new wxCheckBox( parent, ID_CHECKBOX, wxT("Integer value"), wxDefaultPosition, wxDefaultSize, 0 );

  item20->SetToolTip( wxT("Round control point numbers to whole numbers") );

  item16->Add( item20, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxButton *item21 = new wxButton( parent, ID_BUTTON, wxT("Export"), wxDefaultPosition, wxDefaultSize, 0 );

  item21->SetToolTip( wxT("Experimential function...") );

  item16->Add( item21, 0, wxALIGN_CENTRE|wxALL, 5 );



  item9->Add( item16, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  item8->Add( item9, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxStaticBox *item23 = new wxStaticBox( parent, -1, wxT("Preview (source image)") );

  wxStaticBoxSizer *item22 = new wxStaticBoxSizer( item23, wxVERTICAL );



  wxPanel *item24 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(256,256), 0 );

  item22->Add( item24, 0, wxALIGN_CENTRE|wxALL, 5 );



  item8->Add( item22, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 );



  item0->Add( item8, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  if (set_sizer)

  {

    parent->SetAutoLayout( TRUE );

    parent->SetSizer( item0 );

    if (call_fit)

    {

      item0->Fit( parent );

      item0->SetSizeHints( parent );

    }

  }



  return item0;

}



wxSizer *Page2Func( wxWindow *parent, bool call_fit, bool set_sizer )

{

  wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );



  wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item2 = new wxStaticText( parent, ID_TEXT, wxT("Lens type:"), wxDefaultPosition, wxDefaultSize, 0 );

  item2->SetToolTip( wxT("Lens type") );

  item1->Add( item2, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxString strs3[] = 

  {

    wxT("Normal (rectlinear)"), 

    wxT("Panoramic"), 

    wxT("Circular"), 

    wxT("Full frame"), 

    wxT("Equirectangular")

  };

  wxComboBox *item3 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(150,-1), 5, strs3, wxCB_DROPDOWN );

  item1->Add( item3, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxStaticText *item4 = new wxStaticText( parent, ID_TEXT, wxT("All images/names"), wxDefaultPosition, wxDefaultSize, 0 );

  item1->Add( item4, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxString strs5[] = 

  {

    wxT("All")

  };

  wxComboBox *item5 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(100,-1), 1, strs5, wxCB_DROPDOWN|wxCB_SORT );

  item5->SetToolTip( wxT("All or one image") );

  item1->Add( item5, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxCheckBox *item6 = new wxCheckBox( parent, ID_CHECKBOX, wxT("Change single image only"), wxDefaultPosition, wxDefaultSize, 0 );

  item6->SetToolTip( wxT("Do not change values for all images at the one time") );

  item1->Add( item6, 0, wxALIGN_CENTRE|wxALL, 5 );



  item0->Add( item1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxBoxSizer *item7 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticBox *item9 = new wxStaticBox( parent, -1, wxT("Horizontal Field of View") );

  wxStaticBoxSizer *item8 = new wxStaticBoxSizer( item9, wxVERTICAL );



  wxRadioButton *item10 = new wxRadioButton( parent, ID_RADIOBUTTON, wxT("Degrees"), wxDefaultPosition, wxDefaultSize, 0 );

  item10->SetToolTip( wxT("Set lens type calculation method") );

  item8->Add( item10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxRadioButton *item11 = new wxRadioButton( parent, ID_RADIOBUTTON, wxT("Lens in mm for 35mm film"), wxDefaultPosition, wxDefaultSize, 0 );

  item11->SetToolTip( wxT("Set lenstype calculation method") );

  item8->Add( item11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxRadioButton *item12 = new wxRadioButton( parent, ID_RADIOBUTTON, wxT("Scanned film"), wxDefaultPosition, wxDefaultSize, 0 );

  item12->SetToolTip( wxT("Set lenstype calculation method") );

  item8->Add( item12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  item7->Add( item8, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  wxStaticBox *item14 = new wxStaticBox( parent, -1, wxT("Degrees") );

  wxStaticBoxSizer *item13 = new wxStaticBoxSizer( item14, wxHORIZONTAL );



  wxBoxSizer *item15 = new wxBoxSizer( wxVERTICAL );



  wxBoxSizer *item16 = new wxBoxSizer( wxHORIZONTAL );



  wxBoxSizer *item17 = new wxBoxSizer( wxVERTICAL );



  wxBoxSizer *item18 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item19 = new wxStaticText( parent, ID_TEXT, wxT("Degrees (v):"), wxDefaultPosition, wxDefaultSize, 0 );

  item18->Add( item19, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxTextCtrl *item20 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("54"), wxDefaultPosition, wxSize(80,-1), 0 );

  item20->SetToolTip( wxT("Calculated field of view") );

  item18->Add( item20, 0, wxALIGN_CENTRE|wxALL, 5 );



  item17->Add( item18, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  wxBoxSizer *item21 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item22 = new wxStaticText( parent, ID_TEXT, wxT("Focal lenght:"), wxDefaultPosition, wxDefaultSize, 0 );

  item21->Add( item22, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxTextCtrl *item23 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("35"), wxDefaultPosition, wxSize(80,-1), 0 );

  item23->SetToolTip( wxT("Actual focal length if ppi setting is used ") );

  item21->Add( item23, 0, wxALIGN_CENTRE|wxALL, 5 );



  item17->Add( item21, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  wxBoxSizer *item24 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item25 = new wxStaticText( parent, ID_TEXT, wxT("image ppi:"), wxDefaultPosition, wxDefaultSize, 0 );

  item24->Add( item25, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxTextCtrl *item26 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("2900"), wxDefaultPosition, wxSize(80,-1), 0 );

  item26->SetToolTip( wxT("Set image resolution (film ppi or CCD cell ppi)") );

  item24->Add( item26, 0, wxALIGN_CENTRE|wxALL, 5 );



  item17->Add( item24, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  item16->Add( item17, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 0 );



  wxBoxSizer *item27 = new wxBoxSizer( wxVERTICAL );



  wxStaticText *item28 = new wxStaticText( parent, ID_TEXT, wxT("(horizontal field of view)"), wxDefaultPosition, wxDefaultSize, 0 );

  item27->Add( item28, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxBoxSizer *item29 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item30 = new wxStaticText( parent, ID_TEXT, wxT("Orientation"), wxDefaultPosition, wxDefaultSize, 0 );

  item30->Enable( FALSE );

  item29->Add( item30, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxString strs31[] = 

  {

    wxT("ComboItem")

  };

  wxComboBox *item31 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(100,-1), 1, strs31, wxCB_DROPDOWN );

  item31->Enable( FALSE );

  item29->Add( item31, 0, wxALIGN_CENTRE|wxALL, 5 );



  item27->Add( item29, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxStaticText *item32 = new wxStaticText( parent, ID_TEXT, wxT("Set for digi images also if they are cropped"), wxDefaultPosition, wxDefaultSize, 0 );

  item27->Add( item32, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  item16->Add( item27, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  item15->Add( item16, 0, wxALIGN_CENTRE|wxALL, 0 );



  wxStaticText *item33 = new wxStaticText( parent, ID_TEXT, wxT("Degrees are calculated according to crop focal length"), wxDefaultPosition, wxDefaultSize, 0 );

  item15->Add( item33, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  item13->Add( item15, 0, wxALIGN_CENTRE|wxALL, 5 );



  item7->Add( item13, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  item0->Add( item7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxBoxSizer *item34 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticBox *item36 = new wxStaticBox( parent, -1, wxT("Lens correction parameters") );

  wxStaticBoxSizer *item35 = new wxStaticBoxSizer( item36, wxVERTICAL );



  wxBoxSizer *item37 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item38 = new wxStaticText( parent, ID_TEXT, wxT("             a:"), wxDefaultPosition, wxDefaultSize, 0 );

  item37->Add( item38, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxTextCtrl *item39 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("0"), wxDefaultPosition, wxSize(80,-1), 0 );

  item39->SetToolTip( wxT("a - distortion value") );

  item37->Add( item39, 0, wxALIGN_CENTRE|wxALL, 0 );



  item37->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );



  item35->Add( item37, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  wxBoxSizer *item40 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item41 = new wxStaticText( parent, ID_TEXT, wxT("b:"), wxDefaultPosition, wxDefaultSize, 0 );

  item40->Add( item41, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxTextCtrl *item42 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("0"), wxDefaultPosition, wxSize(80,-1), 0 );

  item42->SetToolTip( wxT("Barrel or pincusion distortion") );

  item40->Add( item42, 0, wxALIGN_CENTRE|wxALL, 0 );



  item40->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );



  item35->Add( item40, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  wxBoxSizer *item43 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item44 = new wxStaticText( parent, ID_TEXT, wxT("c:"), wxDefaultPosition, wxDefaultSize, 0 );

  item43->Add( item44, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxTextCtrl *item45 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("0"), wxDefaultPosition, wxSize(80,-1), 0 );

  item45->SetToolTip( wxT("c - distortion value") );

  item43->Add( item45, 0, wxALIGN_CENTRE|wxALL, 0 );



  item43->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );



  item35->Add( item43, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  item34->Add( item35, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  wxStaticBox *item47 = new wxStaticBox( parent, -1, wxT("Image shift") );

  wxStaticBoxSizer *item46 = new wxStaticBoxSizer( item47, wxVERTICAL );



  wxBoxSizer *item48 = new wxBoxSizer( wxHORIZONTAL );



  wxBoxSizer *item49 = new wxBoxSizer( wxVERTICAL );



  wxStaticText *item50 = new wxStaticText( parent, ID_TEXT, wxT("Shift:"), wxDefaultPosition, wxDefaultSize, 0 );

  item49->Add( item50, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxBoxSizer *item51 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item52 = new wxStaticText( parent, ID_TEXT, wxT("horizontal (d): "), wxDefaultPosition, wxDefaultSize, 0 );

  item51->Add( item52, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxTextCtrl *item53 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 );

  item51->Add( item53, 0, wxALIGN_CENTRE|wxALL, 0 );



  item49->Add( item51, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  wxBoxSizer *item54 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item55 = new wxStaticText( parent, ID_TEXT, wxT("vertical (e): "), wxDefaultPosition, wxDefaultSize, 0 );

  item54->Add( item55, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxTextCtrl *item56 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 );

  item54->Add( item56, 0, wxALIGN_CENTRE|wxALL, 0 );



  item49->Add( item54, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  wxStaticText *item57 = new wxStaticText( parent, ID_TEXT, wxT("Shear:"), wxDefaultPosition, wxDefaultSize, 0 );

  item49->Add( item57, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxBoxSizer *item58 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item59 = new wxStaticText( parent, ID_TEXT, wxT("horizontal (g): "), wxDefaultPosition, wxDefaultSize, 0 );

  item58->Add( item59, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxTextCtrl *item60 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 );

  item58->Add( item60, 0, wxALIGN_CENTRE|wxALL, 0 );



  item49->Add( item58, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  wxBoxSizer *item61 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item62 = new wxStaticText( parent, ID_TEXT, wxT("vertical (f): "), wxDefaultPosition, wxDefaultSize, 0 );

  item61->Add( item62, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxTextCtrl *item63 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 );

  item61->Add( item63, 0, wxALIGN_CENTRE|wxALL, 0 );



  item49->Add( item61, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  item48->Add( item49, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxStaticLine *item64 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,20), wxLI_VERTICAL );

  item48->Add( item64, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxBoxSizer *item65 = new wxBoxSizer( wxVERTICAL );



  wxStaticText *item66 = new wxStaticText( parent, ID_TEXT, wxT("Set rest in text file ..."), wxDefaultPosition, wxDefaultSize, 0 );

  item65->Add( item66, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxButton *item67 = new wxButton( parent, ID_BUTTON, wxT("Edit text"), wxDefaultPosition, wxDefaultSize, 0 );

  item65->Add( item67, 0, wxALIGN_CENTRE|wxALL, 5 );



  item48->Add( item65, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  item46->Add( item48, 0, wxALIGN_CENTRE|wxALL, 5 );



  item34->Add( item46, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  item0->Add( item34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  if (set_sizer)

  {

    parent->SetAutoLayout( TRUE );

    parent->SetSizer( item0 );

    if (call_fit)

    {

      item0->Fit( parent );

      item0->SetSizeHints( parent );

    }

  }

    

  return item0;

}



wxSizer *Page3Func( wxWindow *parent, bool call_fit, bool set_sizer )

{

  wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );



  wxStaticText *item1 = new wxStaticText( parent, ID_TEXT, wxT("Settings for final panorama"), wxDefaultPosition, wxDefaultSize, 0 );

  item0->Add( item1, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxBoxSizer *item2 = new wxBoxSizer( wxHORIZONTAL );



  wxBoxSizer *item3 = new wxBoxSizer( wxVERTICAL );



  wxStaticBox *item5 = new wxStaticBox( parent, -1, wxT("View type") );

  wxStaticBoxSizer *item4 = new wxStaticBoxSizer( item5, wxVERTICAL );



  wxStaticText *item6 = new wxStaticText( parent, ID_TEXT, wxT("Panorama type (f)"), wxDefaultPosition, wxDefaultSize, 0 );

  item4->Add( item6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxString strs7[] = 

  {

    wxT("Rectlinear"), 

    wxT("Cylindrical"), 

     wxT("Equirectangular")

  };

  wxComboBox *item7 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(120,20), 3, strs7, wxCB_DROPDOWN );

  item7->SetToolTip( wxT("Panorama projection") );

  item4->Add( item7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  item4->Add( 20, 10, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxStaticText *item8 = new wxStaticText( parent, ID_TEXT, wxT("Field of view (v)"), wxDefaultPosition, wxDefaultSize, 0 );

  item4->Add( item8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  wxBoxSizer *item9 = new wxBoxSizer( wxHORIZONTAL );



  wxTextCtrl *item10 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 );

  item10->SetToolTip( wxT("Field of view in stitched panorama") );

  item9->Add( item10, 0, wxALIGN_CENTRE|wxALL, 0 );



  wxButton *item11 = new wxButton( parent, ID_BUTTON, wxT("Get max"), wxDefaultPosition, wxDefaultSize, 0 );

  item9->Add( item11, 0, wxALIGN_CENTRE|wxALL, 5 );



  item4->Add( item9, 0, wxALIGN_CENTRE|wxALL, 0 );



  item3->Add( item4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxStaticBox *item13 = new wxStaticBox( parent, -1, wxT("Stitching parameters") );

  wxStaticBoxSizer *item12 = new wxStaticBoxSizer( item13, wxVERTICAL );



  wxStaticText *item14 = new wxStaticText( parent, ID_TEXT, wxT("Feather (u): "), wxDefaultPosition, wxDefaultSize, 0 );

  item12->Add( item14, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



  wxTextCtrl *item15 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("10"), wxDefaultPosition, wxSize(80,-1), 0 );

  item15->SetToolTip( wxT("Feather of images for stitching") );

  item12->Add( item15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxStaticText *item16 = new wxStaticText( parent, ID_TEXT, wxT("Gamma (g): "), wxDefaultPosition, wxDefaultSize, 0 );

  item12->Add( item16, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



  wxTextCtrl *item17 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("1"), wxDefaultPosition, wxSize(80,-1), 0 );

  item17->SetToolTip( wxT("Gamma correction (works best for 16bit images)") );

  item12->Add( item17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxStaticText *item18 = new wxStaticText( parent, ID_TEXT, wxT("Interpolator (i): "), wxDefaultPosition, wxDefaultSize, 0 );

  item12->Add( item18, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



  wxString strs19[] = 

  {

    wxT("Nearest neighbour"), 

    wxT("Bilinear"), 

    wxT("Poly3 (Bicubic)"), 

    wxT("Spline 16"), 

    wxT("Spline 32"), 

    wxT("Spline 64"), 

    wxT("Sinc 256"), 

    wxT("Sinc 1024")

  };

  wxComboBox *item19 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(140,-1), 8, strs19, wxCB_DROPDOWN );

  item19->SetToolTip( wxT("Method for resize/interpolate") );

  item12->Add( item19, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  item3->Add( item12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  item2->Add( item3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  wxBoxSizer *item20 = new wxBoxSizer( wxVERTICAL );



  wxStaticBox *item22 = new wxStaticBox( parent, -1, wxT("Output file") );

  wxStaticBoxSizer *item21 = new wxStaticBoxSizer( item22, wxHORIZONTAL );



  wxBoxSizer *item23 = new wxBoxSizer( wxVERTICAL );



  wxStaticText *item24 = new wxStaticText( parent, ID_TEXT, wxT("Width"), wxDefaultPosition, wxDefaultSize, 0 );

  item23->Add( item24, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



  wxTextCtrl *item25 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("2000"), wxDefaultPosition, wxSize(80,-1), 0 );

  item25->SetToolTip( wxT("Width of panorama") );

  item23->Add( item25, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxStaticText *item26 = new wxStaticText( parent, ID_TEXT, wxT("Height"), wxDefaultPosition, wxDefaultSize, 0 );

  item23->Add( item26, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



  wxTextCtrl *item27 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("1000"), wxDefaultPosition, wxSize(80,-1), 0 );

  item27->SetToolTip( wxT("Height of panorama") );

  item23->Add( item27, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  item21->Add( item23, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  wxBoxSizer *item28 = new wxBoxSizer( wxVERTICAL );



  wxBoxSizer *item29 = new wxBoxSizer( wxVERTICAL );



  wxStaticText *item30 = new wxStaticText( parent, ID_TEXT, wxT("Output file type"), wxDefaultPosition, wxDefaultSize, 0 );

  item29->Add( item30, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



  wxString strs31[] = 

  {

    wxT("JPEG (*.jpg)"), 

    wxT("PNG (*.png)"), 

    wxT("TIFF (*.tif)"), 

    wxT("TIFF_mask (*.tif)"), 

    wxT("TIFF_nomask (*.tif)"), 

    wxT("PICT Bitmap (*.bmp)"), 

    wxT("PSD Photoshop (*.psd)"), 

    wxT("PSD_mask"), 

    wxT("PSD_nomask"), 

    wxT("PAN"), 

    wxT("IVR"), 

    wxT("IVR_java"), 

    wxT("VRML"), 

    wxT("QTVR")

  };

  wxComboBox *item31 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(160,-1), 14, strs31, wxCB_DROPDOWN );

  item31->SetToolTip( wxT("Image file type") );

  item29->Add( item31, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxStaticText *item32 = new wxStaticText( parent, ID_TEXT, wxT("Jpeg quality: (used in preview)"), wxDefaultPosition, wxDefaultSize, 0 );

  item29->Add( item32, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



  wxBoxSizer *item33 = new wxBoxSizer( wxHORIZONTAL );



  wxTextCtrl *item34 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("90"), wxDefaultPosition, wxSize(80,-1), 0 );

  item34->SetToolTip( wxT("Quality value, 100% best, 0% least space") );

  item33->Add( item34, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxCheckBox *item35 = new wxCheckBox( parent, ID_CHECKBOX, wxT("Progressive jpeg"), wxDefaultPosition, wxDefaultSize, 0 );

  item35->SetToolTip( wxT("Jpeg advanced packing") );

  item33->Add( item35, 0, wxALIGN_CENTRE|wxALL, 5 );



  item29->Add( item33, 0, wxALIGN_CENTRE|wxALL, 0 );



  item28->Add( item29, 0, wxALIGN_CENTRE|wxALL, 0 );



  item21->Add( item28, 0, wxALIGN_CENTRE|wxALL, 5 );



  item20->Add( item21, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxStaticBox *item37 = new wxStaticBox( parent, -1, wxT("Color correction") );

  wxStaticBoxSizer *item36 = new wxStaticBoxSizer( item37, wxVERTICAL );



  wxCheckBox *item38 = new wxCheckBox( parent, ID_CHECKBOX, wxT("Modify colors"), wxDefaultPosition, wxDefaultSize, 0 );

  item38->SetToolTip( wxT("Use panorama tools color correction") );

  item36->Add( item38, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxStaticText *item39 = new wxStaticText( parent, ID_TEXT, wxT("Reference image type:"), wxDefaultPosition, wxDefaultSize, 0 );

  item36->Add( item39, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



  wxString strs40[] = 

  {

    wxT("not in use")

  };

  wxComboBox *item40 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(260,-1), 1, strs40, wxCB_DROPDOWN );

  item40->SetToolTip( wxT("Wich image is reference") );

  item36->Add( item40, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxStaticText *item41 = new wxStaticText( parent, ID_TEXT, wxT("Correction type:"), wxDefaultPosition, wxDefaultSize, 0 );

  item36->Add( item41, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



  wxString strs42[] = 

  {

    wxT("not in use"), 

     wxT("Correct both brightness and color (k)"), 

     wxT("Correct brightness (k)"), 

     wxT("Correct color (k)")

  };

  wxComboBox *item42 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(260,-1), 4, strs42, wxCB_DROPDOWN );

  item42->SetToolTip( wxT("Type of correction") );

  item36->Add( item42, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  item36->Add( 20, 10, 0, wxALIGN_CENTRE|wxALL, 5 );



  item20->Add( item36, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  item2->Add( item20, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  item0->Add( item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  if (set_sizer)

  {

    parent->SetAutoLayout( TRUE );

    parent->SetSizer( item0 );

    if (call_fit)

    {

      item0->Fit( parent );

      item0->SetSizeHints( parent );

    }

  }



  return item0;

}



wxSizer *Page4Func( wxWindow *parent, bool call_fit, bool set_sizer )

{

  wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );



  wxStaticText *item1 = new wxStaticText( parent, ID_TEXT, 

    wxT("Current status for image positions and correction factor. * means that parameter is/will be optimized. (0) value is linked to first image.\n"

    "Hint: Click cell and then right clock for popup-menu. Operation is for selected cell."),

    wxDefaultPosition, wxDefaultSize, 0 );

  item0->Add( item1, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxListCtrl *item2 = new wxListCtrl( parent, ID_LISTCTRL, wxDefaultPosition, wxSize(160,120), wxLC_REPORT|wxSUNKEN_BORDER );

  item2->SetToolTip( wxT("Image parameters") );

  item0->Add( item2, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxBoxSizer *item3 = new wxBoxSizer( wxHORIZONTAL );



  wxBoxSizer *item4 = new wxBoxSizer( wxVERTICAL );



  wxBoxSizer *item5 = new wxBoxSizer( wxHORIZONTAL );



  wxBoxSizer *item6 = new wxBoxSizer( wxVERTICAL );



  wxStaticText *item7 = new wxStaticText( parent, ID_TEXT, wxT("Predefined optimizations"), wxDefaultPosition, wxDefaultSize, 0 );

  item6->Add( item7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5 );



  wxString strs8[] = 

  {

    wxT("No change"), 

    wxT("Start (y,p,r)"), 

    wxT("Basic (y,p,r,b0,d0,e0)"), 

    wxT("First as reference [y,p,r.*,a-d:(0)]"), 

    wxT("All but selected line untouched")

  };

  wxComboBox *item8 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(220,-1), 5, strs8, wxCB_DROPDOWN );

  item8->SetToolTip( wxT("Basic might be an good starting point") );

  item6->Add( item8, 0, wxALIGN_CENTER_VERTICAL, 5 );



  item5->Add( item6, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 0 );



  wxBoxSizer *item9 = new wxBoxSizer( wxVERTICAL );



  wxStaticText *item10 = new wxStaticText( parent, ID_TEXT, wxT("Data of last selection"), wxDefaultPosition, wxDefaultSize, 0 );

  item9->Add( item10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5 );



  wxTextCtrl *item11 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(110,-1), 0 );

  item11->SetToolTip( wxT("Edit image parameter") );

  item9->Add( item11, 0, wxALIGN_CENTER_VERTICAL, 0 );



  item5->Add( item9, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxLEFT, 5 );



  wxButton *item12 = new wxButton( parent, ID_BUTTON, wxT("Update"), wxDefaultPosition, wxDefaultSize, 0 );

  item5->Add( item12, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL, 5 );



  item4->Add( item5, 0, wxALIGN_CENTER_VERTICAL, 5 );



  wxBoxSizer *item13 = new wxBoxSizer( wxHORIZONTAL );



  wxBoxSizer *item14 = new wxBoxSizer( wxVERTICAL );



  wxButton *item15 = new wxButton( parent, ID_BUTTON, wxT("Slice optimization"), wxDefaultPosition, wxSize(150,-1), 0 );

  item15->SetToolTip( wxT("Optimize one column at one time") );

  item14->Add( item15, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 );



  wxButton *item16 = new wxButton( parent, ID_BUTTON, wxT("Slice in loop run"), wxDefaultPosition, wxSize(150,-1), 0 );

  item16->SetToolTip( wxT("Run optimization until results keep the same") );

  item14->Add( item16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0 );



  item13->Add( item14, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 0 );



  wxBoxSizer *item17 = new wxBoxSizer( wxVERTICAL );



  wxStaticText *item18 = new wxStaticText( parent, ID_TEXT, wxT("loop change"), wxDefaultPosition, wxDefaultSize, 0 );

  item17->Add( item18, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



  wxTextCtrl *item19 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("0.01"), wxDefaultPosition, wxSize(80,-1), 0 );

  item19->SetToolTip( wxT("Minimum change in result") );

  item17->Add( item19, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 );



  item13->Add( item17, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL, 5 );



  wxBoxSizer *item20 = new wxBoxSizer( wxVERTICAL );



  wxStaticText *item21 = new wxStaticText( parent, ID_TEXT, wxT("Max seconds"), wxDefaultPosition, wxDefaultSize, 0 );

  item20->Add( item21, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



  wxTextCtrl *item22 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("300"), wxDefaultPosition, wxSize(80,-1), 0 );

  item22->SetToolTip( wxT("Max time in seconds for loop") );

  item20->Add( item22, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 );



  item13->Add( item20, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 );



  wxButton *item23 = new wxButton( parent, ID_BUTTON, wxT("Stop loop"), wxDefaultPosition, wxDefaultSize, 0 );

  item23->SetToolTip( wxT("Do not make new calls. Use chancel for current call.") );

  item13->Add( item23, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxTOP, 5 );



  item4->Add( item13, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 0 );



  item3->Add( item4, 0, wxALIGN_CENTER_HORIZONTAL, 5 );



  wxStaticBox *item25 = new wxStaticBox( parent, -1, wxT("Default settings") );

  wxStaticBoxSizer *item24 = new wxStaticBoxSizer( item25, wxVERTICAL );



  wxBoxSizer *item26 = new wxBoxSizer( wxHORIZONTAL );



  wxButton *item27 = new wxButton( parent, ID_BUTTON, wxT("Clear opt"), wxDefaultPosition, wxDefaultSize, 0 );

  item27->SetToolTip( wxT("Set all optimized values to zero (except hfov), starts optimization from zero") );

  item26->Add( item27, 0, wxALIGN_CENTRE, 5 );



  wxButton *item28 = new wxButton( parent, ID_BUTTON, wxT("Memorize"), wxDefaultPosition, wxDefaultSize, 0 );

  item28->SetToolTip( wxT("Set current optimization result to be fetched later. Store optimization parameters also.") );

  item26->Add( item28, 0, wxALIGN_CENTRE, 5 );



  wxButton *item29 = new wxButton( parent, ID_BUTTON, wxT("Take back"), wxDefaultPosition, wxDefaultSize, 0 );

  item29->SetToolTip( wxT("Set previous stored values to current status. Control point values are keept untouched.") );

  item26->Add( item29, 0, wxALIGN_CENTRE, 5 );



  item24->Add( item26, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxButton *item30 = new wxButton( parent, ID_BUTTON, wxT("Swap"), wxDefaultPosition, wxDefaultSize, 0 );

  item30->SetToolTip( wxT("Swap current status and memorized status") );

  item24->Add( item30, 0, wxALIGN_CENTRE|wxALL, 10 );



  item3->Add( item24, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



  item0->Add( item3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  if (set_sizer)

  {

    parent->SetAutoLayout( TRUE );

    parent->SetSizer( item0 );

    if (call_fit)

    {

      item0->Fit( parent );

      item0->SetSizeHints( parent );

    }

 }

    

  return item0;

}



wxSizer *Page5Func( wxWindow *parent, bool call_fit, bool set_sizer )

{

  wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );



  wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL );



  wxScrolledWindow *item2 = new wxScrolledWindow( parent, ID_SCROLLED, wxDefaultPosition, wxSize(385,300), wxHSCROLL|wxVSCROLL );

  item2->SetScrollbars( 10, 10, 20, 100, 0, 0 );

  item2->SetToolTip( wxT("Left image") );

  item1->Add( item2, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 );



  wxScrolledWindow *item3 = new wxScrolledWindow( parent, ID_SCROLLED, wxDefaultPosition, wxSize(385,300), wxHSCROLL|wxVSCROLL );

  item3->SetScrollbars( 10, 10, 20, 100, 0, 0 );

  item3->SetToolTip( wxT("Right image") );

  item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxTOP, 5 );



  item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );



  wxBoxSizer *item4 = new wxBoxSizer( wxHORIZONTAL );



  wxBoxSizer *item5 = new wxBoxSizer( wxVERTICAL );



  wxListCtrl *item6 = new wxListCtrl( parent, ID_LISTCTRL, wxDefaultPosition, wxSize(390,120), wxLC_REPORT|wxSUNKEN_BORDER );

  item6->SetToolTip( wxT("Control point data") );

  item5->Add( item6, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );



  wxBoxSizer *item7 = new wxBoxSizer( wxHORIZONTAL );



  wxBoxSizer *item8 = new wxBoxSizer( wxVERTICAL );



  wxBoxSizer *item9 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item10 = new wxStaticText( parent, ID_TEXT, wxT("Coord"), wxDefaultPosition, wxDefaultSize, 0 );

  item9->Add( item10, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );



  wxTextCtrl *item11 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("0"), wxDefaultPosition, wxSize(30,-1), 0 );

  item11->SetToolTip( wxT("Left image X coordinate") );

  item9->Add( item11, 0, wxALIGN_CENTRE, 5 );



  wxTextCtrl *item12 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("0"), wxDefaultPosition, wxSize(30,-1), 0 );

  item12->SetToolTip( wxT("Left image Y coordinate") );

  item9->Add( item12, 0, wxALIGN_CENTRE, 5 );



  wxTextCtrl *item13 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("0"), wxDefaultPosition, wxSize(30,-1), 0 );

  item13->SetToolTip( wxT("Right image X coordinate") );

  item9->Add( item13, 0, wxALIGN_CENTRE, 5 );



  wxTextCtrl *item14 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("0"), wxDefaultPosition, wxSize(30,-1), 0 );

  item14->SetToolTip( wxT("Right image Y coordinate") );

  item9->Add( item14, 0, wxALIGN_CENTRE, 5 );



  item8->Add( item9, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );



  wxBoxSizer *item15 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item16 = new wxStaticText( parent, ID_TEXT, wxT("       "), wxDefaultPosition, wxDefaultSize, 0 );

  item15->Add( item16, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxStaticText *item17 = new wxStaticText( parent, ID_TEXT, wxT("lX "), wxDefaultPosition, wxDefaultSize, 0 );

  item15->Add( item17, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxStaticText *item18 = new wxStaticText( parent, ID_TEXT, wxT(" lY "), wxDefaultPosition, wxDefaultSize, 0 );

  item15->Add( item18, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxStaticText *item19 = new wxStaticText( parent, ID_TEXT, wxT(" rX "), wxDefaultPosition, wxDefaultSize, 0 );

  item15->Add( item19, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxStaticText *item20 = new wxStaticText( parent, ID_TEXT, wxT(" rY "), wxDefaultPosition, wxDefaultSize, 0 );

  item15->Add( item20, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxStaticText *item21 = new wxStaticText( parent, ID_TEXT, wxT("Line Nr."), wxDefaultPosition, wxDefaultSize, 0 );

  item15->Add( item21, 0, wxALIGN_CENTRE|wxALL, 5 );



  item8->Add( item15, 0, wxALIGN_CENTER_VERTICAL, 5 );



  wxBoxSizer *item22 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item23 = new wxStaticText( parent, ID_TEXT, wxT("Comment"), wxDefaultPosition, wxDefaultSize, 0 );

  item22->Add( item23, 0, wxALIGN_CENTRE|wxALL, 5 );



  wxTextCtrl *item24 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 );

  item24->SetToolTip( wxT("Comment for control point") );

  item22->Add( item24, 0, wxALIGN_CENTRE|wxTOP|wxBOTTOM, 5 );



  wxString strs25[] = 

  {

    wxT("New")

  };

  wxComboBox *item25 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(60,-1), 1, strs25, wxCB_DROPDOWN );

  item25->SetToolTip( wxT("Number of line. (set same line numbers for at least two control point numbers)") );

  item22->Add( item25, 0, wxALIGN_CENTRE|wxTOP|wxBOTTOM, 5 );



  item8->Add( item22, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );



  item7->Add( item8, 0, wxALIGN_CENTRE, 5 );



  wxStaticBox *item27 = new wxStaticBox( parent, -1, wxT("Align (t)") );

  wxStaticBoxSizer *item26 = new wxStaticBoxSizer( item27, wxVERTICAL );



  wxRadioButton *item28 = new wxRadioButton( parent, ID_RADIOBUTTON, wxT("H+V"), wxDefaultPosition, wxDefaultSize, 0 );

  item28->SetToolTip( wxT("Control point type, default is H+V (= horizontal'-' + vertical '|' )") );

  item26->Add( item28, 0, wxALIGN_CENTER_VERTICAL, 0 );



  wxRadioButton *item29 = new wxRadioButton( parent, ID_RADIOBUTTON, wxT("Ver"), wxDefaultPosition, wxDefaultSize, 0 );

  item29->SetToolTip( wxT("Control point type - for vertical alignment") );

  item26->Add( item29, 0, wxALIGN_CENTER_VERTICAL, 0 );



  wxRadioButton *item30 = new wxRadioButton( parent, ID_RADIOBUTTON, wxT("Hor"), wxDefaultPosition, wxDefaultSize, 0 );

  item30->SetToolTip( wxT("Control point type - for horizontal alignment") );

  item26->Add( item30, 0, wxALIGN_CENTER_VERTICAL, 0 );



  wxRadioButton *item31 = new wxRadioButton( parent, ID_RADIOBUTTON, wxT("Line"), wxDefaultPosition, wxDefaultSize, 0 );

  item31->SetToolTip( wxT("Control points type - for straighten of lens distorted lines") );

  item26->Add( item31, 0, wxALIGN_CENTER_VERTICAL, 0 );



  item7->Add( item26, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT, 5 );



  wxBoxSizer *item32 = new wxBoxSizer( wxVERTICAL );



  wxBoxSizer *item33 = new wxBoxSizer( wxHORIZONTAL );



  wxButton *item34 = new wxButton( parent, ID_BUTTON, wxT("Add"), wxDefaultPosition, wxSize(50,-1), 0 );

  item34->SetToolTip( wxT("Add new control point") );

  item33->Add( item34, 0, wxALIGN_CENTRE|wxTOP|wxBOTTOM, 5 );



  wxButton *item35 = new wxButton( parent, ID_BUTTON, wxT("Delete"), wxDefaultPosition, wxSize(50,-1), 0 );

  item35->SetToolTip( wxT("Delete selected control point") );

  item33->Add( item35, 0, wxALIGN_CENTRE|wxTOP|wxBOTTOM, 5 );



  wxString strs36[] = 

  {

    wxT("100%"), 

    wxT("70,7%"), 

    wxT("50%"), 

    wxT("33,3%"), 

    wxT("25%"), 

    wxT("20%"), 

    wxT("16,5%"), 

    wxT("14,3%"), 

    wxT("12,5%"), 

    wxT("10%")

  };

  wxComboBox *item36 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(70,-1), 10, strs36, wxCB_DROPDOWN );

  item36->SetToolTip( wxT("Main window zoom") );

  item33->Add( item36, 0, wxALIGN_CENTRE|wxTOP|wxBOTTOM, 5 );



  item32->Add( item33, 0, wxALIGN_CENTRE, 5 );



  wxBoxSizer *item37 = new wxBoxSizer( wxHORIZONTAL );



  wxStaticText *item38 = new wxStaticText( parent, ID_TEXT, wxT("Zoom by "), wxDefaultPosition, wxDefaultSize, 0 );

  item37->Add( item38, 0, wxALIGN_CENTRE, 5 );



  item32->Add( item37, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );



  wxBoxSizer *item39 = new wxBoxSizer( wxHORIZONTAL );



  wxButton *item40 = new wxButton( parent, ID_BUTTON, wxT("Update"), wxDefaultPosition, wxSize(50,-1), 0 );

  item40->SetToolTip( wxT("Update selected line") );

  item39->Add( item40, 0, wxALIGN_CENTRE|wxTOP|wxBOTTOM, 5 );



  wxButton *item41 = new wxButton( parent, ID_BUTTON, wxT("Search"), wxDefaultPosition, wxSize(50,-1), 0 );

  item41->SetToolTip( wxT("Tries to find best position for current control point. Check result and if nor correct use interactive menu...") );

  item39->Add( item41, 0, wxALIGN_CENTRE|wxTOP|wxBOTTOM, 5 );



  wxString strs42[] = 

  {

    wxT("1"), 

    wxT("2"), 

    wxT("3"), 

    wxT("4"), 

    wxT("5"), 

    wxT("6"), 

    wxT("8"), 

    wxT("10"), 

    wxT("12"), 

    wxT("14"), 

    wxT("16"), 

    wxT("20"), 

    wxT("30"), 

    wxT("40"), 

    wxT("50")

  };

  wxComboBox *item42 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(70,-1), 15, strs42, wxCB_DROPDOWN );

  item42->SetToolTip( wxT("Small \"finetune\" window zoom") );

  item39->Add( item42, 0, wxALIGN_CENTRE|wxTOP|wxBOTTOM, 5 );



  item32->Add( item39, 0, wxALIGN_CENTRE, 5 );



  item7->Add( item32, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 );



  item5->Add( item7, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );



  item4->Add( item5, 0, wxALIGN_CENTRE|wxTOP|wxBOTTOM, 5 );



  wxBoxSizer *item43 = new wxBoxSizer( wxHORIZONTAL );



  wxBoxSizer *item44 = new wxBoxSizer( wxVERTICAL );



  wxPanel *item45 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(160,200), 0 );

  item45->SetToolTip( wxT("left zoom image") );

  item44->Add( item45, 0, wxALIGN_CENTRE, 5 );



  wxStaticText *item46 = new wxStaticText( parent, ID_TEXT, wxT("text"), wxDefaultPosition, wxDefaultSize, 0 );

  item44->Add( item46, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 );



  item43->Add( item44, 0, wxALIGN_CENTRE|wxLEFT, 5 );



  wxBoxSizer *item47 = new wxBoxSizer( wxVERTICAL );



  wxPanel *item48 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(160,200), 0 );

  item48->SetToolTip( wxT("right zoom image") );

  item47->Add( item48, 0, wxALIGN_CENTRE, 5 );



  wxStaticText *item49 = new wxStaticText( parent, ID_TEXT, wxT("text"), wxDefaultPosition, wxDefaultSize, 0 );

  item47->Add( item49, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 );



  item43->Add( item47, 0, wxALIGN_CENTRE, 5 );



  item4->Add( item43, 0, wxALIGN_CENTRE, 5 );



  item0->Add( item4, 0, wxALIGN_CENTRE|wxRIGHT|wxBOTTOM, 5 );



  if (set_sizer)

  {

    parent->SetAutoLayout( TRUE );

    parent->SetSizer( item0 );

    if (call_fit)

    {

      item0->Fit( parent );

      item0->SetSizeHints( parent );

    }

  }

    

  return item0;

}



wxSizer *Page6Func( wxWindow *parent, bool call_fit, bool set_sizer )

{

    wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );



    wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL );



    wxStaticText *item2 = new wxStaticText( parent, ID_TEXT, 

        wxT("Left chack box is to optimize parameter\n"

        "Middle box links value to reference image\n"

        "Right box os number where this references"),

        wxDefaultPosition, wxDefaultSize, 0 );

    item1->Add( item2, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxButton *item3 = new wxButton( parent, ID_BUTTON, wxT("Optimize image positions"), wxDefaultPosition, wxDefaultSize, 0 );

    item3->SetToolTip( wxT("Optimize project with given parameters") );

    item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



    item1->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxButton *item4 = new wxButton( parent, ID_BUTTON, wxT("Reset script"), wxDefaultPosition, wxDefaultSize, 0 );

    item4->SetToolTip( wxT("Shows and set script") );

    item1->Add( item4, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxButton *item5 = new wxButton( parent, ID_BUTTON, wxT("Show script"), wxDefaultPosition, wxDefaultSize, 0 );

    item1->Add( item5, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item6 = new wxBoxSizer( wxVERTICAL );



    wxCheckBox *item7 = new wxCheckBox( parent, ID_CHECKBOX, wxT("Background optimize"), wxDefaultPosition, wxDefaultSize, 0 );

    item7->SetValue( TRUE );

    item7->SetToolTip( wxT("Run optimization when an control point has been changed") );

    item6->Add( item7, 0, wxALIGN_CENTER_VERTICAL, 5 );



    wxCheckBox *item8 = new wxCheckBox( parent, ID_CHECKBOX, wxT("Use written script"), wxDefaultPosition, wxDefaultSize, 0 );

    item8->Enable( FALSE );

    item6->Add( item8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0 );



    item1->Add( item6, 0, wxALIGN_CENTRE|wxALL, 5 );



    item0->Add( item1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    wxBoxSizer *item9 = new wxBoxSizer( wxHORIZONTAL );



    wxBoxSizer *item10 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item11 = new wxStaticText( parent, ID_TEXT, wxT("Yaw (y)"), wxDefaultPosition, wxDefaultSize, 0 );

    item10->Add( item11, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxPanel *item12 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(98,130), wxSUNKEN_BORDER );

    item10->Add( item12, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item13 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item14 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(23,20), 0 );

    item14->SetToolTip( wxT("Set optimization for all (y)") );

    item13->Add( item14, 0, wxALIGN_CENTRE, 5 );



    wxButton *item15 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(22,20), 0 );

    item15->SetToolTip( wxT("Clear optimize for all (y)") );

    item13->Add( item15, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item16 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(22,20), 0 );

    item16->SetToolTip( wxT("Set link for all (y)") );

    item13->Add( item16, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item17 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(23,20), 0 );

    item17->SetToolTip( wxT("Clear link for all (y)") );

    item13->Add( item17, 0, wxALIGN_CENTRE|wxALL, 0 );



    item10->Add( item13, 0, wxALIGN_CENTRE|wxALL, 5 );



    item9->Add( item10, 0, wxALIGN_CENTRE, 5 );



    wxBoxSizer *item18 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item19 = new wxStaticText( parent, ID_TEXT, wxT("Pitch (p)"), wxDefaultPosition, wxDefaultSize, 0 );

    item18->Add( item19, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxPanel *item20 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(98,130), wxSUNKEN_BORDER );

    item18->Add( item20, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item21 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item22 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(23,20), 0 );

    item22->SetToolTip( wxT("Set optimization for all (p)") );

    item21->Add( item22, 0, wxALIGN_CENTRE, 5 );



    wxButton *item23 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(22,20), 0 );

    item23->SetToolTip( wxT("Clear optimize for all (y)") );

    item21->Add( item23, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item24 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(22,20), 0 );

    item24->SetToolTip( wxT("Set link for all (y)") );

    item21->Add( item24, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item25 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(23,20), 0 );

    item25->SetToolTip( wxT("Clear link for all (y)") );

    item21->Add( item25, 0, wxALIGN_CENTRE|wxALL, 0 );



    item18->Add( item21, 0, wxALIGN_CENTRE|wxALL, 5 );



    item9->Add( item18, 0, wxALIGN_CENTRE, 5 );



    wxBoxSizer *item26 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item27 = new wxStaticText( parent, ID_TEXT, wxT("Roll (r)"), wxDefaultPosition, wxDefaultSize, 0 );

    item26->Add( item27, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxPanel *item28 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(98,130), wxSUNKEN_BORDER );

    item26->Add( item28, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item29 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item30 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(23,20), 0 );

    item30->SetToolTip( wxT("Set optimization for all (y)") );

    item29->Add( item30, 0, wxALIGN_CENTRE, 5 );



    wxButton *item31 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(22,20), 0 );

    item31->SetToolTip( wxT("Clear optimize for all (y)") );

    item29->Add( item31, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item32 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(22,20), 0 );

    item32->SetToolTip( wxT("Set link for all (y)") );

    item29->Add( item32, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item33 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(23,20), 0 );

    item33->SetToolTip( wxT("Clear link for all (y)") );

    item29->Add( item33, 0, wxALIGN_CENTRE|wxALL, 0 );



    item26->Add( item29, 0, wxALIGN_CENTRE|wxALL, 5 );



    item9->Add( item26, 0, wxALIGN_CENTRE|wxRIGHT, 5 );



    wxBoxSizer *item34 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item35 = new wxStaticText( parent, ID_TEXT, wxT("Hfov (v)"), wxDefaultPosition, wxDefaultSize, 0 );

    item35->SetToolTip( wxT("Horizontal field of view") );

    item34->Add( item35, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxPanel *item36 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(98,130), wxSUNKEN_BORDER );

    item34->Add( item36, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item37 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item38 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(23,20), 0 );

    item38->SetToolTip( wxT("Set optimization for all (y)") );

    item37->Add( item38, 0, wxALIGN_CENTRE, 5 );



    wxButton *item39 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(22,20), 0 );

    item39->SetToolTip( wxT("Clear optimize for all (y)") );

    item37->Add( item39, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item40 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(22,20), 0 );

    item40->SetToolTip( wxT("Set link for all (y)") );

    item37->Add( item40, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item41 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(23,20), 0 );

    item41->SetToolTip( wxT("Clear link for all (y)") );

    item37->Add( item41, 0, wxALIGN_CENTRE|wxALL, 0 );



    item34->Add( item37, 0, wxALIGN_CENTRE|wxALL, 5 );



    item9->Add( item34, 0, wxALIGN_CENTRE, 5 );



    wxBoxSizer *item42 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item43 = new wxStaticText( parent, ID_TEXT, wxT("Lens A (a)"), wxDefaultPosition, wxDefaultSize, 0 );

    item43->SetToolTip( wxT("Lens distortion factor a") );

    item42->Add( item43, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxPanel *item44 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(98,130), wxSUNKEN_BORDER );

    item42->Add( item44, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item45 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item46 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(23,20), 0 );

    item46->SetToolTip( wxT("Set optimization for all (y)") );

    item45->Add( item46, 0, wxALIGN_CENTRE, 5 );



    wxButton *item47 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(22,20), 0 );

    item47->SetToolTip( wxT("Clear optimize for all (y)") );

    item45->Add( item47, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item48 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(22,20), 0 );

    item48->SetToolTip( wxT("Set link for all (y)") );

    item45->Add( item48, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item49 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(23,20), 0 );

    item49->SetToolTip( wxT("Clear link for all (y)") );

    item45->Add( item49, 0, wxALIGN_CENTRE|wxALL, 0 );



    item42->Add( item45, 0, wxALIGN_CENTRE|wxALL, 5 );



    item9->Add( item42, 0, wxALIGN_CENTRE, 5 );



    wxBoxSizer *item50 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item51 = new wxStaticText( parent, ID_TEXT, wxT("Lens B (b)"), wxDefaultPosition, wxDefaultSize, 0 );

    item51->SetToolTip( wxT("Lens distortion factor b") );

    item50->Add( item51, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxPanel *item52 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(98,130), wxSUNKEN_BORDER );

    item50->Add( item52, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item53 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item54 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(23,20), 0 );

    item54->SetToolTip( wxT("Set optimization for all (y)") );

    item53->Add( item54, 0, wxALIGN_CENTRE, 5 );



    wxButton *item55 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(22,20), 0 );

    item55->SetToolTip( wxT("Clear optimize for all (y)") );

    item53->Add( item55, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item56 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(22,20), 0 );

    item56->SetToolTip( wxT("Set link for all (y)") );

    item53->Add( item56, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item57 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(23,20), 0 );

    item57->SetToolTip( wxT("Clear link for all (y)") );

    item53->Add( item57, 0, wxALIGN_CENTRE|wxALL, 0 );



    item50->Add( item53, 0, wxALIGN_CENTRE|wxALL, 5 );



    item9->Add( item50, 0, wxALIGN_CENTRE, 5 );



    wxBoxSizer *item58 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item59 = new wxStaticText( parent, ID_TEXT, wxT("Lens C (c)"), wxDefaultPosition, wxDefaultSize, 0 );

    item59->SetToolTip( wxT("Lens distortion factor c") );

    item58->Add( item59, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxPanel *item60 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(98,130), wxSUNKEN_BORDER );

    item58->Add( item60, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item61 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item62 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(23,20), 0 );

    item62->SetToolTip( wxT("Set optimization for all (y)") );

    item61->Add( item62, 0, wxALIGN_CENTRE, 5 );



    wxButton *item63 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(22,20), 0 );

    item63->SetToolTip( wxT("Clear optimize for all (y)") );

    item61->Add( item63, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item64 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(22,20), 0 );

    item64->SetToolTip( wxT("Set link for all (y)") );

    item61->Add( item64, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item65 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(23,20), 0 );

    item65->SetToolTip( wxT("Clear link for all (y)") );

    item61->Add( item65, 0, wxALIGN_CENTRE|wxALL, 0 );



    item58->Add( item61, 0, wxALIGN_CENTRE|wxALL, 5 );



    item9->Add( item58, 0, wxALIGN_CENTRE, 5 );



    item0->Add( item9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    wxBoxSizer *item66 = new wxBoxSizer( wxHORIZONTAL );



    wxBoxSizer *item67 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item68 = new wxStaticText( parent, ID_TEXT, wxT("Used control points"), wxDefaultPosition, wxDefaultSize, 0 );

    item67->Add( item68, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    wxPanel *item69 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(98,130), wxSUNKEN_BORDER );

    item67->Add( item69, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item70 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item71 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(23,20), 0 );

    item71->SetToolTip( wxT("Set selection for all") );

    item70->Add( item71, 0, wxALIGN_CENTRE, 5 );



    wxButton *item72 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(22,20), 0 );

    item72->SetToolTip( wxT("Clear selection") );

    item70->Add( item72, 0, wxALIGN_CENTRE|wxALL, 0 );



    item67->Add( item70, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    item66->Add( item67, 0, wxALIGN_CENTRE, 5 );



    wxBoxSizer *item73 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item74 = new wxStaticText( parent, ID_TEXT, wxT("Select reference image:"), wxDefaultPosition, wxDefaultSize, 0 );

    item73->Add( item74, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );



    wxString strs75[] = 

    {

        wxT("no reference")

    };

    wxComboBox *item75 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(203,-1), 1, strs75, wxCB_DROPDOWN );

    item73->Add( item75, 0, wxALIGN_CENTRE|wxTOP|wxBOTTOM, 5 );



    item66->Add( item73, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item76 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item77 = new wxStaticText( parent, ID_TEXT, wxT("Hor shift (d)"), wxDefaultPosition, wxDefaultSize, 0 );

    item76->Add( item77, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxPanel *item78 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(98,130), wxSUNKEN_BORDER );

    item76->Add( item78, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item79 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item80 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(23,20), 0 );

    item80->SetToolTip( wxT("Set optimization for all (y)") );

    item79->Add( item80, 0, wxALIGN_CENTRE, 5 );



    wxButton *item81 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(22,20), 0 );

    item81->SetToolTip( wxT("Clear optimize for all (y)") );

    item79->Add( item81, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item82 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(22,20), 0 );

    item82->SetToolTip( wxT("Set link for all (y)") );

    item79->Add( item82, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item83 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(23,20), 0 );

    item83->SetToolTip( wxT("Clear link for all (y)") );

    item79->Add( item83, 0, wxALIGN_CENTRE|wxALL, 0 );



    item76->Add( item79, 0, wxALIGN_CENTRE|wxALL, 5 );



    item66->Add( item76, 0, wxALIGN_CENTRE, 5 );



    wxBoxSizer *item84 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item85 = new wxStaticText( parent, ID_TEXT, wxT("Vert shift (e)"), wxDefaultPosition, wxDefaultSize, 0 );

    item84->Add( item85, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxPanel *item86 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(98,130), wxSUNKEN_BORDER );

    item84->Add( item86, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item87 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item88 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(23,20), 0 );

    item88->SetToolTip( wxT("Set optimization for all (y)") );

    item87->Add( item88, 0, wxALIGN_CENTRE, 5 );



    wxButton *item89 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(22,20), 0 );

    item89->SetToolTip( wxT("Clear optimize for all (y)") );

    item87->Add( item89, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item90 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(22,20), 0 );

    item90->SetToolTip( wxT("Set link for all (y)") );

    item87->Add( item90, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item91 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(23,20), 0 );

    item91->SetToolTip( wxT("Clear link for all (y)") );

    item87->Add( item91, 0, wxALIGN_CENTRE|wxALL, 0 );



    item84->Add( item87, 0, wxALIGN_CENTRE|wxALL, 5 );



    item66->Add( item84, 0, wxALIGN_CENTRE, 5 );



    wxBoxSizer *item92 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item93 = new wxStaticText( parent, ID_TEXT, wxT("Hor shear (g)"), wxDefaultPosition, wxDefaultSize, 0 );

    item92->Add( item93, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxPanel *item94 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(98,130), wxSUNKEN_BORDER );

    item92->Add( item94, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item95 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item96 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(23,20), 0 );

    item96->SetToolTip( wxT("Set optimization for all (y)") );

    item95->Add( item96, 0, wxALIGN_CENTRE, 5 );



    wxButton *item97 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(22,20), 0 );

    item97->SetToolTip( wxT("Clear optimize for all (y)") );

    item95->Add( item97, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item98 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(22,20), 0 );

    item98->SetToolTip( wxT("Set link for all (y)") );

    item95->Add( item98, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item99 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(23,20), 0 );

    item99->SetToolTip( wxT("Clear link for all (y)") );

    item95->Add( item99, 0, wxALIGN_CENTRE|wxALL, 0 );



    item92->Add( item95, 0, wxALIGN_CENTRE|wxALL, 5 );



    item66->Add( item92, 0, wxALIGN_CENTRE, 5 );



    wxBoxSizer *item100 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item101 = new wxStaticText( parent, ID_TEXT, wxT("Vert shear (t)"), wxDefaultPosition, wxDefaultSize, 0 );

    item100->Add( item101, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxPanel *item102 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(98,130), wxSUNKEN_BORDER );

    item100->Add( item102, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxBoxSizer *item103 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item104 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(23,20), 0 );

    item104->SetToolTip( wxT("Set optimization for all (y)") );

    item103->Add( item104, 0, wxALIGN_CENTRE, 5 );



    wxButton *item105 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(22,20), 0 );

    item105->SetToolTip( wxT("Clear optimize for all (y)") );

    item103->Add( item105, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item106 = new wxButton( parent, ID_BUTTON, wxT("Set"), wxDefaultPosition, wxSize(22,20), 0 );

    item106->SetToolTip( wxT("Set link for all (y)") );

    item103->Add( item106, 0, wxALIGN_CENTRE|wxALL, 0 );



    wxButton *item107 = new wxButton( parent, ID_BUTTON, wxT("Clr"), wxDefaultPosition, wxSize(23,20), 0 );

    item107->SetToolTip( wxT("Clear link for all (y)") );

    item103->Add( item107, 0, wxALIGN_CENTRE|wxALL, 0 );



    item100->Add( item103, 0, wxALIGN_CENTRE|wxALL, 5 );



    item66->Add( item100, 0, wxALIGN_CENTRE, 5 );



    item0->Add( item66, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    if (set_sizer)

    {

        parent->SetAutoLayout( TRUE );

        parent->SetSizer( item0 );

        if (call_fit)

        {

            item0->Fit( parent );

            item0->SetSizeHints( parent );

        }

    }

    

    return item0;

}



wxSizer *Page7Func( wxWindow *parent, bool call_fit, bool set_sizer )

{

    wxBoxSizer *item0 = new wxBoxSizer( wxHORIZONTAL );



    wxBoxSizer *item1 = new wxBoxSizer( wxVERTICAL );



    wxBoxSizer *item2 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item3 = new wxButton( parent, ID_BUTTON, wxT("Edit script"), wxDefaultPosition, wxDefaultSize, 0 );

    item3->SetToolTip( wxT("Write default stitching to memo") );

    item2->Add( item3, 0, wxALIGN_CENTRE|wxALL, 5 );



    item2->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxButton *item4 = new wxButton( parent, ID_BUTTON, wxT("Make preview"), wxDefaultPosition, wxDefaultSize, 0 );

    item4->SetToolTip( wxT("Start preview stitching") );

    item2->Add( item4, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxCheckBox *item5 = new wxCheckBox( parent, ID_CHECKBOX, wxT("Auto preview update"), wxDefaultPosition, wxDefaultSize, 0 );

    item5->SetToolTip( wxT("???") );

    item2->Add( item5, 0, wxALIGN_CENTRE|wxALL, 5 );



    item1->Add( item2, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5 );



    wxTextCtrl *item6 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(400,520), wxTE_MULTILINE );

    item1->Add( item6, 0, wxALIGN_CENTRE|wxALL, 5 );



    item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



    wxBoxSizer *item7 = new wxBoxSizer( wxVERTICAL );



    wxStaticBox *item9 = new wxStaticBox( parent, -1, wxT("Size") );

    wxStaticBoxSizer *item8 = new wxStaticBoxSizer( item9, wxVERTICAL );



    wxStaticText *item10 = new wxStaticText( parent, ID_TEXT, wxT("Width"), wxDefaultPosition, wxDefaultSize, 0 );

    item8->Add( item10, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



    wxTextCtrl *item11 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("600"), wxDefaultPosition, wxSize(80,-1), 0 );

    item11->SetToolTip( wxT("Width of preview in pixel") );

    item8->Add( item11, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );



    wxStaticText *item12 = new wxStaticText( parent, ID_TEXT, wxT("Height"), wxDefaultPosition, wxDefaultSize, 0 );

    item8->Add( item12, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



    wxTextCtrl *item13 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("300"), wxDefaultPosition, wxSize(80,-1), 0 );

    item13->SetToolTip( wxT("Height of preview in pixel") );

    item13->Enable( FALSE );

    item8->Add( item13, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );



    wxCheckBox *item14 = new wxCheckBox( parent, ID_CHECKBOX, wxT("Proportional ratio"), wxDefaultPosition, wxDefaultSize, 0 );

    item14->SetValue( TRUE );

    item14->SetToolTip( wxT("Preserve ratio of 1:2 from height to width") );

    item8->Add( item14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    item7->Add( item8, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    wxStaticBox *item16 = new wxStaticBox( parent, -1, wxT("Stitch") );

    wxStaticBoxSizer *item15 = new wxStaticBoxSizer( item16, wxVERTICAL );



    wxStaticText *item17 = new wxStaticText( parent, ID_TEXT, wxT("Interpolator"), wxDefaultPosition, wxDefaultSize, 0 );

    item15->Add( item17, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



  wxString strs18[] = 

  {

    wxT("Same as panorama"),

    wxT("Nearest neighbour"), 

    wxT("Bilinear"), 

    wxT("Poly3 (Bicubic)"), 

    wxT("Spline 16"), 

    wxT("Spline 32"), 

    wxT("Spline 64"), 

    wxT("Sinc 256"), 

    wxT("Sinc 1024")

  };

    wxComboBox *item18 = new wxComboBox( parent, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(140,-1), 9, strs18, wxCB_DROPDOWN );

    item18->SetToolTip( wxT("Preview interpolator") );

    item15->Add( item18, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



    wxCheckBox *item19 = new wxCheckBox( parent, ID_CHECKBOX, wxT("Proportional feather"), wxDefaultPosition, wxDefaultSize, 0 );

    item19->SetValue( TRUE );

    item15->Add( item19, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    item7->Add( item15, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    item0->Add( item7, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



    wxStaticBox *item21 = new wxStaticBox( parent, -1, wxT("Images") );

    wxStaticBoxSizer *item20 = new wxStaticBoxSizer( item21, wxVERTICAL );



    wxPanel *item22 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(140,220), 0 );

    item20->Add( item22, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    item0->Add( item20, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxTOP|wxBOTTOM, 10 );



    if (set_sizer)

    {

        parent->SetAutoLayout( TRUE );

        parent->SetSizer( item0 );

        if (call_fit)

        {

            item0->Fit( parent );

            item0->SetSizeHints( parent );

        }

    }

    

    return item0;

}



wxSizer *Page8Func( wxWindow *parent, bool call_fit, bool set_sizer )

{

    wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );



    wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL );



    wxBoxSizer *item2 = new wxBoxSizer( wxVERTICAL );



    wxBoxSizer *item3 = new wxBoxSizer( wxHORIZONTAL );



    wxButton *item4 = new wxButton( parent, ID_BUTTON, wxT("Show stitch script"), wxDefaultPosition, wxDefaultSize, 0 );

    item4->SetToolTip( wxT("Show script in this window") );

    item3->Add( item4, 0, wxALIGN_CENTRE|wxALL, 5 );



    item3->Add( 80, 20, 0, wxALIGN_CENTRE|wxALL, 5 );



    wxButton *item5 = new wxButton( parent, ID_BUTTON, wxT("Hide script"), wxDefaultPosition, wxDefaultSize, 0 );

    item3->Add( item5, 0, wxALIGN_CENTRE|wxALL, 5 );



    item2->Add( item3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 );



    wxStaticText *item6 = new wxStaticText( parent, ID_TEXT, 

        wxT("Set panorama options in text window\n"

        "P-line could look like:  p f0 h1000 w2000 v90 JPEG q90 u20 k0"),

        wxDefaultPosition, wxDefaultSize, 0 );

    item2->Add( item6, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 );



    item1->Add( item2, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );



    wxButton *item7 = new wxButton( parent, ID_BUTTON, wxT("Stitch images"), wxDefaultPosition, wxSize(160,-1), 0 );

    item1->Add( item7, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



    item1->Add( 20, 20, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );



    wxBoxSizer *item8 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item9 = new wxStaticText( parent, ID_TEXT, wxT("Output name"), wxDefaultPosition, wxDefaultSize, 0 );

    item8->Add( item9, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



    wxTextCtrl *item10 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("test"), wxDefaultPosition, wxDefaultSize, 0 );

    item10->SetToolTip( wxT("Name of resulting panorama file") );

    item8->Add( item10, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );



    item1->Add( item8, 0, wxALIGN_CENTRE|wxALL, 5 );



    item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5 );



    wxBoxSizer *item11 = new wxBoxSizer( wxHORIZONTAL );



    wxStaticBox *item13 = new wxStaticBox( parent, -1, wxT("Images") );

    wxStaticBoxSizer *item12 = new wxStaticBoxSizer( item13, wxVERTICAL );



    wxPanel *item14 = new wxPanel( parent, ID_PANEL, wxDefaultPosition, wxSize(140,-1), 0 );

    item12->Add( item14, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    item11->Add( item12, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 10 );



    wxTextCtrl *item15 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(580,460), wxTE_MULTILINE|wxVSCROLL|wxHSCROLL );

    item11->Add( item15, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 10 );



    item0->Add( item11, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    if (set_sizer)

    {

        parent->SetAutoLayout( TRUE );

        parent->SetSizer( item0 );

        if (call_fit)

        {

            item0->Fit( parent );

            item0->SetSizeHints( parent );

        }

    }

    

    return item0;

}



wxSizer *ProjectEditFunc( wxWindow *parent, bool call_fit, bool set_sizer )

{

    wxBoxSizer *item0 = new wxBoxSizer( wxHORIZONTAL );



    wxTextCtrl *text_win = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(550,-1), wxTE_MULTILINE|wxVSCROLL|wxHSCROLL );

    item0->Add( text_win, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxTOP|wxBOTTOM, 5 );



    wxBoxSizer *item2 = new wxBoxSizer( wxVERTICAL );



    wxStaticText *item3 = new wxStaticText( parent, ID_TEXT, 

        wxT("Editor in expert mode\n"

        "\n"

        "Line Nr."),

        wxDefaultPosition, wxDefaultSize, 0 );

    item2->Add( item3, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );



    wxTextCtrl *item4 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT("0"), wxDefaultPosition, wxDefaultSize, wxTE_READONLY );

//    item4->Enable( FALSE );

    item2->Add( item4, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );



    wxButton *item5 = new wxButton( parent, ID_BUTTON, wxT("Settings OK"), wxDefaultPosition, wxDefaultSize, 0 );

    item2->Add( item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    wxButton *item6 = new wxButton( parent, ID_BUTTON, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );

    item2->Add( item6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    wxStaticText *item7 = new wxStaticText( parent, ID_TEXT, 

        wxT("This text describes the \n"

        "current status of project.\n"

        "\n"

        "\n"

        "First error:"),

        wxDefaultPosition, wxDefaultSize, 0 );

    item2->Add( item7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    wxTextCtrl *info_win = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_MULTILINE|wxVSCROLL );

    item2->Add( info_win, 0, wxGROW|wxRIGHT|wxTOP, 5 );



    item0->Add( item2, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );



    if (set_sizer)

    {

        parent->SetAutoLayout( TRUE );

        parent->SetSizer( item0 );

        if (call_fit)

        {

            item0->Fit( parent );

            item0->SetSizeHints( parent );

        }

    }

    

    return item0;

}









wxMenuBar *MainMenuBarFunc()

{

  wxMenuBar *item0 = new wxMenuBar;

    

  return item0;

}





More information about the ptX mailing list