conexus logo

hostportentry.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2001 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the conexus library.                             *
00006  *                                                                         *
00007  *   The conexus library is free software; you can redistribute it and/or  *
00008  *   modify it under the terms of the GNU General Public License           *
00009  *   version 3 as published by the Free Software Foundation.               *
00010  *                                                                         *
00011  *   The conexus library is distributed in the hope that it will be        *
00012  *   useful, but WITHOUT ANY WARRANTY; without even the implied warranty   *
00013  *   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
00014  *   General Public License for more details.                              *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this software. If not see <http://www.gnu.org/licenses/>.  *
00018  ***************************************************************************/
00019 #ifndef CONEXUSGTKMMHOSTPORTENTRY_H
00020 #define CONEXUSGTKMMHOSTPORTENTRY_H
00021 
00022 #include <gtkmm.h>
00023 
00024 #include <conexus-gtkmm/hostentry.h>
00025 #include <conexus-gtkmm/portentry.h>
00026 
00027 #ifdef CONEXUS_HAVE_DBUS
00028 #include <conexus-dbus.h>
00029 #endif
00030 
00031 namespace Conexus
00032 {
00033   namespace Gtk
00034   {
00035 
00039     class HostPortEntry : public ::Gtk::Table
00040     {
00041       public:
00042         typedef enum Layout { VERTICAL, HORIZONTAL } Layout;
00043         
00044         HostPortEntry ( Layout layout = VERTICAL );
00045         HostPortEntry( IPAddressInterface* addr, unsigned lookup = LOOKUP_IPV4|LOOKUP_IPV6, Layout layout = VERTICAL );
00046         HostPortEntry( IPAddressInterface::pointer addr, unsigned lookup = LOOKUP_IPV4|LOOKUP_IPV6, Layout layout = VERTICAL );
00047         HostPortEntry( IPv4::Address& addr, unsigned lookup = LOOKUP_IPV4, Layout layout = VERTICAL );
00048         HostPortEntry( IPv6::Address& addr, unsigned lookup = LOOKUP_IPV6, Layout layout = VERTICAL );
00049 
00050         ~HostPortEntry();
00051 
00052         void set_address( IPAddressInterface* addr, unsigned lookup = LOOKUP_IPV4 );
00053         void set_address( IPAddressInterface::pointer addr, unsigned lookup = LOOKUP_IPV4 );
00054         void set_address( IPv4::Address& addr, unsigned lookup = LOOKUP_IPV4 );
00055         void set_address( IPv6::Address& addr, unsigned lookup = LOOKUP_IPV6 );
00056 
00057         void unset_address();
00058 
00059         HostEntry& host_entry();
00060         PortEntry& port_entry();
00061 
00062         Layout layout();
00063         void set_layout ( Layout layout );
00064 
00065       protected:
00066         HostEntry m_host;
00067         PortEntry m_port;
00068         ::Gtk::Alignment m_host_alignment, m_port_alignment;
00069         Layout m_layout;
00070 
00071         void setup_widget();
00072     };
00073 
00074   }
00075 
00076 }
00077 
00078 #endif

Generated on Wed Jul 8 15:50:07 2009 for conexus by doxygen 1.5.8