/* $Id: progressbar.gen_h,v 1.44 2001/07/15 13:33:38 murrayc Exp $ */ /* progressbar.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 <gtk--/progress.h> #include <gtk/gtkprogressbar.h> namespace Gtk { //: A widget which indicates progress visually. //- The {\class Gtk::ProgressBar} is typically used to display the progress //- of a long running operation. It provides a visual clue that processing //- is underway. The {\class Gtk::ProgressBar} can be used in two different //- modes: percentage mode and activity mode. //- //- When an application can determine how much work needs to take place //- (e.g. read a fixed number of bytes from a file) and can monitor its //- progress, it can use the {\class Gtk::ProgressBar} in percentage mode //- and the user sees a growing bar indicating the percentage of the work //- that has been completed. In this mode, the application is required to //- call either the {set_percentage()} or {set_value()} functions //- periodically to update the progress bar. //- //- When an application has no accurate way of knowing the amount of work //- to do, it can use the GtkProgressBar in activity mode. In this mode the //- progress bar shows activity by a block moving back and forth within the //- progress area. //- //- There is quite a bit of flexibility provided to control the appearance //- of the {\class Gtk::ProgressBar}. Functions are provided to control the //- orientation of the bar, optional text which can be displayed along with //- the bar, and the style in which the bar grows. class ProgressBar : public Progress { public: typedef ProgressBar CppObjectType; typedef GtkProgressBar BaseObjectType; public: //: Returns the underlaying gtk+ object. GtkProgressBar* gtkobj(); const GtkProgressBar* gtkobj() const; //: Returns true if object is this type. static bool isA(Gtk::Object *object); virtual ~ProgressBar(); private: public: ProgressBar(); //: Creates a new {\class Gtk::ProgressBar} with an associated {\class Gtk::Adjustment}. //- adjustment: A {\class Gtk::Adjustment} explicit ProgressBar(Adjustment &adjustment); GtkProgressBarStyle get_bar_style() const; GtkProgressBarOrientation get_orientation() const; guint get_discrete_blocks() const; guint get_activity_step() const; guint get_activity_blocks() const; //: Sets the style of the {\class Gtk::ProgressBar}. The default style is {\enum GTK_PROGRESS_CONTINUOUS}. //- style: A {\class Gtk::ProgressBarStyle} value indicating the desired style. void set_bar_style(GtkProgressBarStyle style=GTK_PROGRESS_CONTINUOUS); void set_discrete_blocks(guint blocks=10); void set_activity_step(guint step=3); void set_activity_blocks(guint blocks=5); void set_orientation(GtkProgressBarOrientation orientation=GTK_PROGRESS_LEFT_TO_RIGHT); protected: // impl functions }; //+ PROPERTIES(Gtk_ProgressBar) //. name: bar_style //. type: GtkProgressBarStyle //. get: //. set: //. desc: //. name: orientation //. type: GtkProgressBarOrientation //. get: //. set: //. desc: //. name: blocks //. type: guint //. get: //. set: //. desc: //. name: in_block //. type: gint //. get: //. set: //. desc: //. name: activity_pos //. type: gint //. get: //. set: //. desc: //. name: activity_step //. type: guint //. get: //. set: //. desc: //. name: activity_blocks //. type: guint //. get: //. set: //. desc: //. name: activity_dir //. type: guint:1 //. get: //. set: //. desc: }