mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-22 06:22:58 +02:00
Updated to demo new method of taking over TrackPanel.
This commit is contained in:
@@ -23,28 +23,35 @@
|
||||
#include "Registrar.h"
|
||||
#include "TrackPanel2.h"
|
||||
|
||||
TrackPanel * TrackPanel2Factory(wxWindow * parent,
|
||||
wxWindowID id,
|
||||
const wxPoint & pos,
|
||||
const wxSize & size,
|
||||
TrackList * tracks,
|
||||
ViewInfo * viewInfo,
|
||||
TrackPanelListener * listener,
|
||||
AdornedRulerPanel * ruler)
|
||||
{
|
||||
return new TrackPanel2(
|
||||
parent,
|
||||
id,
|
||||
pos,
|
||||
size,
|
||||
tracks,
|
||||
viewInfo,
|
||||
listener,
|
||||
ruler);
|
||||
}
|
||||
|
||||
void ShowTrackPanel()
|
||||
void ShowExtraDialog()
|
||||
{
|
||||
int k=42;
|
||||
|
||||
wxDialog Dlg(NULL, wxID_ANY, wxString(wxT("Experimental New TrackPanel")));
|
||||
wxDialog Dlg(NULL, wxID_ANY, wxString(wxT("Experimental Extra Dialog")));
|
||||
ShuttleGui S(&Dlg, eIsCreating);
|
||||
#if 0
|
||||
S.StartHorizontalLay(wxCENTER, false);
|
||||
{
|
||||
S.StartStatic(wxT(""), false);
|
||||
{
|
||||
S.SetBorder(200);
|
||||
S.AddFixedText(wxT("AAA"));
|
||||
}
|
||||
S.EndStatic();
|
||||
}
|
||||
S.EndHorizontalLay();
|
||||
#endif
|
||||
S.StartNotebook();
|
||||
{
|
||||
S.StartNotebookPage( _("Panel") );
|
||||
S.StartNotebookPage( _("Panel 1") );
|
||||
S.StartVerticalLay(1);
|
||||
{
|
||||
HtmlWindow *html = new LinkingHtmlWindow(S.GetParent(), -1,
|
||||
@@ -52,7 +59,7 @@ void ShowTrackPanel()
|
||||
wxSize(600, 359),
|
||||
wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);
|
||||
html->SetFocus();
|
||||
html->SetPage(wxT("<h1><font color=\"blue\">TrackPanel</font></h1>This will be replaced with the panel"));
|
||||
html->SetPage(wxT("<h1><font color=\"blue\">An Html Window</font></h1>Replace with whatever you like."));
|
||||
S.Prop(1).AddWindow( html, wxEXPAND );
|
||||
}
|
||||
S.EndVerticalLay();
|
||||
@@ -89,7 +96,7 @@ int TrackPanel2Dispatch( Registrar & R, t_RegistrarDispatchType Type )
|
||||
switch( Type )
|
||||
{
|
||||
case RegResource:
|
||||
R.pShowFn = ShowTrackPanel;
|
||||
R.pShowFn = ShowExtraDialog;
|
||||
break;
|
||||
case RegArtist:
|
||||
break;
|
||||
@@ -105,3 +112,22 @@ int TrackPanel2Dispatch( Registrar & R, t_RegistrarDispatchType Type )
|
||||
return 1;
|
||||
}
|
||||
|
||||
TrackPanel2::TrackPanel2(
|
||||
wxWindow * parent, wxWindowID id, const wxPoint & pos, const wxSize & size,
|
||||
TrackList * tracks, ViewInfo * viewInfo, TrackPanelListener * listener,
|
||||
AdornedRulerPanel * ruler) :
|
||||
TrackPanel(
|
||||
parent, id, pos, size,
|
||||
tracks, viewInfo, listener, ruler)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// Here is a sample function that shows that TrackPanel2 is being invoked.
|
||||
void TrackPanel2::OnPaint(wxPaintEvent & event)
|
||||
{
|
||||
// Hmm... Log debug will only show if you open the log window.
|
||||
// wxLogDebug( wxT("Paint TrackPanel2 requested") );
|
||||
TrackPanel::OnPaint( event );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user