// -*- c++ -*- // Generated by gtkmmproc from ./../aspectframe.gen_h -- DO NOT MODIFY! #ifndef _GTKMM_ASPECTFRAME_H #define _GTKMM_ASPECTFRAME_H /* $Id: aspectframe.gen_h,v 1.34 2001/07/15 13:33:38 murrayc Exp $ */ /* aspectframe.h * * Copyright (C) 1998-1999 The Gtk-- Development Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include namespace Gtk { class AspectFrame; class AspectFrame_Class; } namespace Gtk { Gtk::AspectFrame *wrap (GtkAspectFrame *o); } namespace Gtk { //: A frame that constrains its child to a particular aspect ratio. //- The GtkAspectFrame is useful when you want pack a widget so that it can resize but always //- retains the same aspect ratio. For instance, one might be drawing a small preview of a //- larger image. GtkAspectFrame derives from GtkFrame, so it can draw a label and a frame //- around the child. The frame will be "shrink-wrapped" to the size of the child. class AspectFrame : public Frame { public: typedef AspectFrame CppObjectType; typedef AspectFrame_Class CppClassType; typedef GtkAspectFrame BaseObjectType; typedef GtkAspectFrameClass BaseClassType; private: friend class AspectFrame_Class; static CppClassType aspect_frame_class; AspectFrame(const AspectFrame&); AspectFrame& operator=(const AspectFrame&); // not implemented protected: void initialize_class(); explicit AspectFrame(GtkAspectFrame *castitem); public: static GtkType get_type(); GtkAspectFrame* gtkobj() { return (GtkAspectFrame*)(gtkobject); } const GtkAspectFrame* gtkobj() const { return (GtkAspectFrame*)(gtkobject); } static bool isA(Object *checkcast); // Hook for proxies static const char* const signal_names[]; virtual ~AspectFrame(); private: void construct(const char *label, gfloat xalign, gfloat yalign, gfloat ratio, bool obey_child); public: //: Constructor with label. //- label: Label text. //- //- xalign: Horizontal alignment of the child within the allocation of the GtkAspectFrame. //- This ranges from 0.0 (left aligned) to 1.0 (right aligned). //- //- yalign: Vertical alignment of the child within the allocation of the GtkAspectFrame. //- This ranges from 0.0 (left aligned) to 1.0 (right aligned). //- //- ratio: The desired aspect ratio. //- //- obey_child: If TRUE, ratio is ignored, and the aspect ratio is taken from the requistion //- of the child. AspectFrame(const string &label, gfloat xalign, gfloat yalign, gfloat ratio=1.0, bool obey_child=false); //: Constructor without a label. //- The rest of the arguments are the same as above. AspectFrame(gfloat xalign, gfloat yalign, gfloat ratio=1.0, bool obey_child=false); //: Set parameters for the GtkAspectFrame. void set(gfloat xalign,gfloat yalign,gfloat ratio,gint obey_child); public: protected: // impl functions }; } //+ PROPERTIES(Gtk_AspectFrame) //. name: xalign //. type: gfloat //. get: //. set: //. desc: //. name: yalign //. type: gfloat //. get: //. set: //. desc: //. name: ratio //. type: gfloat //. get: //. set: //. desc: //. name: obey_child //. type: gint //. get: //. set: //. desc: //. name: center_allocation //. type: GtkAllocation //. get: //. set: //. desc: #endif .