[opendemo-cvs] CVS: opendemo/tools/odcut odcutgui.pm,1.47,1.48
Status: Beta
Brought to you by:
girlich
From: Uwe G. <gi...@us...> - 2004-11-01 16:50:28
|
Update of /cvsroot/opendemo/opendemo/tools/odcut In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29283 Modified Files: odcutgui.pm Log Message: Implemet gui elements for handling a selection of frames and a cut-list. Index: odcutgui.pm =================================================================== RCS file: /cvsroot/opendemo/opendemo/tools/odcut/odcutgui.pm,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** odcutgui.pm 31 Oct 2004 21:52:53 -0000 1.47 --- odcutgui.pm 1 Nov 2004 16:50:16 -0000 1.48 *************** *** 125,128 **** --- 125,171 ---- EVT_BUTTON($self, $self->{LASTFRAME}, \&OnLastFrameButton); + # Buttons 2nd row + $self->{GOTORANGESTART} = Wx::Button->new($self, -1, " [< ", [-1,-1], [-1,-1], wxBU_EXACTFIT); + $self->{GOTORANGESTART}->SetToolTip("goto first selected frame"); + EVT_BUTTON($self, $self->{GOTORANGESTART}, \&OnGotoRangeStartButton); + + $self->{SETRANGESTART} = Wx::Button->new($self, -1, " [<- ", [-1,-1], [-1,-1], wxBU_EXACTFIT); + $self->{SETRANGESTART}->SetToolTip("set selection start"); + EVT_BUTTON($self, $self->{SETRANGESTART}, \&OnSetRangeStartButton); + + $self->{PLAYRANGEBACKWARDS} = Wx::Button->new($self, -1, " < ", [-1,-1], [-1,-1], wxBU_EXACTFIT); + $self->{PLAYRANGEBACKWARDS}->SetToolTip("play selected range backwards"); + EVT_BUTTON($self, $self->{PLAYRANGEBACKWARDS}, \&OnPlayRangeBackwardsButton); + + $self->{PLAYRANGEFORWARD} = Wx::Button->new($self, -1, " > ", [-1,-1], [-1,-1], wxBU_EXACTFIT); + $self->{PLAYRANGEFORWARD}->SetToolTip("play selected range forward"); + EVT_BUTTON($self, $self->{PLAYRANGEFORWARD}, \&OnPlayRangeForwardButton); + $self->{SETRANGEEND} = Wx::Button->new($self, -1, " ->] ", [-1,-1], [-1,-1], wxBU_EXACTFIT); + $self->{SETRANGEEND}->SetToolTip("set selection end"); + EVT_BUTTON($self, $self->{SETRANGEEND}, \&OnSetRangeEndButton); + + $self->{GOTORANGEEND} = Wx::Button->new($self, -1, " >] ", [-1,-1], [-1,-1], wxBU_EXACTFIT); + $self->{GOTORANGEEND}->SetToolTip("goto last selected frame"); + EVT_BUTTON($self, $self->{GOTORANGEEND}, \&OnGotoRangeEndButton); + + $self->{RANGEBOX} = Wx::StaticBox->new( $self, -1, "Selected Frames", [-1, -1], [-1, -1] ); + my $srange = Wx::StaticBoxSizer->new( $self->{RANGEBOX}, wxVERTICAL); + $self->{RANGESTARTCTRL} = Wx::SpinCtrl->new( $self, -1, '', [-1, -1], [-1, -1]); + $self->{RANGESTARTCTRL}->SetRange( 0, 2147483647 ); + $self->{RANGESTARTCTRL}->SetValue( 0 ); + $self->{RANGESTARTCTRL}->SetToolTip("First selected frame"); + $srange->AddWindow($self->{RANGESTARTCTRL}, 1, wxALL, 1); + EVT_SPINCTRL( $self, $self->{RANGESTARTCTRL}, \&OnRangeStartCtrl ); + $self->{RANGEENDCTRL} = Wx::SpinCtrl->new( $self, -1, '', [-1, -1], [-1, -1]); + $self->{RANGEENDCTRL}->SetRange( 0, 2147483647 ); + $self->{RANGEENDCTRL}->SetValue( 0 ); + $self->{RANGEENDCTRL}->SetToolTip("Last selected frame"); + $srange->AddWindow($self->{RANGEENDCTRL}, 1, wxALL, 1); + EVT_SPINCTRL( $self, $self->{RANGEENDCTRL}, \&OnRangeEndCtrl ); + + $self->{COPYRANGETOCUTLIST} = Wx::Button->new($self, -1, "copy", [-1,-1], [-1,-1], wxBU_EXACTFIT); + $self->{COPYRANGETOCUTLIST}->SetToolTip("copy selected range to cut-list"); + EVT_BUTTON($self, $self->{COPYRANGETOCUTLIST}, \&OnCopyRangeToCutListButton); + # Values $self->{TIMEBOX} = Wx::StaticBox->new( $self, -1, "Time in ms", [-1, -1], [-1, -1] ); *************** *** 184,187 **** --- 227,245 ---- $sb->AddSpace(0,0,1,wxGROW); + # 2nd row buttons + my $sr = Wx::BoxSizer->new(wxHORIZONTAL); + $sr->AddSpace(10,0,0,0); + $sr->AddWindow($self->{GOTORANGESTART}, 0, wxALIGN_CENTER_VERTICAL, 10); + $sr->AddWindow($self->{SETRANGESTART}, 0, wxALIGN_CENTER_VERTICAL, 10); + $sr->AddWindow($self->{PLAYRANGEBACKWARDS}, 0, wxALIGN_CENTER_VERTICAL, 10); + $sr->AddWindow($self->{PLAYRANGEFORWARD}, 0, wxALIGN_CENTER_VERTICAL, 10); + $sr->AddWindow($self->{SETRANGEEND}, 0, wxALIGN_CENTER_VERTICAL, 10); + $sr->AddWindow($self->{GOTORANGEEND}, 0, wxALIGN_CENTER_VERTICAL, 10); + $sr->AddSpace(10,0,0,0); + $sr->AddSizer($srange, 0, wxALIGN_CENTER_VERTICAL); + $sr->AddSpace(10,0,0,0); + $sr->AddWindow($self->{COPYRANGETOCUTLIST}, 0, wxALIGN_CENTER_VERTICAL, 10); + $sr->AddSpace(0,0,1,wxGROW); + # Values my $sv = Wx::BoxSizer->new(wxHORIZONTAL); *************** *** 208,211 **** --- 266,270 ---- $sa->AddSizer($st,0,wxEXPAND); $sa->AddSizer($sb,0,wxEXPAND); + $sa->AddSizer($sr,0,wxEXPAND); $sa->AddSizer($sv,0,wxEXPAND); $sa->AddSpace(0,10,0,0); *************** *** 375,378 **** --- 434,509 ---- + sub OnGotoRangeStartButton($$) + { + my ($self, $event) = @_; + + # TODO implement + } + + + sub OnSetRangeStartButton($$) + { + my ($self, $event) = @_; + + # TODO implement + } + + + sub OnPlayRangeBackwardsButton($$) + { + my ($self, $event) = @_; + + # TODO implement + } + + + sub OnPlayRangeForwardButton($$) + { + my ($self, $event) = @_; + + # TODO implement + } + + + sub OnSetRangeEndButton($$) + { + my ($self, $event) = @_; + + # TODO implement + } + + + sub OnGotoRangeEndButton($$) + { + my ($self, $event) = @_; + + # TODO implement + } + + + sub OnRangeStartCtrl($$) + { + my ($self, $event) = @_; + + # TODO implement + } + + + sub OnRangeEndCtrl($$) + { + my ($self, $event) = @_; + + # TODO implement + } + + + sub OnCopyRangeToCutListButton($$) + { + my ($self, $event) = @_; + + # TODO implement + } + + sub OnSliderUpdate($$) { *************** *** 821,825 **** my $html_window = Wx::HtmlWindow->new($frame, -1); # TODO It would be more portable, if Pod::Html would be used directly. ! # This involves pipe redirecting and fork() but anyway. # my $parser = new Pod::Html(); # $parser->parse_from_file($0); --- 952,957 ---- my $html_window = Wx::HtmlWindow->new($frame, -1); # TODO It would be more portable, if Pod::Html would be used directly. ! # The current solution involves pipe redirecting and forking some ! # external program, which may not be available on all system. # my $parser = new Pod::Html(); # $parser->parse_from_file($0); |