Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

/home/vlg/develop/gwavmerger/src/MergeMapPref.cpp

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 //------------------------------------------------------------------------------
00003 //                              MergeMapPref.cpp
00004 //------------------------------------------------------------------------------
00005 // $Id: MergeMapPref.cpp,v 1.4 2003/02/07 05:15:10 vlg Exp $
00006 //------------------------------------------------------------------------------
00007 //  Copyright (c) 2001,2002 by Vladislav Grinchenko
00008 //
00009 //  This program is free software; you can redistribute it and/or
00010 //  modify it under the terms of the GNU General Public License
00011 //  as published by the Free Software Foundation; either version
00012 //  2 of the License, or (at your option) any later version.
00013 //------------------------------------------------------------------------------
00014 
00015 #include <gtkmm/label.h>
00016 #include <gtkmm/frame.h>
00017 #include <gtkmm/box.h>
00018 #include <gtkmm/table.h>
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #   include "config.h"
00022 #endif
00023 
00024 #include "gWavMerger-main.h"
00025 #include "MergeMapPref.h"
00026 #include "PrefWindow.h"
00027 
00028 using ASSA::TRACE;
00029 
00030 
00031 MergeMapPref::MergeMapPref(PrefWindow& pf_) 
00032     : m_pref_window (pf_)
00033 {  
00034     trace ("MergeMapPref::MergeMapPref");
00035 
00036     m_vbox = manage (new class Gtk::VBox(false, 0));
00037    
00038     Gtk::Label *label = 
00039         manage(new class Gtk::Label("Here you can control the merger map.\n"
00040                                     "Read 'Help' for details."));
00041     label->set_alignment(0.5, 0.5);
00042     label->set_padding(0, 0);
00043     label->set_justify(Gtk::JUSTIFY_LEFT);
00044 
00045     Gtk::Label*  label4 = manage(new class Gtk::Label(" A "));
00046     label4->set_alignment(0.5, 0.5);
00047     label4->set_padding(0, 0);
00048 
00049     Gtk::Frame*  frame1 = manage(new class Gtk::Frame());
00050     frame1->set_label_align(0, 0);
00051     frame1->set_shadow_type(Gtk::SHADOW_ETCHED_IN);
00052     frame1->add (*label4);
00053 
00054     Gtk::Label*  label6 = manage(new class Gtk::Label(" Pause: "));
00055     label6->set_alignment(0.5, 0.5);
00056     label6->set_padding(0, 0);
00057 
00058     m_pre_delay_entry = manage(new class Gtk::Entry());
00059     m_pre_delay_entry->set_size_request(42, -1);
00060     m_pre_delay_entry->set_editable(true);
00061     m_pre_delay_entry->set_text("2x");
00062    
00063     Gtk::HBox*   hbox4  = manage(new class Gtk::HBox(false, 0));
00064     hbox4->pack_start (*label6, false, false, 0);
00065     hbox4->pack_start (*m_pre_delay_entry, true, true, 2);
00066 
00067     Gtk::Frame*  frame2 = manage(new class Gtk::Frame());
00068     frame2->set_label_align (0, 0);
00069     frame2->set_shadow_type (Gtk::SHADOW_ETCHED_IN);
00070     frame2->add (*hbox4);
00071 
00072     Gtk::Label*  label5 = manage(new class Gtk::Label(" B "));
00073     label5->set_alignment (0.5, 0.5);
00074     label5->set_padding (0, 0);
00075 
00076     Gtk::Frame*  frame3 = manage(new class Gtk::Frame());
00077     frame3->set_label_align (0, 0);
00078     frame3->set_shadow_type (Gtk::SHADOW_ETCHED_IN);
00079     frame3->add (*label5);
00080 
00081     Gtk::Label*  label7 = manage(new class Gtk::Label(" Pause: "));
00082     label7->set_alignment (0.5, 0.5);
00083     label7->set_padding (0, 0);
00084 
00085     m_post_delay_entry = manage(new class Gtk::Entry());
00086     m_post_delay_entry->set_size_request (42, -1);
00087     m_post_delay_entry->set_editable (true);
00088     m_post_delay_entry->set_text ("2x");
00089    
00090     Gtk::HBox*   hbox5  = manage(new class Gtk::HBox(false, 0));
00091     hbox5->pack_start (*label7, false, false, 0);
00092     hbox5->pack_start (*m_post_delay_entry, true, true, 2);
00093 
00094     Gtk::Frame*  frame4 = manage(new class Gtk::Frame());
00095     frame4->set_label_align (0, 0);
00096     frame4->set_shadow_type (Gtk::SHADOW_ETCHED_IN);
00097     frame4->add (*hbox5);
00098 
00099     Gtk::Table*  table2 = manage(new class Gtk::Table(1, 4, false));
00100     table2->attach (*frame1, 0,1,0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::FILL, 4, 0);
00101     table2->attach (*frame2, 1,2,0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::FILL, 4, 0);
00102     table2->attach (*frame3, 2,3,0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::FILL, 4, 0);
00103     table2->attach (*frame4, 3,4,0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::FILL, 4, 0);
00104 
00105     Gtk::VBox*    vbox3 = manage(new class Gtk::VBox(false, 10));
00106 
00107     vbox3->pack_start(*label, true, true, 0);
00108     vbox3->pack_start(*table2, false, false, 9);
00109 
00110     m_vbox->set_spacing (8);
00111     m_vbox->pack_start (*vbox3);
00112 
00113     m_pre_delay_entry->signal_changed().connect (
00114         SigC::slot (*this, &MergeMapPref::changed_cb));
00115     m_post_delay_entry->signal_changed().connect (
00116         SigC::slot (*this, &MergeMapPref::changed_cb));
00117 
00118     label->show();
00119     label4->show();
00120     frame1->show();
00121     label6->show();
00122     m_pre_delay_entry->show();
00123     hbox4->show();
00124     frame2->show();
00125     label5->show();
00126     frame3->show();
00127     label7->show();
00128     m_post_delay_entry->show();
00129     hbox5->show();
00130     frame4->show();
00131     table2->show();
00132     vbox3->show();
00133 
00134     dump ();
00135 }
00136 
00137 void
00138 
00139 MergeMapPref::changed_cb ()
00140 {  
00141     trace ("MergeMapPref::changed_cb");
00142     m_pref_window.changed ();
00143 }
00144 
00145 void 
00146 
00147 MergeMapPref::dump () const
00148 {
00149     static const char self[]="MergeMapPref::dump";
00150     trace(self);
00151 
00152     DL((TRACE,"m_pre_delay_entry  = %s\n", get_pre_delay ().c_str ()));
00153     DL((TRACE,"m_post_delay_entry = %s\n", get_post_delay ().c_str ()));
00154     DL((TRACE,"* m_pre_delay_entry  = %s\n", 
00155         m_pre_delay_entry->get_text ().c_str ()));
00156     DL((TRACE,"* m_post_delay_entry  = %s\n", 
00157         m_post_delay_entry->get_text ().c_str ()));
00158 }

Generated on Tue Feb 11 23:05:19 2003 for gwavmerger by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002