GnomeCalculator

Name

GnomeCalculator — one line description goes here.

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

Signal Prototypes


'result-changed'
            void        user_function      (GnomeCalculator *calculator,
                                            gdouble arg1,
                                            gpointer user_data);

Description

Details


GnomeCalculator

struct GnomeCalculator;


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

Signals


The 'result-changed' signal

void        user_function                  (GnomeCalculator *calculator,
                                            gdouble arg1,
                                            gpointer user_data);

calculator :the object which received the signal.arg1 : user_data :user data set when the signal handler was connected.