]> git.sesse.net Git - vlc/blob - modules/gui/wxwidgets/dialogs/vlm/vlm_panel.cpp
Completely replace all ANSI CP dependend mb_str()
[vlc] / modules / gui / wxwidgets / dialogs / vlm / vlm_panel.cpp
1 /*****************************************************************************
2  * vlm_panel.cpp: VLM Panel
3  *****************************************************************************
4  * Copyright (C) 2000-2005 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *
9  * This program is free software; you can redistribute it and/OR MODIFy
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #include "dialogs/vlm/vlm_panel.hpp"
25 #include "dialogs/vlm/vlm_wrapper.hpp"
26 #include "dialogs/vlm/vlm_stream.hpp"
27 #include "dialogs/vlm/vlm_streampanel.hpp"
28 #include <wx/statline.h>
29
30 #include "charset.h"
31
32 enum
33 {
34     Notebook_Event,
35     Timer_Event,
36     Load_Event,
37 };
38
39 BEGIN_EVENT_TABLE( VLMPanel, wxPanel)
40    EVT_TIMER( Timer_Event, VLMPanel::OnTimer )
41    EVT_BUTTON( wxID_CLOSE, VLMPanel::OnClose )
42    EVT_BUTTON( Load_Event, VLMPanel::OnLoad )
43    EVT_BUTTON( wxID_SAVE, VLMPanel::OnSave )
44 END_EVENT_TABLE()
45
46
47 VLMPanel::VLMPanel( intf_thread_t *_p_intf, wxWindow *_p_parent ) :
48         wxPanel( _p_parent, -1, wxDefaultPosition, wxDefaultSize ),
49        timer( this, Timer_Event )
50 {
51     p_intf = _p_intf;
52     p_parent = _p_parent;
53
54     p_vlm = new VLMWrapper( p_intf );
55     p_vlm->AttachVLM();
56
57     SetAutoLayout( TRUE );
58
59     wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
60
61     p_notebook = new wxNotebook( this, Notebook_Event );
62 #if (!wxCHECK_VERSION(2,5,0))
63     wxNotebookSizer *notebook_sizer = new wxNotebookSizer( p_notebook );
64 #endif
65     p_notebook->AddPage( BroadcastPanel( p_notebook ), wxU( _("Broadcasts") ) );
66 #if 0
67     p_notebook->AddPage( VODPanel( p_notebook ), wxU( _("VOD") ) );
68 #endif
69 #if (!wxCHECK_VERSION(2,5,0))
70     panel_sizer->Add( notebook_sizer, 1, wxEXPAND | wxALL, 5 );
71 #else
72     panel_sizer->Add( p_notebook, 1 , wxEXPAND | wxALL, 5 );
73 #endif
74
75     wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
76     button_sizer->Add( new wxButton( this, wxID_CLOSE, wxU(_("&Close") ) ) );
77     button_sizer->Add( 0, 0, 1 );
78     button_sizer->Add( new wxButton( this, Load_Event, wxU(_("Load") ) ), 0, wxRIGHT, 10 );
79     button_sizer->Add( new wxButton( this, wxID_SAVE, wxU(_("&Save") ) ) );
80     panel_sizer->Add( button_sizer, 0 , wxEXPAND | wxALL, 5 );
81
82     panel_sizer->Layout();
83     SetSizerAndFit( panel_sizer );
84
85     Update();
86
87     timer.Start( 300 );
88 }
89
90 VLMPanel::~VLMPanel()
91 {
92     delete p_vlm;
93 }
94
95 void VLMPanel::OnTimer( wxTimerEvent& event )
96 {
97     Update();
98 }
99
100 void VLMPanel::Update()
101 {
102     unsigned int i;
103     for( i = 0 ; i < broadcasts.size(); i++ )
104     {
105         ((VLMBroadcastStreamPanel *)broadcasts[i])->b_found = VLC_FALSE;
106     }
107     for( i = 0 ; i < vods.size(); i++ )
108     {
109         ((VLMVODStreamPanel *)vods[i])->b_found = VLC_FALSE;
110     }
111
112     p_vlm->LockVLM();
113     /* Iterate over the media, to find the panels to add / remove */
114     /* FIXME: This code should be better wrapped */
115     for( i = 0; i < p_vlm->NbMedia(); i++ )
116     {
117         vlm_media_t *p_media = p_vlm->GetMedia( i );
118
119         if( p_media->i_type == BROADCAST_TYPE )
120         {
121             vlc_bool_t b_foundthis = VLC_FALSE;
122             for( unsigned int j = 0 ; j < broadcasts.size(); j++ )
123             {
124                 VLMBroadcastStreamPanel *p_streamp =
125                        (VLMBroadcastStreamPanel *)(broadcasts[j]);
126                 /* FIXME: dangerous .. */
127                 if( p_streamp->GetStream()->p_media ==  p_media )
128                 {
129                     p_streamp->b_found = VLC_TRUE;
130                     b_foundthis = VLC_TRUE;
131                     break;
132                 }
133             }
134             /* Create the stream */
135             if( !b_foundthis )
136             {
137                 VLMBroadcastStream *p_broadcast =
138                         new VLMBroadcastStream( p_intf, p_media, p_vlm );
139                 AppendBroadcast( p_broadcast );
140             }
141         }
142         else if( p_media->i_type == VOD_TYPE )
143         {
144             vlc_bool_t b_foundthis = VLC_FALSE;
145             for( unsigned int j = 0 ; i < vods.size(); i++ )
146             {
147                 VLMVODStreamPanel *p_streamp = (VLMVODStreamPanel *)( vods[j] );
148                 if(  p_streamp->GetStream()->p_media ==  p_media )
149                 {
150                     p_streamp->b_found = VLC_TRUE;
151                     b_foundthis = VLC_TRUE;
152                     break;
153                 }
154             }
155             /* Create it */
156             if( !b_foundthis )
157             {
158                 VLMVODStream *p_vod = new VLMVODStream(p_intf, p_media, p_vlm );
159                 AppendVOD( p_vod );
160             }
161         }
162     }
163
164     /* Those not marked as found must be removed */
165     vector<VLMBroadcastStreamPanel *>::iterator it = broadcasts.begin();
166     while( it < broadcasts.end() )
167     {
168         if( (*it)->b_found == VLC_FALSE )
169         {
170             vector<VLMBroadcastStreamPanel *>::iterator rem = it;
171             it++;
172             VLMBroadcastStreamPanel *p_remove = *rem;
173             broadcasts.erase( rem );
174             RemoveBroadcast( p_remove );
175             delete p_remove;
176         }
177         else
178             it++;
179     }
180     vector<VLMVODStreamPanel *>::iterator it2 = vods.begin();
181     while( it2 < vods.end() )
182     {
183         if( (*it2)->b_found == VLC_FALSE )
184         {
185             vector<VLMVODStreamPanel *>::iterator rem = it2;
186             it2++;
187             VLMVODStreamPanel *p_remove = *rem;
188             vods.erase( rem );
189             RemoveVOD( p_remove );
190             delete p_remove;
191         }
192         else
193             it2++;
194     }
195
196     /* Update sliders*/
197     for( unsigned int j = 0 ; j < broadcasts.size(); j++ )
198     {
199         VLMBroadcastStreamPanel *p_streamp =
200                 (VLMBroadcastStreamPanel *)( broadcasts[j] );
201         p_streamp->Update();
202     }
203     p_vlm->UnlockVLM();
204 }
205
206 void VLMPanel::OnClose( wxCommandEvent &event )
207 {
208     ((VLMFrame*)p_parent)->OnClose( *( new wxCloseEvent() ) );
209 }
210
211 void VLMPanel::OnLoad( wxCommandEvent &event )
212 {
213     p_file_dialog = new wxFileDialog( NULL, wxT(""), wxT(""), wxT(""),
214                                       wxT("*"), wxOPEN | wxMULTIPLE );
215     if( p_file_dialog == NULL ) return;
216
217     p_file_dialog->SetTitle( wxU(_("Load Configuration") ) );
218     if( p_file_dialog->ShowModal() == wxID_OK )
219     {
220         vlm_Load( p_vlm->GetVLM(), p_file_dialog->GetPath().mb_str(wxConvUTF8) );
221     }
222     Update();
223 }
224
225 void VLMPanel::OnSave( wxCommandEvent &event )
226 {
227     p_file_dialog = new wxFileDialog( NULL, wxT(""), wxT(""), wxT(""),
228                                       wxT("*"), wxSAVE | wxOVERWRITE_PROMPT );
229     if( p_file_dialog == NULL ) return;
230
231     p_file_dialog->SetTitle( wxU(_("Save Configuration") ) );
232     if( p_file_dialog->ShowModal() == wxID_OK )
233     {
234         vlm_Save( p_vlm->GetVLM(), p_file_dialog->GetPath().mb_str(wxConvUTF8) );
235     }
236 }
237
238 /*************************
239  * Broadcasts management
240  *************************/
241 wxPanel * VLMPanel::BroadcastPanel( wxWindow *parent )
242 {
243      broadcasts_panel = new wxPanel( parent, -1, wxDefaultPosition, wxSize( 500, 350 ) );
244      broadcasts_sizer = new wxBoxSizer( wxVERTICAL );
245
246      wxStaticBox *add_box = new wxStaticBox( broadcasts_panel, -1,
247                                             wxU( _( "New broadcast") ) );
248      wxStaticBoxSizer *box_sizer = new wxStaticBoxSizer( add_box, wxHORIZONTAL );
249      box_sizer->Add( AddBroadcastPanel( broadcasts_panel), 0, wxEXPAND|wxALL, 5 );
250      box_sizer->Layout();
251
252      broadcasts_sizer->Add( box_sizer, 0, wxEXPAND|wxALL, 5 );
253
254      wxStaticLine *static_line = new wxStaticLine( broadcasts_panel, wxID_ANY );
255      broadcasts_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
256
257      scrolled_broadcasts = new wxScrolledWindow( broadcasts_panel, -1,
258                                 wxDefaultPosition, wxDefaultSize,
259                                 wxBORDER_NONE | wxVSCROLL );
260
261      scrolled_broadcasts_sizer = new wxBoxSizer( wxVERTICAL );
262      scrolled_broadcasts->SetAutoLayout( TRUE );
263      scrolled_broadcasts->SetScrollRate( 5,5 );
264      scrolled_broadcasts->SetSizerAndFit( scrolled_broadcasts_sizer );
265
266      broadcasts_sizer->Add( scrolled_broadcasts, 1, wxEXPAND| wxALL, 5 );
267      broadcasts_sizer->Layout();
268
269      broadcasts_panel->SetSizerAndFit( broadcasts_sizer );
270
271      return broadcasts_panel;
272 }
273
274 wxPanel * VLMPanel::AddBroadcastPanel( wxPanel *panel )
275 {
276      return new VLMAddStreamPanel( p_intf, panel, p_vlm, VLC_FALSE,
277                                    VLC_TRUE );
278 }
279
280 void VLMPanel::AppendBroadcast( VLMBroadcastStream *p_broadcast )
281 {
282     VLMBroadcastStreamPanel *p_new =
283                    new VLMBroadcastStreamPanel( p_intf, scrolled_broadcasts,
284                                                 p_broadcast );
285     p_new->b_found = VLC_TRUE;
286     scrolled_broadcasts_sizer->Add( p_new, 0, wxEXPAND | wxALL, 5 );
287     scrolled_broadcasts_sizer->Layout();
288     scrolled_broadcasts->FitInside();
289     broadcasts.push_back( p_new );
290 }
291
292 void VLMPanel::RemoveBroadcast( VLMBroadcastStreamPanel *p_streamp )
293 {
294     scrolled_broadcasts_sizer->Remove( p_streamp );
295     scrolled_broadcasts_sizer->Layout();
296     scrolled_broadcasts->FitInside();
297 }
298
299 /*************************
300  * VODS management
301  *************************/
302 wxPanel * VLMPanel::VODPanel( wxWindow *parent )
303 {
304      vods_panel = new wxPanel( parent, -1, wxDefaultPosition, wxSize( 500, 350 ) );
305      return vods_panel;
306 }
307
308 wxPanel * VLMPanel::AddVODPanel( wxPanel *panel )
309 {
310      return new VLMAddStreamPanel( p_intf, panel, p_vlm, VLC_FALSE,
311                                    VLC_FALSE );
312 }
313
314 void VLMPanel::AppendVOD( VLMVODStream *p_vod )
315 {
316     VLMVODStreamPanel *p_new =
317                    new VLMVODStreamPanel( p_intf, scrolled_vods, p_vod );
318     p_new->b_found = VLC_TRUE;
319     scrolled_vods_sizer->Add( p_new, 0, wxEXPAND | wxALL, 5 );
320     scrolled_vods_sizer->Layout();
321     scrolled_vods->FitInside();
322     vods.push_back( p_new );
323 }
324
325 void VLMPanel::RemoveVOD( VLMVODStreamPanel *p_streamp )
326 {
327     scrolled_vods_sizer->Remove( p_streamp );
328     scrolled_vods_sizer->Layout();
329     scrolled_vods->FitInside();
330 }
331
332 /****************************************************************************
333  * VLM Add Broadcast panel implementation
334  *****************************************************************************/
335 enum
336 {
337     Create_Event,
338     Clear_Event,
339     ChooseInput_Event,
340     ChooseOutput_Event,
341 };
342
343 BEGIN_EVENT_TABLE( VLMAddStreamPanel, wxPanel)
344    EVT_BUTTON( Create_Event, VLMAddStreamPanel::OnCreate )
345    EVT_BUTTON( Clear_Event, VLMAddStreamPanel::OnClear )
346    EVT_BUTTON( ChooseInput_Event, VLMAddStreamPanel::OnChooseInput )
347    EVT_BUTTON( ChooseOutput_Event, VLMAddStreamPanel::OnChooseOutput )
348 END_EVENT_TABLE()
349
350 VLMAddStreamPanel::VLMAddStreamPanel( intf_thread_t *_p_intf,
351                 wxWindow *_p_parent, VLMWrapper *_p_vlm,
352                 vlc_bool_t _b_edit, vlc_bool_t _b_broadcast ):
353                 wxPanel( _p_parent, -1, wxDefaultPosition, wxDefaultSize )
354 {
355     p_intf = _p_intf;
356     p_parent = _p_parent;
357     p_vlm = _p_vlm;
358     b_edit = _b_edit;
359     b_broadcast = _b_broadcast;
360
361     p_open_dialog = NULL;
362     p_sout_dialog = NULL;
363
364     SetAutoLayout( TRUE );
365
366     wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
367
368     wxFlexGridSizer *upper_sizer = new wxFlexGridSizer( 5, 2 );
369     upper_sizer->AddGrowableCol( 1 );
370     upper_sizer->AddGrowableCol( 3 );
371
372     upper_sizer->Add( new wxStaticText( this, -1, wxU( _("Name") ) ), 0,
373                                         wxALIGN_CENTER_VERTICAL, 0 );
374     name_text = new wxTextCtrl( this, -1, wxU( "" ), wxDefaultPosition,
375                                           wxSize( 150, -1 ) );
376     upper_sizer->Add( name_text , 1, wxEXPAND | wxLEFT | wxRIGHT, 5 );
377
378     upper_sizer->Add( new wxStaticText( this, -1, wxU( _("Input") ) ), 0,
379                                         wxALIGN_CENTER_VERTICAL, 0 );
380     input_text = new wxTextCtrl( this, -1, wxU( "" ) ,
381                       wxDefaultPosition, wxSize( 150, -1 ) );
382     upper_sizer->Add( input_text , 1, wxEXPAND | wxLEFT | wxRIGHT, 5 );
383     upper_sizer->Add( new wxButton( this, ChooseInput_Event, wxU( _("Choose") )  ) );
384
385     upper_sizer->Add( 0,0 );
386     upper_sizer->Add( 0,0 );
387
388     upper_sizer->Add( new wxStaticText( this, -1, wxU( _("Output") ) ), 0,
389                                         wxALIGN_CENTER_VERTICAL, 0 );
390     output_text = new wxTextCtrl( this, -1, wxU( "" ) ,
391                       wxDefaultPosition, wxSize( 150, -1 ) );
392     upper_sizer->Add( output_text, 1, wxEXPAND | wxLEFT | wxRIGHT, 5 );
393     upper_sizer->Add( new wxButton( this, ChooseOutput_Event,
394                       wxU( _("Choose") )  ) );
395
396     panel_sizer->Add( upper_sizer, 0, wxEXPAND | wxALL, 5 );
397
398     wxBoxSizer *lower_sizer = new wxBoxSizer( wxHORIZONTAL );
399     enabled_checkbox = new wxCheckBox( this, -1, wxU( _("Enabled" ) ) );
400     enabled_checkbox->SetValue( true );
401     lower_sizer->Add( enabled_checkbox,  1 , wxEXPAND | wxALL , 5 );
402     if( b_broadcast )
403     {
404         loop_checkbox = new wxCheckBox( this, -1, wxU( _("Loop" ) ) );
405         lower_sizer->Add( loop_checkbox,  1 , wxEXPAND | wxALL , 5 );
406     }
407
408     if( !b_edit )
409     {
410         lower_sizer->Add( new wxButton( this, wxID_CLEAR,
411                           wxU( _( "&Clear" )  ) ),
412                          0 , wxEXPAND | wxALL , 5 );
413     }
414     lower_sizer->Add( new wxButton( this, Create_Event,
415                           wxU( _( b_edit ? "OK" : "Create" ) ) ),
416                       0 , wxEXPAND | wxALL , 5 );
417
418
419     panel_sizer->Add( lower_sizer, 0 , wxEXPAND| wxALL, 5 );
420     panel_sizer->Layout();
421     SetSizerAndFit( panel_sizer );
422 }
423
424 VLMAddStreamPanel::~VLMAddStreamPanel()
425 {
426 }
427
428 void VLMAddStreamPanel::Load( VLMStream *p_stream )
429 {
430     name_text->SetValue( wxU( p_stream->p_media->psz_name ) );
431     name_text->SetEditable( false );
432     if( p_stream->p_media->i_input > 0 )
433     {
434         input_text->SetValue( wxU( p_stream->p_media->input[0] ) );
435     }
436     output_text->SetValue( wxU( p_stream->p_media->psz_output ) );
437     enabled_checkbox->SetValue( p_stream->p_media->b_enabled );
438     if( b_broadcast)
439         loop_checkbox->SetValue( p_stream->p_media->b_loop );
440 }
441
442 void VLMAddStreamPanel::OnCreate( wxCommandEvent &event )
443 {
444     char *psz_name = wxFromLocale( name_text->GetValue() );
445     char *psz_input = wxFromLocale(  input_text->GetValue() );
446     char *psz_output = wxFromLocale( output_text->GetValue() );
447     if( b_broadcast && ! b_edit )
448     {
449         p_vlm->AddBroadcast( psz_name, psz_input, psz_output,
450                          enabled_checkbox->IsChecked() ? VLC_TRUE: VLC_FALSE,
451                          loop_checkbox->IsChecked() ? VLC_TRUE : VLC_FALSE );
452     }
453     else if( b_broadcast && b_edit )
454     {
455         p_vlm->EditBroadcast( psz_name, psz_input, psz_output,
456                         enabled_checkbox->IsChecked() ? VLC_TRUE: VLC_FALSE,
457                         loop_checkbox->IsChecked() ? VLC_TRUE : VLC_FALSE );
458     }
459     else if( !b_broadcast && !b_edit )
460     {
461         p_vlm->AddVod( psz_name, psz_input, psz_output,
462                        enabled_checkbox->IsChecked() ? VLC_TRUE: VLC_FALSE,
463                        loop_checkbox->IsChecked() ? VLC_TRUE : VLC_FALSE );
464     }
465     else
466     {
467         p_vlm->EditVod( psz_name, psz_input, psz_output,
468                         enabled_checkbox->IsChecked() ? VLC_TRUE: VLC_FALSE,
469                         loop_checkbox->IsChecked() ? VLC_TRUE : VLC_FALSE );
470     }
471     wxLocaleFree( psz_name) ; wxLocaleFree( psz_input ) ;
472     wxLocaleFree( psz_output);
473     if( !b_edit )
474         OnClear( event );
475     if( b_edit )
476         p_parent->Hide();
477 }
478
479 void VLMAddStreamPanel::OnClear( wxCommandEvent &event )
480 {
481     name_text->SetValue( wxU("") );
482     input_text->SetValue( wxU("") );
483     output_text->SetValue( wxU("") );
484 }
485
486 void VLMAddStreamPanel::OnChooseInput( wxCommandEvent &event )
487 {
488     if( p_open_dialog == NULL )
489         p_open_dialog = new OpenDialog( p_intf, this, -1, -1, OPEN_STREAM );
490
491     if( p_open_dialog && p_open_dialog->ShowModal() == wxID_OK )
492     {
493         input_text->SetValue( p_open_dialog->mrl[0] );
494     }
495 }
496
497 void VLMAddStreamPanel::OnChooseOutput( wxCommandEvent &event )
498 {
499     if( p_sout_dialog == NULL )
500         p_sout_dialog = new SoutDialog( p_intf, this );
501
502     if( p_sout_dialog && p_sout_dialog->ShowModal() == wxID_OK )
503     {
504         wxString sout = (p_sout_dialog->GetOptions())[0] ;
505         sout = sout.AfterFirst( '=' );
506         output_text->SetValue( sout );
507     }
508 }
509
510 /****************************************************************************
511  * VLM Frame implementation
512  ****************************************************************************/
513 enum
514 {
515 };
516
517 BEGIN_EVENT_TABLE( VLMFrame, wxFrame )
518     EVT_CLOSE( VLMFrame::OnClose )
519 END_EVENT_TABLE()
520
521 VLMFrame::VLMFrame( intf_thread_t *_p_intf, wxWindow *_p_parent ) :
522         wxFrame( _p_parent, -1, wxU( _("VLM") ),
523         wxDefaultPosition, wxSize( 640,480 ), wxDEFAULT_FRAME_STYLE )
524 {
525     SetIcon( *_p_intf->p_sys->p_icon );
526
527     wxBoxSizer *main_sizer = new wxBoxSizer( wxHORIZONTAL );
528     vlm_panel = new VLMPanel( _p_intf, this );
529
530 #if defined(WIN32)
531     main_sizer->Add( vlm_panel, 1, wxGROW, 0 );
532 #else
533     main_sizer->Add( vlm_panel, 1, wxEXPAND | wxALL, 5 );
534 #endif
535     main_sizer->Layout();
536     SetSizerAndFit( main_sizer );
537 }
538
539 void VLMFrame::OnClose( wxCloseEvent& WXUNUSED(event) )
540 {
541     Hide();
542 }
543
544 void VLMFrame::Update()
545 {
546     vlm_panel->Update();
547 }
548
549 VLMFrame::~VLMFrame()
550 {
551     delete vlm_panel;
552 }
553
554 /****************************************************************************
555  * VLM Add stream Frame implementation
556  ****************************************************************************/
557 VLMEditStreamFrame::VLMEditStreamFrame( intf_thread_t *_p_intf,
558             wxWindow *_p_parent, VLMWrapper *_p_vlm, vlc_bool_t _b_broadcast,
559             VLMStream *p_stream ) :
560         wxFrame( _p_parent, -1, wxU( _("VLM stream") ),
561         wxDefaultPosition, wxSize( 640,480 ), wxDEFAULT_FRAME_STYLE )
562 {
563     SetIcon( *_p_intf->p_sys->p_icon );
564
565     wxBoxSizer *main_sizer = new wxBoxSizer( wxHORIZONTAL );
566     vlm_panel = new VLMAddStreamPanel( _p_intf, this, _p_vlm ,
567                                        VLC_TRUE, _b_broadcast );
568
569     vlm_panel->Load( p_stream );
570
571     main_sizer->Add( vlm_panel, 1, wxEXPAND | wxALL, 5 );
572     main_sizer->Layout();
573     SetSizerAndFit( main_sizer );
574 }
575
576 VLMEditStreamFrame::~VLMEditStreamFrame()
577 {
578 }