GnomeCalculator

Name

GnomeCalculator —

Synopsis


#include <gnome.h>


struct      GnomeCalculator;
enum        GnomeCalculatorMode;
GtkWidget*  gnome_calculator_new            (void);
void        gnome_calculator_clear          (GnomeCalculator *gc,
                                             const gboolean reset);
void        gnome_calculator_set            (GnomeCalculator *gc,
                                             gdouble result);
#define     gnome_calculator_get_result     (gc)

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GtkContainer
               +----GtkBox
                     +----GtkVBox
                           +----GnomeCalculator

Description

Details

struct GnomeCalculator

struct GnomeCalculator;


enum GnomeCalculatorMode

typedef enum {
	GNOME_CALCULATOR_DEG,
	GNOME_CALCULATOR_RAD,
	GNOME_CALCULATOR_GRAD
} GnomeCalculatorMode;


gnome_calculator_new ()

GtkWidget*  gnome_calculator_new            (void);

Creates a calculator widget, a window with all the common buttons and functions found on a standard pocket calculator.

Returns :Pointer to newly-created calculator widget.


gnome_calculator_clear ()

void        gnome_calculator_clear          (GnomeCalculator *gc,
                                             const gboolean reset);

Resets the calculator back to zero. If reset is TRUE, results stored in memory and the calculator mode are cleared also.

gc : Pointer to GNOME calculator widget.
reset : FALSE to zero, TRUE to reset calculator completely


gnome_calculator_set ()

void        gnome_calculator_set            (GnomeCalculator *gc,
                                             gdouble result);

Sets the value stored in the calculator's result buffer to the given result.

gc : Pointer to GNOME calculator widget.
result : New value of calculator buffer.


gnome_calculator_get_result()

#define     gnome_calculator_get_result(gc)

gc : Pointer to GNOME calculator widget
Returns :Value currently stored in calculator buffer.