#include <GHtml.h>
Public Member Functions | |
const char * | GetClass () |
GTag * | GetTagByPos (int x, int y, int *Index) |
Get the tag at an x,y location. | |
GdcPt2 | Layout () |
Layout content and return size. | |
bool | Copy () |
Copy the selection to the clipboard. | |
bool | HasSelection () |
Returns true if there is a selection. | |
void | UnSelectAll () |
Unselect all the text in the control. | |
void | SelectAll () |
Select all the text in the control (not impl). | |
char * | GetSelection () |
Return the selection in a dynamically allocated string. | |
bool | Name (const char *s) |
Sets the HTML content of the control. | |
char * | Name () |
Returns the HTML content. | |
bool | NameW (const char16 *s) |
Sets the HTML content of the control. | |
char16 * | NameW () |
Returns the HTML content. | |
void | OnPaint (GSurface *pDC) |
Called to paint the onscreen representation of the view. | |
void | OnMouseClick (GMouse &m) |
The mouse was clicked over this view. | |
void | OnMouseMove (GMouse &m) |
The mouse moves over the control. | |
void | OnMouseWheel (double Lines) |
The mouse wheel was scrolled. | |
bool | OnKey (GKey &k) |
A key was pressed while this view has focus. | |
int | OnNotify (GViewI *c, int f) |
Called when a child view or view with it's SetNotify() set to this window changes. | |
void | OnPosChange () |
Called when the view position changes. | |
void | OnPulse () |
Called every so often by the timer system. | |
int | OnEvent (GMessage *Msg) |
Handles the incoming events. |
You can set the content of the control through the GHtml::Name method.
Retreive any selected content through GHtml::GetSelection.
const char* GHtml::GetClass | ( | ) | [inline] |
The class' name. Should be overriden in child classes to return the right class name. Mostly used for debugging, but in the win32 port it is also the default WIN32 class name passed to RegisterClass() in GView::CreateClass().
Reimplemented from GDocView.
int GHtml::OnNotify | ( | GViewI * | Ctrl, | |
int | Flags | |||
) |
Called when a child view or view with it's SetNotify() set to this window changes.
The event by default will bubble up to the GWindow at the top of the window heirarchy visiting each GView on the way. If it reaches a GView that processes it then the event stops propergating up the heirarchy.
Reimplemented from GLayout.
References IDC_VSCROLL, GView::Invalidate(), and GLayout::OnNotify().
void GHtml::OnPulse | ( | ) |
Called every so often by the timer system.
Reimplemented from GView.
References GLayout::GetClient(), GFont::GetHeight(), GView::GetMouse(), GView::Invalidate(), GView::IsCapturing(), GScrollBar::Value(), GLayout::VScroll, GMouse::y, GRect::y1, and GRect::y2.