Beispiel #1
0
Start::Start(const wxString& title)
    : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(300, 235))

{
// blokowanie rozmiaru okna
    SetMinSize(GetSize());
    SetMaxSize(GetSize());

// wysrodkowania okna
    Centre();

// tworzenie panelu
    wxPanel *panel_s = new wxPanel(this, wxID_ANY);

// tworznie przycisku
    wxButton *button_start_N = new wxButton(panel_s, wxID_ANY, wxT("North"), wxPoint(30, 30), wxSize(100, 75));
    wxButton *button_start_S = new wxButton(panel_s, wxID_ANY, wxT("South"), wxPoint(170, 30), wxSize(100, 75));
    wxButton *button_start_Q = new wxButton(panel_s, wxID_EXIT, wxT("Koniec"), wxPoint(100, 130), wxSize(100, 50));

// akcja - klikniecie
    Connect(wxID_EXIT, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Start::OnQuit));
    button_start_N -> Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Start::OnNorth));
    button_start_S -> Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(Start::OnSouth));

// ustawienie zacznika na okreslony przycisk - taka ramka do przejscia tabulatorem
    //button_1->SetFocus();
    //button_2->SetFocus();


 }
Beispiel #2
0
// class constructor
Resound::MonitorNodeWidget::MonitorNodeWidget(wxWindow* parent, int id, ParameterAddress _addr)
		: Resound::ParameterAddressWidgetBase(parent,id,_addr)
{
	SetWindowStyle(wxSIMPLE_BORDER | wxCLIP_CHILDREN);
	SetBackgroundColour(wxColour(30,100,150));
	SetForegroundColour(wxColour(255,255,255));

	wxSize size(45,45);
	SetSize(size);
	SetMinSize(size);
	SetMaxSize(size);

	// construct the sub objects and sizer
	wxBoxSizer *topSizer = new wxBoxSizer( wxHORIZONTAL );
	wxBoxSizer *leftSizer = new wxBoxSizer( wxVERTICAL );
	SetToolTip(wxConvertMB2WX(addr.get_address().c_str())); 
	//leftSizer->Add(new wxStaticText(this,MNW_LABEL,label, wxPoint(0,0),wxSize(40,18),wxALIGN_CENTRE),wxSizerFlags(0).Align(0).Border(wxALL,0));
	//leftSizer->Add(new wxToggleButton(this,MNW_LOCKBUTTON,_("L"), wxPoint(0,0),wxSize(20,20)),wxSizerFlags(0).Center().Border(wxALL,0));
	topSizer->Add(leftSizer);
	meter = new Resound::ParameterVUMeterWidget(this,MNW_METER,rand() % 128,0,128,_(RESOURCE_DIR "/image/smMeterOff.png"),_(RESOURCE_DIR "/image/smMeterOn.png"));
	meter->SetTarget(addr);
	topSizer->Add(meter,wxSizerFlags(0).Align(0).Border(wxALL,0)); //meter1
	SetSizer(topSizer);
	//topSizer->SetSizeHints(this);   // set size hints to honour minimum size
	topSizer->Layout();
}
global_settings_control::global_settings_control(layer_control* parent, wxWindowID id, const wxString& title, long style, const wxPoint& pos, const wxSize& size) :
	wxDialog( (wxWindow*)parent, id, title, pos, size, style), m_parent(parent)
{
    wxBoxSizer *main_sizer = new wxBoxSizer(wxVERTICAL);

    wxStaticBoxSizer *intensity_sizer = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Intensity"));
    m_textMinimumGlobalIntensity = new wxTextCtrl(this,wxID_ANY);
    m_textMinimumGlobalIntensity->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
    intensity_sizer->Add(m_textMinimumGlobalIntensity, 1, wxEXPAND|wxALL|wxADJUST_MINSIZE, 5);
    m_textMaximumGlobalIntensity = new wxTextCtrl(this,wxID_ANY);
    m_textMaximumGlobalIntensity->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
    intensity_sizer->Add(m_textMaximumGlobalIntensity, 1, wxEXPAND|wxALL|wxADJUST_MINSIZE, 5);

    main_sizer->Add(intensity_sizer, 0, wxEXPAND|wxALL|wxADJUST_MINSIZE, 5);

    wxStdDialogButtonSizer *buttons_sizer = new wxStdDialogButtonSizer();
    buttons_sizer->AddButton(new wxButton(this,wxID_OK, wxT("OK")));
    buttons_sizer->AddButton(new wxButton(this,wxID_APPLY, wxT("Apply")));
    buttons_sizer->AddButton(new wxButton(this,wxID_CANCEL, wxT("Cancel")));
    buttons_sizer->Realize();
    main_sizer->Add(buttons_sizer, 0, wxALIGN_RIGHT|wxALL, 5);

    main_sizer->SetSizeHints(this);
    SetSizer(main_sizer);
    SetMaxSize(this->GetSize());
    Layout();
    Centre();
}
Beispiel #4
0
EditPathDlg::EditPathDlg(wxWindow* parent,
        const wxString& path,
        const wxString& basepath,
        const wxString& title,
        const wxString& message,
        const bool wantDir,
        const bool allowMultiSel,
        const wxString& filter)
{
    //ctor
    wxXmlResource::Get()->LoadObject(this, parent, _T("dlgEditPath"),_T("wxScrollingDialog"));

    XRCCTRL(*this, "txtPath", wxTextCtrl)->SetValue(path);
    XRCCTRL(*this, "dlgEditPath", wxScrollingDialog)->SetTitle(title);

    if (!wantDir) {
        XRCCTRL(*this, "lblText", wxStaticText)->SetLabel(_("File:"));
    }

    m_Path = path;
    m_WantDir = wantDir;
    m_AllowMultiSel = allowMultiSel;
    m_Message = message;
    m_Basepath = basepath;
    m_Filter = filter;
    m_AskMakeRelative = true;
    m_ShowCreateDirButton = false;
    XRCCTRL(*this, "txtPath", wxTextCtrl)->SetFocus();

    // Limit vertical resizing.
    SetMaxSize(wxSize(-1, GetMinHeight()));
}
Beispiel #5
0
    void setImage(wxString path)
    {
        m_image_path = path;

        if(path.EndsWith(wxT(".icns"))) {
            wxExecute(wxT("sips -s format png '") + path + wxT("' --out /tmp/tmpicon.png"), wxEXEC_SYNC);
            path = wxT("/tmp/tmpicon.png");
        }

        m_image.LoadFile(path, wxBITMAP_TYPE_ANY);

        if(m_image.IsOk()) {
            if(m_image.GetWidth() > 50 or m_image.GetHeight() > 50) {
                wxImage tmp = m_image.ConvertToImage();
                tmp.Rescale(50, 50, wxIMAGE_QUALITY_HIGH);
                m_image = wxBitmap(tmp);
            }

            const int w = m_image.GetWidth();
            const int h = m_image.GetHeight();
            SetMinSize(wxSize(w + 20, h + 20));
            SetMaxSize(wxSize(w + 20, h + 20));
            Refresh(); // repaint needed to see change
        } else {
            wxMessageBox(_("Failed to load image"));
        }
    }
void ParticleScene::Initialize(const GameContext& gameContext)
{
	UNREFERENCED_PARAMETER(gameContext);

	m_pRootObject = new GameObject();
	AddChild(m_pRootObject);

	auto particleObj = new GameObject();
	auto particleEmitter = new ParticleEmitterComponent(L"./Resources/Textures/Smoke.png", 60);
	particleEmitter->SetVelocity(XMFLOAT3(0, 6.0f, 0));
	particleEmitter->SetMinSize(1.0f);
	particleEmitter->SetMaxSize(2.0f);
	particleEmitter->SetMinEnergy(1.0f);
	particleEmitter->SetMaxEnergy(2.0f);
	particleEmitter->SetMinSizeGrow(3.5f);
	particleEmitter->SetMaxSizeGrow(5.5f);
	particleEmitter->SetMinEmitterRange(0.2f);
	particleEmitter->SetMaxEmitterRange(0.5f);
	particleEmitter->SetColor(XMFLOAT4(1.f, 1.f, 1.f, 0.6f));
	particleObj->AddComponent(particleEmitter);
	m_pRootObject->AddChild(particleObj);

	auto mat = new ColorMaterial();
	gameContext.pMaterialManager->AddMaterial(mat, 103);

	auto modelObj = new GameObject();
	auto model = new ModelComponent(L"./Resources/Meshes/Teapot.ovm");
	model->SetMaterial(103);
	modelObj->AddComponent(model);
	m_pRootObject->AddChild(modelObj);
	modelObj->GetTransform()->Scale(0.2f, 0.2f, 0.2f);
}
/* ThingDirCanvas::ThingDirCanvas
 * ThingDirCanvas class constructor
 *******************************************************************/
