os::Alert Class Reference
[The Syllable Graphical User Interface API]

Description:
More...

Inheritance diagram for os::Alert:

os::Window os::Looper os::Handler List of all members.

Public Types

enum  alert_icon {
  ALERT_WARNING = 0,
  ALERT_INFO = 1,
  ALERT_QUESTION = 2,
  ALERT_TIP = 3
}
 Icons. More...

Public Member Functions

 Alert (const String &cTitle, const String &cText, int nFlags,...)
 Initialize the Alert.
 Alert (const String &cTitle, const String &cText, Bitmap *pcBitmap, int nFlags,...)
 Initialize the Alert.
 Alert (const String &cTitle, const String &cText, alert_icon nAlertNum, int nFlags,...)
 Initialize the Alert.
 Alert (const String &cTitle, View *)
 Initialize the Alert.
 ~Alert ()
virtual void HandleMessage (Message *pcMessage)
 Handle a message targeted at this handler.
int Go ()
void Go (Invoker *pcInvoker)

Classes

class  Private

Detailed Description

See also:
Author:
Kurt Skauen ([email protected]), with modifications by Rick Caudill ( [email protected])


Member Enumeration Documentation

enum os::Alert::alert_icon

: Description:
These values are used to specify different icons in the Alert.
Enumerator:
ALERT_WARNING  Warning Icon: Use this when you want to flag an error Alert.
ALERT_INFO  Info Icon: Use this when you want to flag information to the user.
ALERT_QUESTION  Question Icon: Use this when you want to ask the user a question.
ALERT_TIP  Tip Icon: Use this when you want to give the user a tip for something.


Constructor & Destructor Documentation

Alert::Alert ( const String cTitle,
const String cText,
int  nFlags,
  ... 
)

Description:
The Alert is like a Messagebox in windows. It provides a way to show errors, About boxes or even tips without having to create your own Window.
Parameters:
cTitle - The title of the window.
cText - The text that will be shown in the Alert.
nFlags - The flags that will be passed to the appserver to tell the appserver what options when creating this Alert.
... - The name of buttons to create(IE: would be like "ok" or "cancel"). You can create more than one button(IE: new Alert("Title","Text",WND_NOT_RESIZABLE,"OK", "CANCEL",NULL);). Caveat: Make sure to add "NULL" to the end of the of the constructor.
See also:
Go()
Author:
Kurt Skauen ([email protected]) with modifications by Rick Caudill

Alert::Alert ( const String cTitle,
const String cText,
Bitmap pcBitmap,
int  nFlags,
  ... 
)

Description:
The Alert is like a Messagebox in windows. It provides a way to show errors, About boxes or even tips without having to create your own Window.
Parameters:
cTitle - The title of the window.
cText - The text that will be shown in the Alert.
nFlags - The flags that will be passed to the appserver to tell the appserver what options when creating this.
pcBitmap - Bitmap that will show up in the Alert Window.
... - The name of buttons to create(IE: would be like "ok" or "cancel"). You can create more than one button(IE: new Alert("Title","Text",WND_NOT_RESIZABLE,"OK", "CANCEL");). Caveat: Make sure to add "NULL" to the end of the of the constructor.
See also:
Go()
Author:
Kurt Skauen ([email protected]) with modifications by Rick Caudill

Alert::Alert ( const String cTitle,
const String cText,
alert_icon  nAlertNum,
int  nFlags,
  ... 
)

Description:
The Alert is like a Messagebox in windows. It provides a way to show errors, About boxes or even tips without having to create your own Window.
Parameters:
cTitle - The title of the window.
cText - The text that will be shown in the Alert.
nFlags - The flags that will be passed to the appserver to tell the appserver what options when creating this.
nAlertNum - Static icons that will show up when you call this constructor. To call the icons you would do something like this: (new Alert("Title","Text", Alert::ALERT_WARNING,0,"OK",NULL);)
... - The name of buttons to create(IE: would be like "ok" or "cancel"). You can create more than one button(IE: new Alert("Title","Text",WND_NOT_RESIZABLE,"OK", "CANCEL");). Caveat: Make sure to add "NULL" to the end of the of the constructor.
See also:
Go()
Author:
Kurt Skauen ([email protected]) with modifications by Rick Caudill

Alert::Alert ( const String cTitle,
os::View pcView 
)

Description:
The Alert is like a Messagebox in windows. It provides a way to show errors, About boxes or even tips without having to create your own Window. When you invoke this constructor, you will be able to add a view to the Alert. This way you can create your own specialized Alert.
Parameters:
cTitle - The title of the window.
pcView - The view that will be added to the Alert
Example: If the View that is added to the Alert has another control
on it, you must invoke Control::SetTarget(Messenger*)
  Window* pcWindow = new Window(Rect(100,100,500,500),"","Alert test")
  View* pcView = new View(Rect(),"");
  Button* pcButton  = new Button(Rect(),"","Ok", new Message(NULL));
  pcButton->SetTarget(pcWindow) //bad example, but it shows how to do it
  Alert * pcAlert("Test",pcView);
See also:
Go()
Author:
Rick Caudill([email protected])

Alert::~Alert (  ) 


Member Function Documentation

void Alert::HandleMessage ( Message pcMessage  )  [virtual]

Description:
Overload this member to dispatch messages sendt to this handler. When a looper receives a message for one of it's handlers it will call the taget handlers HandleMessage() to allow the handler to dispatch the message.
The message passed in pcMessage is also available through os::Looper::GetCurrentMessage() and os::Looper::DetachCurrentMessage() until this member returns. This is normally not very usefull for HandleMessage() itself but it can be convinient for other members called from HandleMessage() in case they need data from the message that was not passed on from HandleMessage().
The looper will be locked when this member is called. The default implementation of this member will pass the message on to the next handler if one was set with SetNextHandler().
Note:
Never do any lenthy operations in any hook members that are called from the looper thread if the looper is involved with the GUI (for example if the looper is a os::Window). The looper will not be able to dispatch messages until the hook returns so spending a long time in this members will make the GUI feel unresponsive.
Parameters:
pcMessage The message that should be handled. This message will be deleted by the looper when HandleMessage() returns unless you detach it with os::Looper::DetachCurrentMessage(),
See also:
os::Looper::DispatchMessage(), os::Looper::DetachCurrentMessage()
Author:
Kurt Skauen ([email protected])

Reimplemented from os::Handler.

int Alert::Go (  ) 

void Alert::Go ( Invoker pcInvoker  ) 


Generated on Sat May 9 22:51:40 2009 for Syllable higlevel API by  doxygen 1.5.1