00001 /* 00002 * =========================== 00003 * VDK Visual Develeopment Kit 00004 * Version 0.4 00005 * Revision 0.4.1 00006 * October 1998 00007 * =========================== 00008 * 00009 * Copyright (C) 1998, Mario Motta 00010 * Developed by Mario Motta <mmotta@guest.net> 00011 * 00012 * This library is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU Library General Public 00014 * License as published by the Free Software Foundation; either 00015 * version 2 of the License, or (at your option) any later version. 00016 * 00017 * This library is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 * Library General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU Library General Public 00023 * License along with this library; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00025 * 02111-1307, USA. 00026 */ 00027 00028 #ifndef WIDCONTAIN_H 00029 #define WIDCONTAIN_H 00030 #include <vdk/vdkobj.h> 00039 class VDKObjectContainer: public VDKObject 00040 { 00041 public: 00042 VDKObjectContainer(VDKForm* owner); 00043 virtual ~VDKObjectContainer() {} 00048 int BorderWidth(int w = -1) 00049 { 00050 if(w>=0) 00051 gtk_container_set_border_width (GTK_CONTAINER (widget),w); 00052 return GTK_CONTAINER (widget)->border_width; 00053 } 00057 virtual void Add(VDKObject* obj, int , int , int , int ); 00062 void RemoveObject(VDKObject* obj) { obj->Destroy(); } 00081 virtual void RemoveObjectFromContainer(VDKObject* obj); 00085 void RemoveObjects(); 00090 VDKObject* FindTag(int tag); 00094 void ForEachDo(void (*action)(VDKObject*)); 00095 /* ! 00096 Select those contained objects that satisfy to user defined 00097 condition. 00098 \param list an ItemList filled with all object addresses 00099 that satisfy condition- 00100 \condition an user defined function invoked with each object 00101 as param, function must return either true (satisfy) or false 00102 value. 00103 */ 00104 void Select(ItemList* list, bool (*condition)(VDKObject*)); 00105 00106 }; 00107 #endif 00108