ThingDirCanvas::ThingDirCanvas(wxWindow* parent) : OGLCanvas(parent, -1, true, 15)
{
	// Init variables
	angle = 0;
	point_hl = -1;
	last_check = 0;
	point_sel = -1;

	// Get system panel background colour
	wxColour bgcolwx = Drawing::getPanelBGColour();
	col_bg.set(bgcolwx.Red(), bgcolwx.Green(), bgcolwx.Blue());

	// Get system text colour
	wxColour textcol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
	col_fg.set(textcol.Red(), textcol.Green(), textcol.Blue());

	// Setup dir points
	double rot = 0;
	for (int a = 0; a < 8; a++)
	{
		dir_points.push_back(fpoint2_t(sin(rot), 0 - cos(rot)));
		rot -= (3.1415926535897932384626433832795 * 2) / 8.0;
	}
	
	// Bind Events
	Bind(wxEVT_MOTION, &ThingDirCanvas::onMouseEvent, this);
	Bind(wxEVT_LEAVE_WINDOW, &ThingDirCanvas::onMouseEvent, this);
	Bind(wxEVT_LEFT_DOWN, &ThingDirCanvas::onMouseEvent, this);

	// Fixed size
	SetInitialSize(wxSize(128, 128));
	SetMaxSize(wxSize(128, 128));
}
Beispiel #8
0
DebugCoreDumpDlg::DebugCoreDumpDlg(wxWindow* parent)
    : DebugCoreDumpDlgBase(parent)
{
    // Prevent enormously-long strings from crowding the browse buttons off the screen
    wxDisplay display;
    int width = display.GetClientArea().GetWidth();
    wxSize size(width / 4, -1);
    m_Core->SetInitialSize(size);
    m_ExeFilepath->SetInitialSize(size);
    m_WD->SetInitialSize(size);

    SetMaxSize(wxSize(width * 2 / 3, -1));
    GetSizer()->Layout();
    GetSizer()->Fit(this);
    
    SetName("DebugCoreDumpDlg");
    WindowAttrManager::Load(this);

    Initialize();
    if(m_Core->GetCount() == 0) {
        // If there's no known core yet, set focus here so one can be added
        m_Core->SetFocus();
    } else {
        m_buttonDebug->SetFocus();
    }
}
ConfigSettingsPanel::ConfigSettingsPanel(wxWindow* parent)
{
	//(*Initialize(ConfigSettingsPanel)
	Create(parent, wxID_ANY, wxDefaultPosition, wxSize(531,310), wxTAB_TRAVERSAL, _T("wxID_ANY"));
	SetMaxSize(wxSize(-1,-1));
	NotebookConfigPanels = new wxNotebook(this, ID_NOTEBOOKCONFIGPANELS, wxPoint(0,0), wxSize(448,416), 0, _T("ID_NOTEBOOKCONFIGPANELS"));
	//*)
}
Beispiel #10
0
// This is overloaded in wxSlider so that the proper width/height will always be used
// for the slider different values would cause redrawing and mouse detection problems
//
void wxSlider::DoSetSizeHints( int minW, int minH,
    int maxW, int maxH,
    int WXUNUSED(incW), int WXUNUSED(incH) )
{
    wxSize size = GetBestSize();

    if (GetWindowStyle() & wxSL_VERTICAL)
    {
        SetMinSize( wxSize(size.x,minH) );
        SetMaxSize( wxSize(size.x,maxH) );
    }
    else
    {
        SetMinSize( wxSize(minW,size.y) );
        SetMaxSize( wxSize(maxW,size.y) );
    }
}
Beispiel #11
0
void Rtestsh1::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(Rtestsh1)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
	SetMaxSize(CRect(0,0,1600,1200));
}
Beispiel #12
0
DiffBar::DiffBar(wxWindow* parent, CatalystWrapper& cw, EditorCtrl* leftEditor, EditorCtrl* rightEditor):
	wxControl(parent, wxID_ANY, wxPoint(-100,-100), wxSize(40,100), wxNO_BORDER|wxWANTS_CHARS|wxCLIP_CHILDREN|wxNO_FULL_REPAINT_ON_RESIZE),
	m_catalyst(cw), m_leftEditor(leftEditor), m_rightEditor(rightEditor), m_leftStyler(m_diffs, true), m_rightStyler(m_diffs, false),
	m_needRedraw(false), m_needTransform(false), m_highlight(-1) 
{
	SetMinSize(wxSize(40, -1));
	SetMaxSize(wxSize(40, -1));
}
Beispiel #13
0
void ModelPreview::SetCanvasSize(int width,int height)
{
    SetSize(width,height);
    wxSize s;
    s.SetWidth(width);
    s.SetHeight(height);
    SetMaxSize(s);
    SetMinSize(s);
}
Beispiel #14
0
	SToolBarVLine(wxWindow* parent) : wxControl(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE)
	{
		// Set size
		SetMaxSize(wxSize(-1, 2));
		SetMinSize(wxSize(-1, 2));

		// Set window name
		SetName("tb_vline");

		// Bind events
		Bind(wxEVT_PAINT, &SToolBarVLine::onPaint, this);
	}
