# IpeletHelper Class Reference
[The Ipelet interface]

Service provider for Ipelets. More...

List of all members.

## Public Member Functions

- virtual void Message (const char *msg)=0
- virtual int MessageBox (const char *text, const char *button1, const char *button2, const char *button3)=0
- virtual bool GetString (const char *prompt, IpeString &str)=0
- virtual const IpeStyleSheet * StyleSheet ()=0
- virtual const IpeDocument * Document ()=0
- virtual IpeDocument * EditDocument ()=0
- virtual int CurrentPage () const=0
- virtual int CurrentView () const=0
- virtual int CurrentLayer () const=0
- virtual const IpeAllAttributes & Attributes () const=0
- virtual const IpeSnapData & SnapData () const=0

## Detailed Description

Service provider for Ipelets.

Ipelets can ask Ipe to perform various services and request information using this class.

## Member Function Documentation

virtual void IpeletHelper::Message | ( | const char * | msg | ) | `[pure virtual]`

| Show a message in the status bar.

virtual int IpeletHelper::MessageBox | ( | const char * | text,
|  | const char * | button1,
|  | const char * | button2,
|  | const char * | button3
| ) | `[pure virtual]`

| Pop up a modal message box with the text, and up to three buttons (Use 0 pointer to remove a button). Returns index (0 to 2) of button pressed.

virtual bool IpeletHelper::GetString | ( | const char * | prompt,
|  | IpeString & | str
| ) | `[pure virtual]`

| Pop up a modal dialog asking the user to enter a string. Returns true if the user didn't cancel the dialog.

virtual const IpeStyleSheet* IpeletHelper::StyleSheet | ( |  | ) | `[pure virtual]`

| Return the style sheet.

virtual const IpeDocument* IpeletHelper::Document | ( |  | ) | `[pure virtual]`

| Return read-only document.

virtual IpeDocument* IpeletHelper::EditDocument | ( |  | ) | `[pure virtual]`

| Get read-write access to the entire document. Marks the document as edited, and resets undo.

virtual int IpeletHelper::CurrentPage | ( |  | ) | const`[pure virtual]`

| Return index of current page (starting with 0).

virtual int IpeletHelper::CurrentView | ( |  | ) | const`[pure virtual]`

| Return index of current page view (starting with 0).

virtual int IpeletHelper::CurrentLayer | ( |  | ) | const`[pure virtual]`

| Return index of current layer in the page.

virtual const IpeAllAttributes& IpeletHelper::Attributes | ( |  | ) | const`[pure virtual]`

| Return the attributes currently set in the UI.

virtual const IpeSnapData& IpeletHelper::SnapData | ( |  | ) | const`[pure virtual]`

| Return the current snapping situation in Ipe.

The documentation for this class was generated from the following file:

- ipelet.h