Inheritance diagram for os::FontRequester:
Public Member Functions | |
FontRequester (Messenger *pcTarget=NULL, bool bEnableAdvanced=false) | |
Constructor. | |
virtual | ~FontRequester () |
void | HandleMessage (Message *pcMessage) |
Handle a message targeted at this handler. | |
virtual bool | OkToQuit (void) |
Check if it is ok to break the loop. |
FontRequester* pcFontRequester = new FontRequester(NULL,true); //enable shear/rotation pcFontRequester->Show(); ... MyApplication::HandleMessage(Message* pcMessage) { switch (pcMessage->GetCode()) { case M_FONT_REQUESTED: { os::Font* pcFont = new Font(); pcMessage->FindObject("font",*pcFont); //get the font from the requester and then do anything you want with it pcMyView->SetFont( pcFont ); pcFont->Release(); break; } case M_FONT_REQUESTER_CANCELED: { break; //do whatever you need to do when cancelled is called. } } }
os::FontRequester::FontRequester | ( | Messenger * | pcTarget = NULL , |
|
bool | bEnableAdvanced = false | |||
) |
pcTarget | - The target where all messages will be sent. | |
bEnableAdvanced | - Determines whether or not Shear/Rotation will be enabled. |
virtual os::FontRequester::~FontRequester | ( | ) | [virtual] |
void os::FontRequester::HandleMessage | ( | Message * | pcMessage | ) | [virtual] |
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(). 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(), |
Reimplemented from os::Handler.
virtual bool os::FontRequester::OkToQuit | ( | void | ) | [virtual] |
Reimplemented from os::Looper.