Beispiel #15
0
void tpanel_item::NotifySizeChange() {
	wxSize clientsize = parent->GetClientSize();
	SetMinSize(wxSize(clientsize.x, 1));
	SetMaxSize(wxSize(clientsize.x, 100000));
	wxSize bestsize = DoGetBestSize();
	SetSize(clientsize.x, bestsize.y);

	if (!parent->resize_update_pending) {
		parent->resize_update_pending = true;
		parent->Freeze();
		wxCommandEvent event(wxextRESIZE_UPDATE_EVENT, GetId());
		parent->GetEventHandler()->AddPendingEvent(event);
	}
}
EditBreakpointDlg::EditBreakpointDlg(const DebuggerBreakpoint &breakpoint, wxWindow* parent)
    : m_breakpoint(breakpoint)
{
    //ctor
    wxXmlResource::Get()->LoadObject(this, parent, _T("dlgEditBreakpoint"),_T("wxScrollingDialog"));

    XRCCTRL(*this, "chkEnabled", wxCheckBox)->SetValue(m_breakpoint.enabled);
    XRCCTRL(*this, "chkIgnore", wxCheckBox)->SetValue(m_breakpoint.useIgnoreCount);
    XRCCTRL(*this, "spnIgnoreCount", wxSpinCtrl)->SetValue(m_breakpoint.ignoreCount);
    XRCCTRL(*this, "chkExpr", wxCheckBox)->SetValue(m_breakpoint.useCondition);
    XRCCTRL(*this, "txtExpr", wxTextCtrl)->SetValue(m_breakpoint.condition);

    // Limit vertical resizing.
    SetMaxSize(wxSize(-1, GetMinHeight()));
}
Beispiel #17
0
void Fire::Initialize(const GameContext& gameContext)
{
	auto particleObj = new GameObject();
	auto particleEmitter = new ParticleEmitterComponent(L"./Resources/Textures/Flames.png", 35);
	particleEmitter->SetVelocity(m_Velocity);
	particleEmitter->SetMinSize(3);
	particleEmitter->SetMaxSize(4);
	particleEmitter->SetMinEnergy(0.55f);
	particleEmitter->SetMaxEnergy(.85f);
	particleEmitter->SetMinSizeGrow(1.f);
	particleEmitter->SetMaxSizeGrow(1.5f);
	particleEmitter->SetMinEmitterRange(-1);
	particleEmitter->SetMaxEmitterRange(1);
	particleEmitter->SetColor(XMFLOAT4(1.f, 1.f, 1.f, 1.f));
	particleEmitter->SetActive(true);
	particleObj->AddComponent(particleEmitter);
	AddChild(particleObj);
}
void Laser::Initialize(const GameContext& gameContext)
{
	auto particleObj = new GameObject();
	auto particleEmitter = new ParticleEmitterComponent(L"./Resources/Textures/laser.png", 85);
	particleEmitter->SetVelocity(m_Velocity);
	particleEmitter->SetMinSize(1.75f);
	particleEmitter->SetMaxSize(1.75f);
	particleEmitter->SetMinEnergy(0.75f);
	particleEmitter->SetMaxEnergy(0.75f);
	particleEmitter->SetMinSizeGrow(1.f);
	particleEmitter->SetMaxSizeGrow(1.f);
	particleEmitter->SetMinEmitterRange(0);
	particleEmitter->SetMaxEmitterRange(0);
	particleEmitter->SetColor(XMFLOAT4(1.f, 1.f, 1.f, 1.f));
	particleEmitter->SetRandomRot(false);
	particleEmitter->SetActive(true);
	particleObj->AddComponent(particleEmitter);
	AddChild(particleObj);	
}
Beispiel #19
0
bool CAbout::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
  wxDialog::Create( parent, id, caption, pos, size, style );

  CreateControls();
  if (GetSizer())
  {
    GetSizer()->SetSizeHints(this);
    // currently (wx 3.0.2 GTK+) after SetSizeHints() style flags are ignored
    // and maximize/minimize buttons reappear, so we need to force max size
    // to remove maximize and minimize buttons
    if (! (style & wxMAXIMIZE_BOX)) {
      SetMaxSize(GetSize());
    }
  }
  Centre();
  return true;
}
Beispiel #20
0
void nkToolBar::evtRepintar(wxPaintEvent& WXUNUSED(evt)){
	wxPaintDC dc(this);
	int alto = 0, ancho = 0;
	int ancho_real, alto_real;
	int xx = 0, yy = 0;
	CalcScrolledPosition(xx, yy, &xx, &yy);
	for (nkListaMenu::Node *node = prv_listaMenus.GetFirst(); node; node = node->GetNext() ){
		nkMenuTool *contador = node->GetData();
		contador->Move(xx, alto + yy);
		alto = alto + contador->obtenerTamanio().GetHeight();
		if (ancho<contador->obtenerTamanio().GetWidth()){
			ancho = contador->obtenerTamanio().GetWidth();
		}
		contador->Refresh();
	}
	ancho_real = GetClientSize().GetWidth();
	alto_real = GetClientSize().GetHeight();

	SetVirtualSize(ancho, alto);
	SetMaxSize(wxSize(ancho+ALINEACION, alto+ALINEACION));
}
Beispiel #21
0
FbViewerDlg::FbViewerDlg( wxWindow* parent, const wxString& type, const wxString& value, bool relative)
	: FbDialog( parent, wxID_ANY, _("Customize"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER), m_coolreader(NULL), m_relative(relative)
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );

	wxBoxSizer* bSizerMain = new wxBoxSizer( wxVERTICAL );

	wxString msg = _("Select the application to view files") + COLON + type;
	wxStaticText* stTitle = new wxStaticText( this, wxID_ANY, msg, wxDefaultPosition, wxDefaultSize, 0 );
	stTitle->Wrap( -1 );
	bSizerMain->Add( stTitle, 0, wxALL, 5 );

	m_filename = new FbCustomCombo( this, ID_FILENAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
	m_filename->SetMinSize( wxSize( 300,-1 ) );
	bSizerMain->Add( m_filename, 0, wxALL|wxEXPAND, 5 );

	#ifdef FB_INCLUDE_READER
	m_coolreader = new wxCheckBox( this, ID_COOLREADER, _("Use builtin CoolReader3"));
	bSizerMain->Add( m_coolreader, 0, wxEXPAND|wxALL, 5 );
	#endif // FB_INCLUDE_READER

	if (value == wxT('*')) {
		if (m_coolreader) m_coolreader->SetValue(true);
	} else {
		m_filename->SetValue(value);
	}

	wxStdDialogButtonSizer * sdbSizerBtn = CreateStdDialogButtonSizer( wxOK | wxCANCEL );
	bSizerMain->Add( sdbSizerBtn, 0, wxEXPAND | wxALL, 5 );

	SetSizer( bSizerMain );
	Layout();
	bSizerMain->Fit( this );
	m_filename->SetFocus();

	wxSize size = GetBestSize();
	SetMaxSize(wxSize(-1, size.y));
	SetMinSize(size);
}
Beispiel #22
0
void AssistPanel::AdjustSize(wxSize& s)
{
    SetSize(s);
    SetMinSize(s);
    SetMaxSize(s);

	if( mGridCanvas != nullptr )
    {
        mGridCanvas->AdjustSize(s);
        mGridCanvas->Refresh();
    }

    ScrolledWindowAssist->SetSize(s);
    ScrolledWindowAssist->SetMinSize(s);
    ScrolledWindowAssist->SetMaxSize(s);

    ScrolledWindowAssist->FitInside();
    ScrolledWindowAssist->SetScrollRate(5, 5);
    ScrolledWindowAssist->Refresh();

    Refresh();
}
Beispiel #23
0
AboutDialog::AboutDialog( wxWindow* parent ) :
    wxDialog( parent, wxID_ANY, wxT("About"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE )
{

	wxFlexGridSizer* fgSizer1;
	fgSizer1 = new wxFlexGridSizer( 2, 1, 0, 0 );
	fgSizer1->AddGrowableCol( 0 );
	fgSizer1->SetFlexibleDirection( wxBOTH );
	
	wxFlexGridSizer* fgSizer3;
	fgSizer3 = new wxFlexGridSizer( 2, 2, 0, 0 );
	fgSizer3->AddGrowableRow( 0 );
	fgSizer3->AddGrowableRow( 1 );
	fgSizer3->SetFlexibleDirection( wxBOTH );
	
	fgSizer3->SetMinSize(wxSize( -1,70 )); 
	m_bitmap31 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
	m_bitmap31->SetIcon(wxICON(decodaIcon));
    fgSizer3->Add( m_bitmap31, 0, wxALL, 15 );
	
	wxBoxSizer* bSizer4;
	bSizer4 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("Decoda"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText3->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Tahoma") ) );
	
	bSizer4->Add( m_staticText3, 0, wxALL, 5 );
	
    wxString message = MainApp::s_versionDesc;
    
#ifdef DEDICATED_PRODUCT_VERSION
    message += wxString::Format( wxT("\n%s edition"), GetDedicatedProductName() );
#endif

	m_staticText13 = new wxStaticText( this, wxID_ANY, message, wxDefaultPosition, wxDefaultSize, 0 );
	bSizer4->Add( m_staticText13, 0, wxALL, 5 );
	
	fgSizer3->Add( bSizer4, 1, wxALIGN_CENTER_VERTICAL, 5 );
	
	fgSizer1->Add( fgSizer3, 1, wxALIGN_CENTER | wxALL, 15 );
	
	wxFlexGridSizer* fgSizer6;
	fgSizer6 = new wxFlexGridSizer( 1, 1, 0, 0 );
	fgSizer6->AddGrowableCol( 0 );
	fgSizer6->AddGrowableRow( 0 );
	fgSizer6->SetFlexibleDirection( wxBOTH );

	wxFlexGridSizer* fgSizer4;
	fgSizer4 = new wxFlexGridSizer( 1, 1, 0, 0 );
	fgSizer4->AddGrowableCol( 0 );
	fgSizer4->AddGrowableRow( 0 );
	fgSizer4->SetFlexibleDirection( wxBOTH );
	
	fgSizer4->SetMinSize(wxSize( -1,50 )); 
	m_staticText15 = new wxHyperlinkCtrl( this, wxID_ANY, wxT("Unknown Worlds Entertainment"), wxT("http://www.unknownworlds.com"), wxDefaultPosition, wxSize( -1,30 ));
	m_staticText15->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) );
	
	fgSizer4->Add( m_staticText15, 0, wxALIGN_CENTER|wxALL, 5 );
	
	fgSizer1->Add( fgSizer4, 1, wxALIGN_CENTER, 5 );
	
	wxFlexGridSizer* fgSizer2;
	fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 );
	fgSizer2->AddGrowableRow( 1 );
	fgSizer2->SetFlexibleDirection( wxBOTH );
	
	m_staticText9 = new wxStaticText( this, wxID_ANY, wxT("Created by:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText9->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) );
	
	fgSizer2->Add( m_staticText9, 0, wxALL, 5 );
	
	m_staticText10 = new wxStaticText( this, wxID_ANY, wxT("Max McGuire"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText10->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) );
	
	fgSizer2->Add( m_staticText10, 0, wxALL, 5 );
	
	m_staticText11 = new wxStaticText( this, wxID_ANY, wxT("Special thanks:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText11->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) );
	
	fgSizer2->Add( m_staticText11, 0, wxALL, 5 );
	
	m_staticText12 = new wxStaticText( this, wxID_ANY, wxT("Charlie Cleveland, Bram de Greve, Garry Newman, Kurt Miller,\nJames Clarendon, Dan Higgins, Paul Nettle, Peter Loveday, Jeff Petkau,\nBrian Weed and the developers of wxWidgets, Scintilla and Lua"), wxDefaultPosition, wxSize( -1,70 ), 0 );
	m_staticText12->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) );
	
	fgSizer2->Add( m_staticText12, 0, wxALL, 5 );
	
	fgSizer1->Add( fgSizer2, 1, wxALIGN_CENTER|wxALL, 10 );
	
	m_sdbSizer2 = new wxStdDialogButtonSizer();
	m_sdbSizer2->AddButton( new wxButton( this, wxID_OK ) );
	m_sdbSizer2->Realize();
	fgSizer1->Add( m_sdbSizer2, 0, wxALIGN_CENTER|wxALL, 10 );
	
	SetSizer( fgSizer1 );
	
    wxSize minSize = fgSizer1->GetMinSize();
    SetClientSize(minSize);
    SetMinSize(GetSize());
    SetMaxSize(GetSize());
    
    Layout();

}
LMSImportChannelMapDialog::LMSImportChannelMapDialog(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size)
{
	//(*Initialize(LMSImportChannelMapDialog)
	wxButton* Button01;
	wxButton* Button02;
	wxStaticText* StaticText1;
	wxFlexGridSizer* FlexGridSizer3;
	wxStdDialogButtonSizer* StdDialogButtonSizer1;

	Create(parent, wxID_ANY, _("Map Channels"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER, _T("wxID_ANY"));
	SetMaxSize(wxDLG_UNIT(parent,wxSize(-1,500)));
	Sizer = new wxFlexGridSizer(0, 1, 0, 0);
	Sizer->AddGrowableCol(0);
	Sizer->AddGrowableRow(2);
	FlexGridSizer1 = new wxFlexGridSizer(0, 3, 0, 0);
	ModelsChoice = new wxChoice(this, ID_CHOICE1, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE1"));
	FlexGridSizer1->Add(ModelsChoice, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	AddModelButton = new wxButton(this, ID_BUTTON_ADDMODEL, _("Add Model For Import"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON_ADDMODEL"));
	FlexGridSizer1->Add(AddModelButton, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	TimeAdjustPanel = new wxPanel(this, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL1"));
	TimeAdjustPanel->Hide();
	FlexGridSizer3 = new wxFlexGridSizer(0, 2, 0, 0);
	StaticText1 = new wxStaticText(TimeAdjustPanel, wxID_ANY, _("Time Adjust (ms)"), wxDefaultPosition, wxDefaultSize, 0, _T("wxID_ANY"));
	FlexGridSizer3->Add(StaticText1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	TimeAdjustSpinCtrl = new wxSpinCtrl(TimeAdjustPanel, ID_SPINCTRL1, _T("0"), wxDefaultPosition, wxDefaultSize, 0, -10000, 10000, 0, _T("ID_SPINCTRL1"));
	TimeAdjustSpinCtrl->SetValue(_T("0"));
	FlexGridSizer3->Add(TimeAdjustSpinCtrl, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	TimeAdjustPanel->SetSizer(FlexGridSizer3);
	FlexGridSizer3->Fit(TimeAdjustPanel);
	FlexGridSizer3->SetSizeHints(TimeAdjustPanel);
	FlexGridSizer1->Add(TimeAdjustPanel, 1, wxALL|wxEXPAND, 1);
	Sizer->Add(FlexGridSizer1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	SizerMap = new wxFlexGridSizer(0, 1, 0, 0);
	MapByStrand = new wxCheckBox(this, ID_CHECKBOX1, _("Map by Strand/CCR"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX1"));
	MapByStrand->SetValue(false);
	SizerMap->Add(MapByStrand, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	ChannelMapGrid = new wxGrid(this, ID_GRID1, wxDefaultPosition, wxDefaultSize, wxVSCROLL|wxHSCROLL, _T("ID_GRID1"));
	ChannelMapGrid->CreateGrid(18,9);
	ChannelMapGrid->SetMaxSize(wxDLG_UNIT(this,wxSize(-1,440)));
	ChannelMapGrid->EnableEditing(true);
	ChannelMapGrid->EnableGridLines(true);
	ChannelMapGrid->SetColLabelValue(0, _("Model"));
	ChannelMapGrid->SetColLabelValue(1, _("Strand"));
	ChannelMapGrid->SetColLabelValue(2, _("Node"));
	ChannelMapGrid->SetColLabelValue(3, _("Channel"));
	ChannelMapGrid->SetColLabelValue(4, _("Color"));
	ChannelMapGrid->SetDefaultCellFont( ChannelMapGrid->GetFont() );
	ChannelMapGrid->SetDefaultCellTextColour( ChannelMapGrid->GetForegroundColour() );
	SizerMap->Add(ChannelMapGrid, 1, wxALL|wxEXPAND, 5);
	Sizer->Add(SizerMap, 0, wxEXPAND, 0);
	FlexGridSizer2 = new wxFlexGridSizer(0, 5, 0, 0);
	StdDialogButtonSizer1 = new wxStdDialogButtonSizer();
	StdDialogButtonSizer1->AddButton(new wxButton(this, wxID_OK, wxEmptyString));
	StdDialogButtonSizer1->AddButton(new wxButton(this, wxID_CANCEL, wxEmptyString));
	StdDialogButtonSizer1->Realize();
	FlexGridSizer2->Add(StdDialogButtonSizer1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	FlexGridSizer2->Add(-1,-1,1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	FlexGridSizer2->Add(-1,-1,1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Button01 = new wxButton(this, ID_BUTTON1, _("Load Mapping"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
	FlexGridSizer2->Add(Button01, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Button02 = new wxButton(this, ID_BUTTON2, _("Save Mapping"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
	FlexGridSizer2->Add(Button02, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Sizer->Add(FlexGridSizer2, 1, wxALL|wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL, 5);
	SetSizer(Sizer);
	Sizer->Fit(this);
	Sizer->SetSizeHints(this);

	Connect(ID_BUTTON_ADDMODEL,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&LMSImportChannelMapDialog::OnAddModelButtonClick);
	Connect(ID_CHECKBOX1,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&LMSImportChannelMapDialog::OnMapByStrandClick);
	Connect(ID_GRID1,wxEVT_GRID_CELL_LEFT_DCLICK,(wxObjectEventFunction)&LMSImportChannelMapDialog::OnChannelMapGridCellLeftDClick);
	Connect(ID_GRID1,wxEVT_GRID_CELL_CHANGE,(wxObjectEventFunction)&LMSImportChannelMapDialog::OnChannelMapGridCellChange);
	Connect(ID_GRID1,wxEVT_GRID_EDITOR_HIDDEN,(wxObjectEventFunction)&LMSImportChannelMapDialog::OnChannelMapGridEditorHidden);
	Connect(ID_GRID1,wxEVT_GRID_EDITOR_SHOWN,(wxObjectEventFunction)&LMSImportChannelMapDialog::OnChannelMapGridEditorShown);
	Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&LMSImportChannelMapDialog::LoadMapping);
	Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&LMSImportChannelMapDialog::SaveMapping);
	Connect(wxEVT_SIZE,(wxObjectEventFunction)&LMSImportChannelMapDialog::OnResize);
	//*)
}
PacketTestFrame::PacketTestFrame(wxWindow* parent,wxWindowID id)
{
    //(*Initialize(PacketTestFrame)
    wxMenuItem* MenuItem2;
    wxMenuItem* MenuItem1;
    wxMenu* Menu1;
    wxMenuBar* MenuBar1;
    wxMenu* Menu2;

    Create(parent, wxID_ANY, _("PacketTest"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE, _T("wxID_ANY"));
    SetClientSize(wxSize(400,600));
    SetMinSize(wxSize(400,600));
    SetMaxSize(wxSize(400,600));
    {
    	wxIcon FrameIcon;
    	FrameIcon.CopyFromBitmap(wxBitmap(wxImage(_T("/media/DATA/Documents/Web management/imgE.jpg"))));
    	SetIcon(FrameIcon);
    }
    Panel1 = new wxPanel(this, ID_PANEL1, wxPoint(80,264), wxSize(400,600), wxTAB_TRAVERSAL, _T("ID_PANEL1"));
    Panel1->SetMinSize(wxSize(-1,-1));
    Panel1->SetMaxSize(wxSize(800,600));
    StaticText1 = new wxStaticText(Panel1, ID_STATICTEXT1, _("Packet Test"), wxPoint(152,24), wxDefaultSize, wxALIGN_CENTRE, _T("ID_STATICTEXT1"));
    wxFont StaticText1Font(12,wxSWISS,wxFONTSTYLE_NORMAL,wxBOLD,false,_T("Sans"),wxFONTENCODING_DEFAULT);
    StaticText1->SetFont(StaticText1Font);
    StaticText2 = new wxStaticText(Panel1, ID_STATICTEXT2, _("Destination Address"), wxPoint(24,72), wxDefaultSize, 0, _T("ID_STATICTEXT2"));
    TextDst = new wxTextCtrl(Panel1, ID_TEXTCTRL1, wxEmptyString, wxPoint(216,72), wxSize(160,32), 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
    StaticText3 = new wxStaticText(Panel1, ID_STATICTEXT3, _("Spoof Address"), wxPoint(24,128), wxDefaultSize, 0, _T("ID_STATICTEXT3"));
    TextSpoof = new wxTextCtrl(Panel1, ID_TEXTCTRL2, wxEmptyString, wxPoint(216,128), wxSize(160,32), 0, wxDefaultValidator, _T("ID_TEXTCTRL2"));
    ComboProtocol = new wxComboBox(Panel1, ID_COMBOBOX1, wxEmptyString, wxPoint(216,176), wxSize(166,32), 0, 0, 0, wxDefaultValidator, _T("ID_COMBOBOX1"));
    ComboProtocol->Append(_("TCP"));
    ComboProtocol->Append(_("ICMP"));
    ComboProtocol->Append(_("UDP"));
    StaticText4 = new wxStaticText(Panel1, ID_STATICTEXT4, _("Protocol"), wxPoint(24,184), wxDefaultSize, 0, _T("ID_STATICTEXT4"));
    CheckSyn = new wxCheckBox(Panel1, ID_CHECKBOX1, _("Synchronous"), wxPoint(24,232), wxSize(144,26), 0, wxDefaultValidator, _T("ID_CHECKBOX1"));
    CheckSyn->SetValue(false);
    StaticText5 = new wxStaticText(Panel1, ID_STATICTEXT5, _("Size"), wxPoint(24,280), wxDefaultSize, 0, _T("ID_STATICTEXT5"));
    TextDataSize = new wxTextCtrl(Panel1, ID_TEXTCTRL3, wxEmptyString, wxPoint(216,272), wxSize(160,32), 0, wxDefaultValidator, _T("ID_TEXTCTRL3"));
    StaticText6 = new wxStaticText(Panel1, ID_STATICTEXT6, _("Data File"), wxPoint(24,336), wxDefaultSize, 0, _T("ID_STATICTEXT6"));
    TextDataFile = new wxTextCtrl(Panel1, ID_TEXTCTRL4, wxEmptyString, wxPoint(216,336), wxSize(160,32), 0, wxDefaultValidator, _T("ID_TEXTCTRL4"));
    Button1 = new wxButton(Panel1, ID_BUTTON1, _("Start"), wxPoint(64,480), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
    StaticText7 = new wxStaticText(Panel1, ID_STATICTEXT7, _("Max Packets"), wxPoint(24,376), wxSize(88,22), 0, _T("ID_STATICTEXT7"));
    TextMax = new wxTextCtrl(Panel1, ID_TEXTCTRL5, wxEmptyString, wxPoint(216,384), wxSize(144,32), 0, wxDefaultValidator, _T("ID_TEXTCTRL5"));
    StaticText8 = new wxStaticText(Panel1, ID_STATICTEXT8, _("Port"), wxPoint(224,232), wxDefaultSize, 0, _T("ID_STATICTEXT8"));
    TextPort = new wxTextCtrl(Panel1, ID_TEXTCTRL6, wxEmptyString, wxPoint(272,232), wxSize(104,32), 0, wxDefaultValidator, _T("ID_TEXTCTRL6"));
    StaticText9 = new wxStaticText(Panel1, ID_STATICTEXT9, _("DTS"), wxPoint(24,432), wxDefaultSize, 0, _T("ID_STATICTEXT9"));
    TextDts = new wxTextCtrl(Panel1, ID_TEXTCTRL7, wxEmptyString, wxPoint(80,432), wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL7"));
    CheckFlood = new wxCheckBox(Panel1, ID_CHECKBOX2, _("Flood Mode"), wxPoint(224,432), wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX2"));
    CheckFlood->SetValue(false);
    CheckFlood->SetToolTip(_("Overrides DTS and Max"));
    Button2 = new wxButton(Panel1, ID_BUTTON2, _("Stop"), wxPoint(216,480), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
    MenuBar1 = new wxMenuBar();
    Menu1 = new wxMenu();
    MenuItem1 = new wxMenuItem(Menu1, idMenuQuit, _("Quit\tAlt-F4"), _("Quit the application"), wxITEM_NORMAL);
    Menu1->Append(MenuItem1);
    MenuBar1->Append(Menu1, _("&File"));
    Menu2 = new wxMenu();
    MenuItem2 = new wxMenuItem(Menu2, idMenuAbout, _("About\tF1"), _("Show info about this application"), wxITEM_NORMAL);
    Menu2->Append(MenuItem2);
    MenuBar1->Append(Menu2, _("Help"));
    SetMenuBar(MenuBar1);
    StatusBar1 = new wxStatusBar(this, ID_STATUSBAR1, 0, _T("ID_STATUSBAR1"));
    int __wxStatusBarWidths_1[1] = { -1 };
    int __wxStatusBarStyles_1[1] = { wxSB_NORMAL };
    StatusBar1->SetFieldsCount(1,__wxStatusBarWidths_1);
    StatusBar1->SetStatusStyles(1,__wxStatusBarStyles_1);
    SetStatusBar(StatusBar1);
    Center();

    Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&PacketTestFrame::OnButton1Click);
    Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&PacketTestFrame::OnButton2Click);
    Connect(idMenuQuit,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&PacketTestFrame::OnQuit);
    Connect(idMenuAbout,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&PacketTestFrame::OnAbout);
    //*)
}
Beispiel #26
0
void wxAuiFloatingFrame::SetPaneWindow(const wxAuiPaneInfo& pane)
{
    m_pane_window = pane.window;
    m_pane_window->Reparent(this);

    wxAuiPaneInfo contained_pane = pane;
    contained_pane.Dock().Center().Show().
                    CaptionVisible(false).
                    PaneBorder(false).
                    Layer(0).Row(0).Position(0);

    // Carry over the minimum size
    wxSize pane_min_size = pane.window->GetMinSize();

    // if the frame window's max size is greater than the min size
    // then set the max size to the min size as well
    wxSize cur_max_size = GetMaxSize();
    if (cur_max_size.IsFullySpecified() &&
          (cur_max_size.x < pane.min_size.x ||
           cur_max_size.y < pane.min_size.y)
       )
    {
        SetMaxSize(pane_min_size);
    }

    SetMinSize(pane.window->GetMinSize());

    m_mgr.AddPane(m_pane_window, contained_pane);
    m_mgr.Update();

    if (pane.min_size.IsFullySpecified())
    {
        // because SetSizeHints() calls Fit() too (which sets the window
        // size to its minimum allowed), we keep the size before calling
        // SetSizeHints() and reset it afterwards...
        wxSize tmp = GetSize();
        GetSizer()->SetSizeHints(this);
        SetSize(tmp);
    }

    SetTitle(pane.caption);

    // This code is slightly awkward because we need to reset wxRESIZE_BORDER
    // before calling SetClientSize() below as doing it after setting the
    // client size would actually change it, at least under MSW, where the
    // total window size doesn't change and hence, as the borders size changes,
    // the client size does change.
    //
    // So we must call it first but doing it generates a size event and updates
    // pane.floating_size from inside it so we must also record its original
    // value before doing it.
    const bool hasFloatingSize = pane.floating_size != wxDefaultSize;
    if (pane.IsFixed())
    {
        SetWindowStyleFlag(GetWindowStyleFlag() & ~wxRESIZE_BORDER);
    }

    if ( hasFloatingSize )
    {
        SetSize(pane.floating_size);
    }
    else
    {
        wxSize size = pane.best_size;
        if (size == wxDefaultSize)
            size = pane.min_size;
        if (size == wxDefaultSize)
            size = m_pane_window->GetSize();
        if (m_owner_mgr && pane.HasGripper())
        {
            if (pane.HasGripperTop())
                size.y += m_owner_mgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE);
            else
                size.x += m_owner_mgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE);
        }

        SetClientSize(size);
    }
}
Beispiel #27
0
AudioBox::AudioBox(wxWindow *parent, agi::Context *context)
: wxSashWindow(parent, -1, wxDefaultPosition, wxDefaultSize, wxSW_3D | wxCLIP_CHILDREN)
, controller(context->audioController.get())
, context(context)
, audio_open_connection(context->audioController->AddAudioPlayerOpenListener(&AudioBox::OnAudioOpen, this))
, panel(new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL | wxBORDER_RAISED))
, audioDisplay(new AudioDisplay(panel, context->audioController.get(), context))
, HorizontalZoom(new wxSlider(panel, Audio_Horizontal_Zoom, -OPT_GET("Audio/Zoom/Horizontal")->GetInt(), -50, 30, wxDefaultPosition, wxSize(-1, 20), wxSL_VERTICAL|wxSL_BOTH))
, VerticalZoom(new wxSlider(panel, Audio_Vertical_Zoom, OPT_GET("Audio/Zoom/Vertical")->GetInt(), 0, 100, wxDefaultPosition, wxSize(-1, 20), wxSL_VERTICAL|wxSL_BOTH|wxSL_INVERSE))
, VolumeBar(new wxSlider(panel, Audio_Volume, OPT_GET("Audio/Volume")->GetInt(), 0, 100, wxDefaultPosition, wxSize(-1, 20), wxSL_VERTICAL|wxSL_BOTH|wxSL_INVERSE))
{
	SetSashVisible(wxSASH_BOTTOM, true);
	Bind(wxEVT_SASH_DRAGGED, &AudioBox::OnSashDrag, this);

	HorizontalZoom->SetToolTip(_("Horizontal zoom"));
	VerticalZoom->SetToolTip(_("Vertical zoom"));
	VolumeBar->SetToolTip(_("Audio Volume"));

	bool link = OPT_GET("Audio/Link")->GetBool();
	if (link) {
		VolumeBar->SetValue(VerticalZoom->GetValue());
		VolumeBar->Enable(false);
	}

	// VertVol sider
	wxSizer *VertVol = new wxBoxSizer(wxHORIZONTAL);
	VertVol->Add(VerticalZoom,1,wxEXPAND,0);
	VertVol->Add(VolumeBar,1,wxEXPAND,0);
	wxSizer *VertVolArea = new wxBoxSizer(wxVERTICAL);
	VertVolArea->Add(VertVol,1,wxEXPAND,0);

	auto link_btn = new ToggleBitmap(panel, context, "audio/opt/vertical_link", 16, "Audio", wxSize(20, -1));
	link_btn->SetMaxSize(wxDefaultSize);
	VertVolArea->Add(link_btn, 0, wxRIGHT | wxALIGN_CENTER | wxEXPAND, 0);
	OPT_SUB("Audio/Link", &AudioBox::OnVerticalLink, this);

	// Top sizer
	wxSizer *TopSizer = new wxBoxSizer(wxHORIZONTAL);
	TopSizer->Add(audioDisplay,1,wxEXPAND,0);
	TopSizer->Add(HorizontalZoom,0,wxEXPAND,0);
	TopSizer->Add(VertVolArea,0,wxEXPAND,0);

	context->karaoke = new AudioKaraoke(panel, context);

	// Main sizer
	auto MainSizer = new wxBoxSizer(wxVERTICAL);
	MainSizer->Add(TopSizer,1,wxEXPAND|wxALL,3);
	MainSizer->Add(toolbar::GetToolbar(panel, "audio", context, "Audio"),0,wxEXPAND|wxLEFT|wxRIGHT,3);
	MainSizer->Add(context->karaoke,0,wxEXPAND|wxALL,3);
	MainSizer->Show(context->karaoke, false);
	panel->SetSizer(MainSizer);

	wxSizer *audioSashSizer = new wxBoxSizer(wxHORIZONTAL);
	audioSashSizer->Add(panel, 1, wxEXPAND);
	SetSizerAndFit(audioSashSizer);
	SetMinSize(wxSize(-1, OPT_GET("Audio/Display Height")->GetInt()));
	SetMinimumSizeY(panel->GetSize().GetHeight());

	audioDisplay->Bind(wxEVT_MOUSEWHEEL, &AudioBox::OnMouseWheel, this);

	audioDisplay->SetZoomLevel(-HorizontalZoom->GetValue());
	audioDisplay->SetAmplitudeScale(pow(mid(1, VerticalZoom->GetValue(), 100) / 50.0, 3));
}
Beispiel #28
0
EffectsPanel::EffectsPanel(wxWindow *parent, EffectManager *manager) : effectManager(manager)
{
    //(*Initialize(EffectsPanel)
    wxFlexGridSizer* FlexGridSizer8;
    wxFlexGridSizer* FlexGridSizer1;
    wxFlexGridSizer* FlexGridSizer6;

    Create(parent, wxID_ANY, wxDefaultPosition, wxSize(150,150), wxTAB_TRAVERSAL, _T("wxID_ANY"));
    SetMinSize(wxSize(150,150));
    SetMaxSize(wxSize(150,150));
    FlexGridSizer1 = new wxFlexGridSizer(0, 2, 0, 0);
    FlexGridSizer1->AddGrowableCol(0);
    EffectChoicebook = new wxChoicebook(this, ID_CHOICEBOOK1, wxDefaultPosition, wxDefaultSize, 0, _T("ID_CHOICEBOOK1"));
    FlexGridSizer1->Add(EffectChoicebook, 1, wxRIGHT|wxEXPAND, 2);
    FlexGridSizer8 = new wxFlexGridSizer(0, 1, 0, 0);
    FlexGridSizer6 = new wxFlexGridSizer(0, 2, 0, 0);
    BitmapButton_LayerEffect = new wxBitmapButton(this, ID_BITMAPBUTTON_CHOICEBOOK1, padlock16x16_blue_xpm, wxDefaultPosition, wxSize(13,13), wxBU_AUTODRAW|wxNO_BORDER, wxDefaultValidator, _T("ID_BITMAPBUTTON_CHOICEBOOK1"));
    BitmapButton_LayerEffect->SetDefault();
    FlexGridSizer6->Add(BitmapButton_LayerEffect, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 1);
    BitmapButton_normal = new wxBitmapButton(this, ID_BITMAPBUTTON87, padlock16x16_green_xpm, wxDefaultPosition, wxSize(13,13), wxBU_AUTODRAW|wxNO_BORDER, wxDefaultValidator, _T("ID_BITMAPBUTTON87"));
    BitmapButton_normal->SetDefault();
    BitmapButton_normal->Hide();
    FlexGridSizer6->Add(BitmapButton_normal, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 1);
    BitmapButton_locked = new wxBitmapButton(this, ID_BITMAPBUTTON1, padlock16x16_red_xpm, wxDefaultPosition, wxSize(13,13), wxBU_AUTODRAW|wxNO_BORDER, wxDefaultValidator, _T("ID_BITMAPBUTTON1"));
    BitmapButton_locked->SetDefault();
    BitmapButton_locked->Hide();
    FlexGridSizer6->Add(BitmapButton_locked, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 1);
    BitmapButton_random = new wxBitmapButton(this, ID_BITMAPBUTTON88, padlock16x16_blue_xpm, wxDefaultPosition, wxSize(13,13), wxBU_AUTODRAW|wxNO_BORDER, wxDefaultValidator, _T("ID_BITMAPBUTTON88"));
    BitmapButton_random->SetDefault();
    BitmapButton_random->Hide();
    FlexGridSizer6->Add(BitmapButton_random, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 1);
    FlexGridSizer8->Add(FlexGridSizer6, 1, wxALL|wxEXPAND, 1);
    FlexGridSizer1->Add(FlexGridSizer8, 1, wxEXPAND, 2);
    SetSizer(FlexGridSizer1);
    SetSizer(FlexGridSizer1);
    Layout();

    Connect(ID_CHOICEBOOK1,wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED,(wxObjectEventFunction)&EffectsPanel::EffectSelected);
    Connect(ID_BITMAPBUTTON_CHOICEBOOK1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&EffectsPanel::OnLockButtonClick);
    //*)

    this->SetName("Effect");


    for (auto it = effectManager->begin(); it != effectManager->end(); it++) {
        RenderableEffect *p = *it;
        wxScrolledWindow* sw = new wxScrolledWindow(EffectChoicebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL|wxHSCROLL, _T("ID_PANEL" + p->Name()));
        wxPanel *panel = p->GetPanel(sw);
        wxFlexGridSizer *fgs = new wxFlexGridSizer(1, 1, 0, 0);
        fgs->AddGrowableCol(0);
        fgs->AddGrowableRow(0);
        fgs->Add(panel, 1, wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP, 2);

        sw->SetSizer(fgs);
        fgs->Fit(sw);
        fgs->SetSizeHints(sw);


        EffectChoicebook->AddPage(sw, p->ToolTip(), false);
    }

    EffectChoicebook->SetSelection(0);
}
void wxAuiFloatingFrame::SetPaneWindow(const wxAuiPaneInfo& pane)
{
    m_pane_window = pane.window;
    m_pane_window->Reparent(this);

    wxAuiPaneInfo contained_pane = pane;
    contained_pane.Dock().Center().Show().
                    CaptionVisible(false).
                    PaneBorder(false).
                    Layer(0).Row(0).Position(0);

    // Carry over the minimum size
    wxSize pane_min_size = pane.window->GetMinSize();

    // if the frame window's max size is greater than the min size
    // then set the max size to the min size as well
    wxSize cur_max_size = GetMaxSize();
    if (cur_max_size.IsFullySpecified() &&
          (cur_max_size.x < pane.min_size.x ||
           cur_max_size.y < pane.min_size.y)
       )
    {
        SetMaxSize(pane_min_size);
    }

    SetMinSize(pane.window->GetMinSize());

    m_mgr.AddPane(m_pane_window, contained_pane);
    m_mgr.Update();

    if (pane.min_size.IsFullySpecified())
    {
        // because SetSizeHints() calls Fit() too (which sets the window
        // size to its minimum allowed), we keep the size before calling
        // SetSizeHints() and reset it afterwards...
        wxSize tmp = GetSize();
        GetSizer()->SetSizeHints(this);
        SetSize(tmp);
    }

    SetTitle(pane.caption);

    if (pane.floating_size != wxDefaultSize)
    {
        SetSize(pane.floating_size);
    }
    else
    {
        wxSize size = pane.best_size;
        if (size == wxDefaultSize)
            size = pane.min_size;
        if (size == wxDefaultSize)
            size = m_pane_window->GetSize();
        if (m_owner_mgr && pane.HasGripper())
        {
            if (pane.HasGripperTop())
                size.y += m_owner_mgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE);
            else
                size.x += m_owner_mgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE);
        }

        SetClientSize(size);
    }

    if (pane.IsFixed())
    {
        SetWindowStyleFlag(GetWindowStyleFlag() & ~wxRESIZE_BORDER);
    }
}
    wxsImageComboEditorDlg::wxsImageComboEditorDlg(wxWindow* parent)
    {
        //(*Initialize(wxsImageComboEditorDlg)
        wxBoxSizer* BoxSizer4;
        wxBoxSizer* BoxSizer6;
        wxBoxSizer* BoxSizer5;
        wxBoxSizer* BoxSizer10;
        wxBoxSizer* BoxSizer7;
        wxBoxSizer* BoxSizer8;
        wxBoxSizer* BoxSizer13;
        wxBoxSizer* BoxSizer2;
        wxBoxSizer* BoxSizer11;
        wxBoxSizer* BoxSizer12;
        wxBoxSizer* BoxSizer14;
        wxBoxSizer* BoxSizer1;
        wxBoxSizer* BoxSizer9;
        wxBoxSizer* BoxSizer3;

        Create(parent, wxID_ANY, _("wxBitmapComboBox Editor"), wxDefaultPosition, wxDefaultSize, wxCAPTION|wxDEFAULT_DIALOG_STYLE, _T("wxID_ANY"));
        SetMinSize(wxSize(-1,-1));
        SetMaxSize(wxSize(-1,-1));
        BoxSizer1 = new wxBoxSizer(wxVERTICAL);
        BoxSizer13 = new wxBoxSizer(wxHORIZONTAL);
        BoxSizer2 = new wxBoxSizer(wxVERTICAL);
        StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("Combo-Box"), wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE|wxALIGN_CENTRE, _T("ID_STATICTEXT1"));
        BoxSizer2->Add(StaticText1, 0, wxALL|wxALIGN_LEFT, 5);
        m_pTree = new wxTreeCtrl(this, ID_TREECTRL1, wxPoint(0,32), wxSize(240,272), wxTR_EDIT_LABELS|wxTR_NO_BUTTONS|wxTR_NO_LINES|wxTR_HIDE_ROOT|wxRAISED_BORDER, wxDefaultValidator, _T("ID_TREECTRL1"));
        BoxSizer2->Add(m_pTree, 0, wxALL|wxEXPAND, 0);
        BoxSizer13->Add(BoxSizer2, 0, wxALL|wxALIGN_TOP, 5);
        BoxSizer3 = new wxBoxSizer(wxVERTICAL);
        StaticText2 = new wxStaticText(this, ID_STATICTEXT2, _("Edit Items"), wxPoint(264,8), wxDefaultSize, wxST_NO_AUTORESIZE|wxALIGN_CENTRE, _T("ID_STATICTEXT2"));
        BoxSizer3->Add(StaticText2, 0, wxALL|wxALIGN_LEFT, 5);
        BoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
        m_pBtnAddItem = new wxBitmapButton(this, ID_BITMAPBUTTON1, wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(_T("wxART_ADD_BOOKMARK")),wxART_BUTTON), wxDefaultPosition, wxSize(32,32), wxBU_AUTODRAW, wxDefaultValidator, _T("ID_BITMAPBUTTON1"));
        m_pBtnAddItem->SetDefault();
        BoxSizer4->Add(m_pBtnAddItem, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0);
        StaticText3 = new wxStaticText(this, ID_STATICTEXT3, _("Add Item"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT3"));
        BoxSizer4->Add(StaticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
        BoxSizer3->Add(BoxSizer4, 0, wxALL|wxEXPAND, 0);
        BoxSizer5 = new wxBoxSizer(wxHORIZONTAL);
        m_pBtnMoveUp = new wxBitmapButton(this, ID_BITMAPBUTTON2, wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(_T("wxART_GO_UP")),wxART_BUTTON), wxDefaultPosition, wxSize(32,32), wxBU_AUTODRAW, wxDefaultValidator, _T("ID_BITMAPBUTTON2"));
        m_pBtnMoveUp->SetDefault();
        BoxSizer5->Add(m_pBtnMoveUp, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0);
        StaticText4 = new wxStaticText(this, ID_STATICTEXT4, _("Move Item Up"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT4"));
        BoxSizer5->Add(StaticText4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
        BoxSizer3->Add(BoxSizer5, 0, wxALL|wxEXPAND, 0);
        BoxSizer6 = new wxBoxSizer(wxHORIZONTAL);
        m_pBtnMoveDown = new wxBitmapButton(this, ID_BITMAPBUTTON3, wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(_T("wxART_GO_DOWN")),wxART_BUTTON), wxDefaultPosition, wxSize(32,32), wxBU_AUTODRAW, wxDefaultValidator, _T("ID_BITMAPBUTTON3"));
        m_pBtnMoveDown->SetDefault();
        BoxSizer6->Add(m_pBtnMoveDown, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0);
        StaticText5 = new wxStaticText(this, ID_STATICTEXT5, _("Move Item Down"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT5"));
        BoxSizer6->Add(StaticText5, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
        BoxSizer3->Add(BoxSizer6, 0, wxALL|wxEXPAND, 0);
        BoxSizer7 = new wxBoxSizer(wxHORIZONTAL);
        m_pBtnDeleteItem = new wxBitmapButton(this, ID_BITMAPBUTTON4, wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(_T("wxART_DEL_BOOKMARK")),wxART_BUTTON), wxDefaultPosition, wxSize(32,32), wxBU_AUTODRAW, wxDefaultValidator, _T("ID_BITMAPBUTTON4"));
        BoxSizer7->Add(m_pBtnDeleteItem, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0);
        StaticText6 = new wxStaticText(this, ID_STATICTEXT6, _("Delete Item"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT6"));
        BoxSizer7->Add(StaticText6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
        BoxSizer3->Add(BoxSizer7, 0, wxALL|wxEXPAND, 0);
        BoxSizer8 = new wxBoxSizer(wxHORIZONTAL);
        m_pBtnDeleteAll = new wxBitmapButton(this, ID_BITMAPBUTTON5, wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(_T("wxART_DELETE")),wxART_BUTTON), wxDefaultPosition, wxSize(32,32), wxBU_AUTODRAW, wxDefaultValidator, _T("ID_BITMAPBUTTON5"));
        BoxSizer8->Add(m_pBtnDeleteAll, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0);
        StaticText7 = new wxStaticText(this, ID_STATICTEXT7, _("Delete All Items"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT7"));
        BoxSizer8->Add(StaticText7, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
        BoxSizer3->Add(BoxSizer8, 0, wxALL|wxEXPAND, 0);
        BoxSizer9 = new wxBoxSizer(wxHORIZONTAL);
        m_pBtnEditItem = new wxBitmapButton(this, ID_BITMAPBUTTON6, wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(_T("wxART_HELP_SETTINGS")),wxART_BUTTON), wxDefaultPosition, wxSize(32,32), wxBU_AUTODRAW, wxDefaultValidator, _T("ID_BITMAPBUTTON6"));
        m_pBtnEditItem->SetDefault();
        BoxSizer9->Add(m_pBtnEditItem, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0);
        StaticText8 = new wxStaticText(this, ID_STATICTEXT8, _("Edit Item Text"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT8"));
        BoxSizer9->Add(StaticText8, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
        BoxSizer3->Add(BoxSizer9, 0, wxALL|wxEXPAND, 0);
        BoxSizer10 = new wxBoxSizer(wxVERTICAL);
        BoxSizer11 = new wxBoxSizer(wxHORIZONTAL);
        StaticText9 = new wxStaticText(this, ID_STATICTEXT9, _("Image-List"), wxPoint(256,240), wxDefaultSize, wxST_NO_AUTORESIZE, _T("ID_STATICTEXT9"));
        BoxSizer11->Add(StaticText9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
        BoxSizer10->Add(BoxSizer11, 0, wxALL|wxALIGN_LEFT, 0);
        BoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
        m_pCmbImage = new wxBitmapComboBox(this, ID_COMBOBOX1, wxEmptyString, wxPoint(256,272), wxSize(100,22), 0, 0, wxCB_READONLY, wxDefaultValidator, _T("ID_COMBOBOX1"));
        BoxSizer12->Add(m_pCmbImage, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5);
        StaticText10 = new wxStaticText(this, ID_STATICTEXT10, _("Item Image"), wxPoint(352,276), wxDefaultSize, 0, _T("ID_STATICTEXT10"));
        BoxSizer12->Add(StaticText10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
        BoxSizer10->Add(BoxSizer12, 0, wxALL|wxALIGN_LEFT, 0);
        BoxSizer3->Add(BoxSizer10, 1, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 5);
        BoxSizer13->Add(BoxSizer3, 0, wxALL|wxALIGN_TOP, 5);
        BoxSizer1->Add(BoxSizer13, 0, wxALL|wxALIGN_LEFT, 5);
        BoxSizer14 = new wxBoxSizer(wxHORIZONTAL);
        m_pBtnOK = new wxButton(this, ID_BUTTON1, _("OK"), wxPoint(64,320), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
        m_pBtnOK->SetDefault();
        BoxSizer14->Add(m_pBtnOK, 0, wxALL|wxALIGN_BOTTOM, 5);
        BoxSizer14->Add(-1,-1,1, wxALL|wxALIGN_BOTTOM, 5);
        m_pBtnCancel = new wxButton(this, ID_BUTTON2, _("Cancel"), wxPoint(272,320), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
        BoxSizer14->Add(m_pBtnCancel, 0, wxALL|wxALIGN_BOTTOM, 5);
        BoxSizer1->Add(BoxSizer14, 0, wxALL|wxEXPAND, 5);
        SetSizer(BoxSizer1);
        BoxSizer1->Fit(this);
        BoxSizer1->SetSizeHints(this);

        Connect(ID_TREECTRL1,wxEVT_COMMAND_TREE_SEL_CHANGED,wxTreeEventHandler(wxsImageComboEditorDlg::OnTreeSelectionChanged));
        Connect(ID_BITMAPBUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(wxsImageComboEditorDlg::OnBtnAddItemClick));
        Connect(ID_BITMAPBUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(wxsImageComboEditorDlg::OnBtnMoveUpClick));
        Connect(ID_BITMAPBUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(wxsImageComboEditorDlg::OnBtnMoveDownClick));
        Connect(ID_BITMAPBUTTON4,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(wxsImageComboEditorDlg::OnBtnDeleteItemClick));
        Connect(ID_BITMAPBUTTON5,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(wxsImageComboEditorDlg::OnBtnDeleteAllClick));
        Connect(ID_BITMAPBUTTON6,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(wxsImageComboEditorDlg::OnBtnEditItemClick));
        Connect(ID_COMBOBOX1,wxEVT_COMMAND_COMBOBOX_SELECTED,wxCommandEventHandler(wxsImageComboEditorDlg::OnCmbImageSelect));
        Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(wxsImageComboEditorDlg::OnBtnOKClick));
        Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(wxsImageComboEditorDlg::OnBtnCancelClick));
        //*)
    }