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

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

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 //------------------------------------------------------------------------------
00003 //                               MyPropertyBox.cpp
00004 //------------------------------------------------------------------------------
00005 // $Id: MyPropertyBox.cpp,v 1.1 2003/02/07 05:15:10 vlg Exp $
00006 //------------------------------------------------------------------------------
00007 //  Copyright (c) 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 // Date: Sat Dec  7 16:45:46 EST 2002
00015 //------------------------------------------------------------------------------
00016 
00017 #include "gWavMerger-main.h"
00018 #include "MyPropertyBox.h"
00019 
00020 /*******************************************************************************
00021  Local defines
00022 *******************************************************************************/
00023 
00024 
00025 /*******************************************************************************
00026  Class member functions
00027 *******************************************************************************/
00028 
00029 
00030 MyPropertyBox::MyPropertyBox (const std::string& title_) :
00031     m_notebook (manage (new Gtk::Notebook)),
00032     m_property_changed (false)
00033 {
00034     trace("MyPropertyBox::MyPropertyBox");
00035 
00036     set_size_request (444, 267);
00037     set_title (title_.c_str ());
00038 
00039     // Gtk::Box_Helpers::BoxList& boxlist = get_action_area ()->children ();
00040 
00041     m_apply_button = manage (new Gtk::Button ("Apply"));
00042     get_action_area ()->pack_start (*m_apply_button);
00043     m_apply_button->signal_clicked ().connect (
00044         SigC::slot (*this, &MyPropertyBox::on_apply_clicked));
00045     m_apply_button->set_sensitive (false);
00046     m_apply_button->show ();
00047 
00048     m_close_button = manage (new Gtk::Button ("Close"));
00049     get_action_area ()->pack_start (*m_close_button);
00050     m_close_button->signal_clicked ().connect (
00051         slot (*this, &MyPropertyBox::on_close_clicked));
00052     m_close_button->show ();
00053 
00054     get_vbox ()->pack_start (*m_notebook);
00055     m_notebook->set_show_border (true);
00056     m_notebook->show ();
00057 }
00058 
00059 
00060 MyPropertyBox::~MyPropertyBox ()
00061 {
00062     trace("MyPropertyBox::~MyPropertyBox");
00063 }
00064 
00065 gint
00066 
00067 MyPropertyBox::append_page (Gtk::Widget& child_, const std::string& tab_label_)
00068 {
00069     trace("MyPropertyBox::append_page");
00070     m_notebook->pages ().push_back (
00071         Gtk::Notebook_Helpers::TabElem (child_, tab_label_));
00072     return 0;
00073 }
00074 
00079 void
00080 
00081 MyPropertyBox::changed ()
00082 {
00083     trace("MyPropertyBox::changed");
00084 
00085     m_apply_button->set_sensitive (true);
00086     m_property_changed = true;
00087 }
00088 
00089 void
00090 
00091 MyPropertyBox::on_apply_clicked ()
00092 {
00093     trace("MyPropertyBox::on_apply_clicked");
00094 
00095     if (m_property_changed) {
00096         apply_impl ();
00097         m_property_changed = false;
00098     }
00099     m_apply_button->set_sensitive (false);
00100 }
00101 
00102 void
00103 
00104 MyPropertyBox::on_close_clicked ()
00105 {
00106     trace("MyPropertyBox::on_close_clicked");
00107     close_impl ();
00108     m_apply_button->set_sensitive (false);
00109 }

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