Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

abstract_button.h

00001 /* 00002 * =========================== 00003 * VDK Visual Develeopment Kit 00004 * Version 0.4 00005 * October 1998 00006 * =========================== 00007 * 00008 * Copyright (C) 1998, Mario Motta 00009 * Developed by Mario Motta <mmotta@guest.net> 00010 * 00011 * This library is free software; you can redistribute it and/or 00012 * modify it under the terms of the GNU Library General Public 00013 * License as published by the Free Software Foundation; either 00014 * version 2 of the License, or (at your option) any later version. 00015 * 00016 * This library is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 * Library General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Library General Public 00022 * License along with this library; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00024 * 02111-1307, USA. 00025 */ 00026 00027 #ifndef ABSTRACTBUTTON_H 00028 #define ABSTRACTBUTTON_H 00029 #include <vdk/vdkobj.h> 00030 00038 class VDKAbstractButton: public VDKObject 00039 { 00040 public: 00041 VDKReadWriteValueProp<VDKAbstractButton, GtkReliefStyle> Relief; 00042 00043 VDKAbstractButton(VDKForm* owner); 00044 virtual ~VDKAbstractButton(); 00045 virtual void SetForeground(VDKRgb, GtkStateType) {} 00046 virtual void SetFont(VDKFont*) {} 00047 00048 void SetRelief(GtkReliefStyle style) { 00049 gtk_button_set_relief(GTK_BUTTON(widget), style); 00050 } 00051 00052 GtkReliefStyle GetRelief() { 00053 return gtk_button_get_relief(GTK_BUTTON(widget)); 00054 } 00055 #ifdef USE_SIGCPLUSPLUS 00056 public: 00061 VDKSignal0<void> OnButtonClicked; 00066 VDKSignal0<void> OnButtonPressed; 00071 VDKSignal0<void> OnButtonLeave; 00072 protected: 00073 /* This method establishes the connection to sigc-signals in 00074 a concrete subclass. Wid is the underlaying used gtk-widget 00075 */ 00076 static void make_gtksigc_connection(VDKAbstractButton* obj, 00077 GtkWidget* wid); 00078 private: 00079 static void _handle_clicked(GtkWidget* wid, gpointer obj); 00080 static void _handle_pressed(GtkWidget* wid, gpointer obj); 00081 static void _handle_leave(GtkWidget* wid, gpointer obj); 00082 #endif 00083 }; 00084 00085 #endif

Generated on Tue Aug 17 12:39:50 2004 for vdk 2.4.0 by doxygen 1.3.7