hostportentry.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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