Appendix A: Aws++ API

aws_balloon widget

 
#include <Aws/aws_balloon.h>

class	aws_balloon: public toplevel
{
public:
	aws_balloon();
	aws_balloon(char* p, char* options = "");
	aws_balloon(widget* w, char* p, char* options = "");

	label	*subLabel(const char *opt = NULL) const;
	frame	*subFrame(const char *opt = NULL) const;

	void	statusBar(label *statusLabel);
	void	statusBar(message *statusMessage);

	// 'popup' may be "" if you only want to set a statusmessage
	void	bind(widget *w, const char *popup, const char *msg = "");
};

Constructors

awsballoon();
System level constructor
aws_balloon(char* p, char* options = "");
Create an aws_balloon with path p and the specified options options
aws_balloon(widget* w, char* p, char* options = "");
Create an aws_balloon as a child of w, with path p and the specified options options

Methods

label *subLabel(const char *opt = NULL) const;
Returns the aws_balloons label-subwidget, and optionaly configures the widget with the
specified options (if any).
frame *subFrame(const char *opt = NULL) const;
Returns the aws_balloons frame-subwidget, and optionaly configures the widget with the specified options (if any).
void statusBar(label *statusLabel);
Configures a label-type widget as statusbar for the aws_balloon. The statusbar is used to display a message when the mousepointer enters a widget.
void statusBar(message *statusMessage);
Configures a message-type widget as statusbar for the aws_balloon. The statusbar is used to display a message when the mousepointer enters a widget.
void bind(widget *w, const char *popup, const char *msg = "");
Bind the aws_balloon to a widget witth the specified popup message (shown 500 msec after the mouse enters the widget), and the (opional) statusmessage (shown immediately after the mouse enters the widget). Both message can be empty ("").

aws_combobox Widget

#include <Aws/aws_combobox.h>

class	aws_combobox: public frame
{
public:
	aws_combobox();
	aws_combobox(char* p, char * options = "");
	aws_combobox(widget* w, char* p, char * options = "");

	frame		*subFrame(const char *opt = NULL) const;
	entry		*subEntry(const char *opt = NULL) const;
	button		*subButton(const char *opt = NULL) const;
	toplevel 	*subToplevel(const char *opt = NULL) const;
	listbox		*subListbox(const char *opt = NULL) const;
	
	// entry 
	void		insert(const char *txt);
	void		del(void);

	// listbox
	void		insert(int index, const char *txt);
	void		del(int entry);
	void		del(int begin, int end);

	// retrieval of selections/entries
	char		*get(void);
	int		curselection(void);
	char		*selection(int index = -1);
	int		size(void);

	// bindings
	int		bind(handler *h, const char *arg);
};

Constructors

aws_combobox();
System level constructor
aws_combobox(char* p, char * options = "");
Create an aws_combobox with path p and the specified options options
aws_combobox(widget* w, char* p, char * options = "");
Create an Combobox as a child of w, with path p and the specified options options

Methods

frame *subFrame(const char *opt = NULL) const;
entry *subEntry(const char *opt = NULL) const;
button *subButton(const char *opt = NULL) const;
toplevel *subToplevel(const char *opt = NULL) const;
listbox *subListbox(const char *opt = NULL) const;
Return the aws_combobox' subwidgets, and optionally configures the widget with the specified options (if any).
void insert(const char *txt);
Insert txt into the aws_combobox' text entry.
void del(void);
Erase the text in the aws_combobox' text entry.
void insert(int index, const char *txt);
Insert txt at position index in the aws_combobox' pulldown listbox.
void del(int entry);
Erase the entry at position entry in the aws_combobox' pulldown listbox.
void del(int begin, int end);
Erase the entry in the range begin-end in the aws_combobox' pulldown listbox.
char *get(void);
Return the text in the aws_combobox' text entry.
int curselection(void);
Return the current selection in the aws_combobox' pulldown listbox.
char *selection(int index = -1);
Return the entry in the aws_combobox' pulldown listbox at position index if index > 0¸ else the current selection
int size(void);
Return the number of entries in the aws_combobox' pulldown listbox.
int bind(handler *h, const char *arg);
Install a handler h for this aws_combobox. This handler must dispatch the events ListSelected (selection made in the pulldown listbox) and EntrySelected (Return typed in the text entry).
#include <Aws/aws_dialog.h>

class	aws_dialog: public toplevel
{
public:
	aws_dialog();
	aws_dialog(char* p, char* options = "");
	aws_dialog(widget* w, char* p, char* options = "");

	~aws_dialog();

	// Access to internals
	label	*subMessageLabel(const char *opt = NULL) const;
	label	*subImageLabel(const char *opt = NULL) const;
	frame	*subWidgetFrame(const char *opt = NULL) const;

	void	text(const char *txt);
	void	image(const char *img);
	
	void	show(void);
	char	*getChoice(bool doGrab = true);

	// handler for buttons, either intern or extern
	button	*addButton(const char *txt, const char *arg = "", 
			   const char *opts = "");
	button	*addButton(handler *h, const char *txt, const char *arg = "",
			   const char *opts = "");

};

Constructors

aws_combobox();
System level constructor
aws_combobox(char* p, char * options = "");
Create an aws_combobox with path p and the specified options options
aws_combobox(widget* w, char* p, char * options = "");
Create a Combobox as a child of w, with path p and the specified options options

Methods

label *subMessageLabel(const char *opt = NULL) const;
label *subImageLabel(const char *opt = NULL) const;
frame *subWidgetFrame(const char *opt = NULL) const;
Provide direct (by passing options to opt) and indirect (by manipulating the returned widget) access to the aws_dialog's internal widgets. The frame returned by subWidgetFrame can be used to add widgets and functionality to the aws_dialog. These widgets will be garbagecollected by the aws_dialog, but not managed, handled, etc.
void text(const char *txt);
Sets the text for the aws_dialog's message;
void image(const char *img);
Sets the picture for the aws_dialog's image;
void show(void);
Shows the aws_dialog on the screen.
char *getChoice(bool doGrab = true);
Passes control to the aws_dialog, it won't return until one of the internally handled buttons has been pressed, and returns the value associated with this button. doGrab specified whether the aws_dialog should do a (local) grab on the mousepointer.
button *addButton(const char *txt, const char *arg = "", const char *opts = "");
Add a button to the aws_dialog. No handler is specified so the aws_dialog will handle the button internally by returning from getChoice, returning arg or txt if arg is not specified. This method is usually used for "Ok", "Cancel" buttons etc.
button *addButton(handler *h, const char *txt, const char *arg = "", const char *opts = "");
Add a button like above, but with it's own handler. This method is used for buttons that, for example, update the widgets in the widgetFrame, or for "Help" buttons.

#include <Aws/aws_dialog.h>

class	awsYesNoDialog: public aws_dialog
{
public:
	awsYesNoDialog(); 
	awsYesNoDialog(char* p, char* options = "");
	awsYesNoDialog(widget* w, char* p, char* options = "");
	~awsYesNoDialog();
};

Constructors

awsYesNoDialog();
System level constructor
awsYesNoDialog(char* p, char * options = "");
Create an awsYesNoDialog with path p and the specified options options
awsYesNoDialog(widget* w, char* p, char * options = "");
Create an YesNoDialog as a child of w, with path p and the specified options options

Methods

(See aws_dialog)
<< [Prev] [Top] [Next] >>