GnomeCalculator

Name

GnomeCalculator -- Calculator widget.

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

This widget provides a simple calculator that you can embed in your applications for doing quick computations.

The widget consists of a fully functional calculator including standard arithmetic functions as well as trigonometric capabilities, exponents, factorials, nested equations, and others.

GnomeCalculator functions

The following is a list and description of each button represented on the GnomeCalculator widget


Memory Functions

The following are GnomeCalculator widget's memory functions


Exponential functions

The following are GnomeCalculator widget's exponential functions


Trigonometric functions

Details

struct GnomeCalculator

struct GnomeCalculator;


enum GnomeCalculatorMode

typedef enum {
	GNOME_CALCULATOR_DEG,
	GNOME_CALCULATOR_RAD,
	GNOME_CALCULATOR_GRAD
} GnomeCalculatorMode;

The way in which degrees are handled by the calculator, possible values include: GNOME_CALCULATOR_DEG, GNOME_CALCULATOR_DEG, GNOME_CACLULATOR_DRAG.


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.


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.


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.


gnome_calculator_get_result()

#define     gnome_calculator_get_result(gc)

See Also

GnomeNumberEntry