view src/preview.cpp @ 2:0830b0d7c550

update .hgignore
author pyon@macmini
date Thu, 07 Apr 2011 19:56:47 +0900
parents e0cf49906039
children 75fefb53d983
line wrap: on
line source

// Filename   : preview.cpp
// Last Change: 07-Apr-2011.
//

#include "preview.h"

// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWidgets headers)
#ifndef WX_PRECOMP
    #include "wx/utils.h"
#endif



MyFramePreview::MyFramePreview( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer;
	bSizer = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* bSizerL;
	bSizerL = new wxBoxSizer( wxVERTICAL );
	
	m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1->Wrap( -1 );
	bSizerL->Add( m_staticText1, 0, wxALL, 5 );
	
	m_bitmap1 = new wxStaticBitmap( this, ID_IMG1, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizerL->Add( m_bitmap1, 0, wxALL, 5 );
	
	m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText2->Wrap( -1 );
	bSizerL->Add( m_staticText2, 0, wxALL, 5 );
	
	m_bitmap2 = new wxStaticBitmap( this, ID_IMG2, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizerL->Add( m_bitmap2, 0, wxALL, 5 );
	
	m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText3->Wrap( -1 );
	bSizerL->Add( m_staticText3, 0, wxALL, 5 );
	
	m_bitmap3 = new wxStaticBitmap( this, ID_IMG3, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizerL->Add( m_bitmap3, 0, wxALL, 5 );
	
	m_staticText4 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText4->Wrap( -1 );
	bSizerL->Add( m_staticText4, 0, wxALL, 5 );
	
	m_bitmap4 = new wxStaticBitmap( this, ID_IMG4, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizerL->Add( m_bitmap4, 0, wxALL, 5 );
	
	m_staticText5 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText5->Wrap( -1 );
	bSizerL->Add( m_staticText5, 0, wxALL, 5 );
	
	m_bitmap5 = new wxStaticBitmap( this, ID_IMG5, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizerL->Add( m_bitmap5, 0, wxALL, 5 );
	
	bSizer->Add( bSizerL, 0, wxEXPAND, 5 );
	
	m_scrolledWindow = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
	m_scrolledWindow->SetScrollRate( 5, 5 );
	bSizer->Add( m_scrolledWindow, 1, wxEXPAND | wxALL, 5 );
	
	m_bitmap = new wxStaticBitmap( this, ID_IMG, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizer->Add( m_bitmap, 0, wxALL, 5 );
	
	wxBoxSizer* bSizerR;
	bSizerR = new wxBoxSizer( wxVERTICAL );
	
	m_staticText = new wxStaticText( this, wxID_ANY, wxT("倍率"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText->Wrap( -1 );
	bSizerR->Add( m_staticText, 0, wxALL, 5 );
	
	m_textCtrl = new wxTextCtrl( this, ID_MGNFY, wxT("100%"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
	m_textCtrl->SetMaxLength( 4 ); 
	bSizerR->Add( m_textCtrl, 0, wxALL, 5 );
	
	m_staticTextLarge = new wxStaticText( this, wxID_ANY, wxT("[+]"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextLarge->Wrap( -1 );
	bSizerR->Add( m_staticTextLarge, 0, wxALL, 5 );
	
	m_slider = new wxSlider( this, ID_SLDR, 0, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_LEFT|wxSL_VERTICAL );
	bSizerR->Add( m_slider, 0, wxALL, 5 );
	
	m_staticTextSmall = new wxStaticText( this, wxID_ANY, wxT("[-]"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextSmall->Wrap( -1 );
	bSizerR->Add( m_staticTextSmall, 0, wxALL, 5 );
	
	
	bSizerR->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_buttonPrint = new wxButton( this, ID_PRINT, wxT("印刷"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerR->Add( m_buttonPrint, 0, wxALL, 5 );
	
	m_buttonPrintAll = new wxButton( this, ID_PRTALL, wxT("一括印刷"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerR->Add( m_buttonPrintAll, 0, wxALL, 5 );
	
	m_buttonClose = new wxButton( this, ID_CLSFRM, wxT("閉じる"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerR->Add( m_buttonClose, 0, wxALL, 5 );
	
	bSizer->Add( bSizerR, 0, wxEXPAND, 5 );
	
	this->SetSizer( bSizer );
	this->Layout();
	
	this->Centre( wxBOTH );
}

MyFramePreview::~MyFramePreview()
{
}