Megawidgets

From OpenAlchemy.org

Contents

Introduction

Megawidgets are a set of APIs that provide high-end features like multi-column and calendar widgets. The multi-column widget itself provides a variety of features like inserting labels, buttons or even an image in a column. Similarly, the message box also gives a variety of options. We can pop a message box with an error icon, warning icon, question iconor info icon. And even the button option in the message box offers different types of response messages like OK/Cancel, Yes/No, OK, Abort/Retry/Cancel etc. The calendar works with respect to the present date and using that as a reference we can manipulate the programto get any date of any year.

It is very easy to use megawidgets. Megawidgets cannot be used in isolation. Combining the features of megawidgets and pwrap widget library, the developer can create applicationswith rich user interface quickly, without compromising the performance of the application.


Multi-column widgets

The multi column widget itself provides a variety of features like inserting labels, buttons or even an image in the column.

To create a multi-column widget we have to use the function,

multi_column* multi_column_create(px_widget*, int, int, unsigned int, unsigned int, int);

We can get the number of rows and columns using the following functions:

int (*get_no_of_rows)(multi_column*);

int (*get_no_of_columns)(multi_column*);

We can add and remove rows using the following functions:

void (*add_row)(multi_column*, unsigned int);

void (*remove_row)(multi_column*, unsigned int);

We can set the column title using the function:

void (*set_column_title)(multi_column*, px_widget*, unsigned int);

Calendar

The calendar works with respect to the present date and using that as a reference we can manipulate the program to get us any date of any year.

To create a calendar use the function,

calendar* calendar_create(px_widget*, int, int, unsigned int, unsigned int);

To set the date, month and year use the following functions respectively,

void(*set_date)(calendar*, unsigned int);

void(*set_month)(calendar*, unsigned int);

void(*set_year)(calendar*, unsigned int);


To refresh a calendar page,

void (*refresh)(calendar*);

To get a particular date or month or year,

unsigned int (*get_date)(calendar*);

unsigned int (*get_month)(calendar*);

unsigned int (*get_year)(calendar*);

To get the number of days in a particular month,

unsigned int (*get_no_of_days)(calendar*, unsigned int);

The usability of megawidgets is very user friendly. Combining the features of Megawidgets and Picowidgets, we can develop high end applications quickly, in an efficient way.


Interfaces

The structs and callbacks and other interfaces needed to develop Amida software using megawidgets are exposed in megawidget.h.

Users

OpenAlchemy is a Free and Open Source Software project
proudly supported by
Geodesic Information Systems Limited

Comments? Feedback? Contact Us.

MediaWiki