#include <LgiClasses.h>
Public Member Functions | |
GView (OsView wnd=0) | |
Creates a view/window. | |
virtual | ~GView () |
Destructor. | |
OsView | Handle () |
Returns the OS handle of the view. | |
GView * | GetGView () |
Returns the ptr to a GView. | |
virtual OsWindow | WindowHandle () |
Returns the OS handle of the top level window. | |
virtual bool | Attach (GViewI *p) |
Attaches the view to a parent view. | |
virtual bool | AttachChildren () |
Attachs all the views in the Children list if not already attached. | |
virtual bool | Detach () |
Detachs a window from it's parent. | |
virtual bool | IsAttached () |
Returns true if the window is attached. | |
virtual void | Quit (bool DontDelete=false) |
Destroys the window async. | |
GWindow * | GetWindow () |
Gets the top level window that this view belongs to. | |
GViewI * | GetParent () |
Gets the parent view. | |
virtual void | SetParent (GViewI *p) |
Sets the parent view. | |
void | SendNotify (int Data=0) |
Sends a notification to the notify target or the parent chain. | |
GViewI * | GetNotify () |
Gets the window that receives event notifications. | |
virtual void | SetNotify (GViewI *n) |
Sets the view to receive event notifications. | |
bool | Lock (const char *file, int line, int TimeOut=-1) |
Each top level window (GWindow) has a lock. By calling this function you lock the whole GWindow and all it's children. | |
void | Unlock () |
Unlocks the GWindow and that this view belongs to. | |
int | OnEvent (GMessage *Msg) |
Called to process every message received by this window. | |
bool | Enabled () |
true if the view is enabled | |
void | Enabled (bool e) |
Sets the enabled state. | |
bool | Visible () |
true if the view is visible | |
void | Visible (bool v) |
Hides/Shows the view. | |
bool | Focus () |
true if the view has keyboard focus | |
void | Focus (bool f) |
Sets the keyboard focus state on the view. | |
bool | DropTarget () |
true if this view is a drop target | |
bool | DropTarget (bool t) |
Sets the drop target state of this view. | |
bool | Sunken () |
Gives this view a 1 or 2 px sunken border. | |
void | Sunken (bool i) |
Sets a sunken border around the control. | |
bool | Flat () |
true if the view has a flat border | |
void | Flat (bool i) |
Sets the flat border state. | |
bool | Raised () |
true if the view has a raised border | |
void | Raised (bool i) |
Sets the raised border state. | |
GViewFill * | GetForegroundFill () |
Gets the foreground fill setting. | |
bool | SetForegroundFill (GViewFill *Fill) |
GViewFill * | GetBackgroundFill () |
Gets the background fill setting. | |
bool | SetBackgroundFill (GViewFill *Fill) |
bool | InThread () |
true if the control is currently executing in the GUI thread | |
bool | PostEvent (int Cmd, int a=0, int b=0) |
Asyncronously posts an event to be received by this window. | |
bool | Name (const char *n) |
Sets the utf-8 text associated with this view. | |
char * | Name () |
Returns the utf-8 text associated with this view. | |
virtual bool | NameW (const char16 *n) |
Sets the wide char text associated with this view. | |
virtual char16 * | NameW () |
Returns the wide char text associated with this view. | |
virtual GFont * | GetFont () |
Gets the font this control should draw with. | |
virtual void | SetFont (GFont *Fnt, bool OwnIt=false) |
Sets the font for this control. | |
bool | SetCursor (int Cursor) |
Sets the mouse cursor to display when the mouse is over this control. | |
virtual GRect & | GetPos () |
Get the position of the view relitive to it's parent. | |
virtual GRect & | GetClient (bool InClientSpace=true) |
Get the client region of the window relitive to itself (ie always 0,0-x,y). | |
virtual bool | SetPos (GRect &p, bool Repaint=false) |
Set the position of the view in terms of it's parent. | |
int | X () |
Gets the width of the view in pixels. | |
int | Y () |
Gets the height of the view in pixels. | |
GdcPt2 | GetMinimumSize () |
Gets the minimum size of the view. | |
void | SetMinimumSize (GdcPt2 Size) |
Set the minimum size of the view. | |
void | MoveOnScreen () |
Moves a top level window on screen. | |
void | MoveToCenter () |
Moves a top level to the center of the screen. | |
void | MoveToMouse () |
Moves a top level window to where the mouse is. | |
const char * | GetClass () |
bool | Capture (bool c) |
Captures all mouse events to this view. | |
bool | IsCapturing () |
true if this view is capturing mouse events. | |
bool | GetMouse (GMouse &m, bool ScreenCoords=false) |
Gets the current mouse location. | |
int | GetId () |
Gets the ID associated with the view. | |
void | SetId (int i) |
Sets the view's ID. | |
bool | GetTabStop () |
true if this control is a tab stop. | |
void | SetTabStop (bool b) |
Sets whether this control is a tab stop. | |
virtual int64 | Value () |
Gets the integer representation of the view's contents. | |
virtual void | Value (int64 i) |
Sets the integer representation of the view's contents. | |
virtual GViewI * | FindControl (OsView hnd) |
Find a view by it's os handle. | |
virtual GViewI * | FindControl (int Id) |
Returns the view by it's ID. | |
int64 | GetCtrlValue (int Id) |
Gets the value of the control identified by the ID. | |
void | SetCtrlValue (int Id, int64 i) |
Sets the value of the control identified by the ID. | |
char * | GetCtrlName (int Id) |
Gets the name (text) of the control identified by the ID. | |
void | SetCtrlName (int Id, const char *s) |
Sets the name (text) of the control identified by the ID. | |
bool | GetCtrlEnabled (int Id) |
Gets the enabled state of the control identified by the ID. | |
void | SetCtrlEnabled (int Id, bool Enabled) |
Sets the enabled state of the control identified by the ID. | |
bool | GetCtrlVisible (int Id) |
Gets the visible state of the control identified by the ID. | |
void | SetCtrlVisible (int Id, bool Visible) |
Sets the visible state of the control identified by the ID. | |
bool | Invalidate (GRect *r=NULL, bool Repaint=false, bool NonClient=false) |
Causes the given area of the view to be repainted to update the screen. | |
bool | Invalidate (GRegion *r, bool Repaint=false, bool NonClient=false) |
Causes the given area of the view to be repainted to update the screen. | |
bool | IsOver (GMouse &m) |
true if the mouse event is over the view | |
GViewI * | WindowFromPoint (int x, int y, bool Debug=false) |
returns the sub window located at the point x,y | |
void | SetPulse (int Ms=-1) |
Sets a timer to call the OnPulse() event. | |
void | PointToScreen (GdcPt2 &p) |
Convert a point form view coordinates to screen coordinates. | |
void | PointToView (GdcPt2 &p) |
Convert a point form screen coordinates to view coordinates. | |
bool | WindowVirtualOffset (GdcPt2 *Offset) |
Get the x,y offset from the virtual window to the first real view in the parent chain. | |
GdcPt2 & | GetWindowBorderSize () |
Get the size of the window borders. | |
virtual bool | Pour (GRegion &r) |
Layout all the child views. | |
void | OnMouseClick (GMouse &m) |
The mouse was clicked over this view. | |
void | OnMouseEnter (GMouse &m) |
Mouse moves into the area over the control. | |
void | OnMouseExit (GMouse &m) |
Mouse leaves the area over the control. | |
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. | |
void | OnCreate () |
The view is attached. | |
void | OnDestroy () |
The view is detached. | |
void | OnFocus (bool f) |
The view gains or loses the keyboard focus. | |
void | OnPulse () |
Called every so often by the timer system. | |
void | OnPosChange () |
Called when the view position changes. | |
bool | OnRequestClose (bool OsShuttingDown) |
Called on a top level window when something requests to close the window. | |
int | OnHitTest (int x, int y) |
void | OnChildrenChanged (GViewI *Wnd, bool Attaching) |
Called when the contents of the Children list have changed. | |
void | OnPaint (GSurface *pDC) |
Called to paint the onscreen representation of the view. | |
int | OnNotify (GViewI *Ctrl, int Flags) |
Called when a child view or view with it's SetNotify() set to this window changes. | |
int | OnCommand (int Cmd, int Event, OsView Wnd) |
Called when a menu command is activated by the user. | |
void | OnAttach () |
Called after the view is attached to a new parent. | |
bool | OnLayout (GViewLayoutInfo &Inf) |
Called to get layout information for the control. | |
Public Attributes | |
GEventsI * | Script |
Script handler to receive UI events. | |
Protected Member Functions | |
GRect * | FindLargest (GRegion &r) |
Finds the largest rectangle in the region. | |
GRect * | FindSmallestFit (GRegion &r, int Sx, int Sy) |
Finds the smallest rectangle that would fit a window 'Sx' by 'Sy'. | |
GRect * | FindLargestEdge (GRegion &r, int Edge) |
Finds the largest rectangle on the specified. | |
Friends | |
class | GWindow |
class | GLayout |
class | GControl |
class | GMenu |
class | GSubMenu |
class | GScrollBar |
class | GDialog |
class | GDragDropTarget |
class | GPopup |
class | GViewIter |
List of children views. |
This is the core object that all on screen windows inherit from. It encapsulates a HWND on Win32, a BView on BeOS, a Window on X11 + Mac OS X. Used by itself it's not a top level window, for that see the GWindow class.
To create a top level window see GWindow or GDialog.
For a GView with scroll bars use GLayout.
GView::GView | ( | OsView | wnd = 0 |
) |
Creates a view/window.
On non-Win32 platforms the default argument is the class that redirects the C++ virtual event handlers to the GView handlers. Which is usually the 'DefaultOsView' class. If you pass NULL in a DefaultOsView will be created to do the job. On BeOS you can subclass the native controls by passing in an instance of the BView based class.
wnd | The handle that the OS knows the window by |
References Script, and GRect::ZOff().
Finds the largest rectangle on the specified.
r | The region to search |
Edge |
The edge to look at:
|
References GRegion::First(), GV_EDGE_BOTTOM, GV_EDGE_LEFT, GV_EDGE_RIGHT, GV_EDGE_TOP, GRegion::Next(), GRect::X(), GRect::x1, GRect::x2, GRect::Y(), GRect::y1, and GRect::y2.
Referenced by GToolBar::Pour().
bool GView::Attach | ( | GViewI * | p | ) | [virtual] |
Attaches the view to a parent view.
Each GView starts in an un-attached state. When you attach it to a Parent GView the view gains a OS-specific handle and becomes visible on the screen (if the Visible() property is TRUE). However if a view is inserted into the Children list of a GView and it's parent pointer is set correctly it will still paint on the screen without the OS knowing about it. This is known in Lgi as a "virtual window" and is primarily used to cut down on windowing resources. Mouse clicks are handled by the parent window and passed down to the virtual children. Virtual children are somewhat limited. They can't receive focus, or participate in drag and drop operations. If you want to see an example have a look at the GToolBar code.
p | The parent view or NULL for a top level window |
Reimplemented in GPopup, GScrollBar, GTabView, GLayout, GWindow, GToolTip, and GSplitter.
References _BorderSize, DropTarget(), Focus(), OnCreate(), Raised(), SetParent(), Sunken(), Visible(), GRect::X(), GRect::x1, GRect::Y(), and GRect::y1.
Referenced by GTabView::Append(), GTabView::Attach(), GScrollBar::Attach(), GPopup::Attach(), GLayout::Attach(), GSplitter::SetViewA(), GSplitter::SetViewB(), and GPopup::Visible().
void GView::SetParent | ( | GViewI * | p | ) | [virtual] |
Sets the parent view.
This doesn't attach the window so that it will display. You should use GView::Attach for that.
Referenced by GTabView::Append(), GToolBar::AppendBreak(), GToolBar::AppendButton(), GToolBar::AppendControl(), GToolBar::AppendSeparator(), Attach(), GToolTip::Attach(), GPopup::Attach(), GAbout::GAbout(), GAlert::GAlert(), GFindDlg::GFindDlg(), GFontSelect::GFontSelect(), GInput::GInput(), GProgressDlg::GProgressDlg(), and GReplaceDlg::GReplaceDlg().
void GView::SetNotify | ( | GViewI * | n | ) | [virtual] |
Sets the view to receive event notifications.
The notify window will receive events when this view changes. By default the parent view receives the events.
Referenced by GAbout::GAbout().
bool GView::Lock | ( | const char * | file, | |
int | line, | |||
int | TimeOut = -1 | |||
) |
Each top level window (GWindow) has a lock. By calling this function you lock the whole GWindow and all it's children.
file | The file name of the caller |
line | The line number of the caller |
TimeOut | The timeout in milli-seconds or -1 to block until locked. |
References _Lock, GetWindow(), GSemaphore::Lock(), and GSemaphore::LockWithTimeout().
Referenced by GList::AddColumn(), GList::Delete(), GList::DeleteColumn(), GList::Empty(), GList::GetSelected(), GList::Insert(), Html2::GHtml2::OnContent(), Html2::GHtml2::OnEvent(), GList::OnMouseClick(), GList::OnMouseMove(), GList::OnPaint(), GList::OnPulse(), GList::Remove(), GList::RemoveAll(), GList::ResizeColumnsToContent(), GList::SelectAll(), GList::Sort(), GListItem::Update(), and GList::UpdateAllItems().
void GView::Visible | ( | bool | v | ) |
Hides/Shows the view.
v | True if you want to show the view, False to hide the view/ |
Reimplemented in GItemEdit, GPopup, and GWindow.
References GetClass(), and Invalidate().
bool GView::Sunken | ( | ) |
Gives this view a 1 or 2 px sunken border.
The size is set by the _BorderSize member variable. This border is not considered part of the client area. Mouse and drawing coordinates do not take it into account.
Referenced by Attach(), GAbout::GAbout(), GEdit::GEdit(), GetClient(), GList::GList(), GLayout::OnPosChange(), GToolBar::Pour(), and SetPos().
bool GView::Raised | ( | ) |
true if the view has a raised border
The size is set by the _BorderSize member variable. This border is not considered part of the client area. Mouse and drawing coordinates do not take it into account.
Referenced by Attach(), GetClient(), GLayout::OnPosChange(), GToolBar::Pour(), and SetPos().
bool GView::SetForegroundFill | ( | GViewFill * | Fill | ) |
Sets the foreground fill setting. After this is called, the object passed to SetForegroundFill is owned by the view and you should NOT free it.
References Invalidate().
bool GView::SetBackgroundFill | ( | GViewFill * | Fill | ) |
Sets the background fill setting. After this is called, the object passed to SetBackgroundFill is owned by the view and you should NOT free it.
References Invalidate().
bool GView::InThread | ( | ) |
true if the control is currently executing in the GUI thread
Some OS functions are not thread safe, and can only be called in the GUI thread. In the Linux implementation the GUI thread can change from time to time. On Win32 it stays the same. In any case if this function returns true it's safe to do just about anything.
References LgiApp.
Referenced by Invalidate().
bool GView::PostEvent | ( | int | Cmd, | |
int | a = 0 , |
|||
int | b = 0 | |||
) |
Asyncronously posts an event to be received by this window.
This calls PostMessage on Win32 and XSendEvent on X11. XSendEvent is called with a ClientMessage with the a and b parameters in the data section.
Cmd |
The command ID.
|
a | The first 32-bits of data. Equivilent to wParam on Win32. |
b | The second 32-bits of data. Equivilent to lParam on Win32. |
References OnEvent().
Referenced by Invalidate(), Html2::GHtml2::OnContent(), and GItemEdit::Visible().
bool GView::Name | ( | const char * | n | ) |
Sets the utf-8 text associated with this view.
Name and NameW are interchangable. Using them in any order will convert the text between utf-8 and wide to satify any requirement. Generally once the opposing version of the string is required both the utf-8 and wide copies of the string remain cached in RAM until the Name is changed.
Reimplemented in GButton, GCheckBox, GCombo, GHtml, Html2::GHtml2, GRadioGroup, GRadioButton, GText, GTextView3, GTextView4, GToolButton, and GWindow.
References Invalidate().
Referenced by GAbout::GAbout().
char16 * GView::NameW | ( | ) | [virtual] |
Returns the wide char text associated with this view.
On Win32 the wide characters are 16 bits, on unix systems they are 32-bit characters.
Reimplemented in GButton, GCheckBox, GHtml, Html2::GHtml2, GRadioGroup, GRadioButton, GText, GTextView3, and GTextView4.
References Name().
Referenced by Name(), GText::NameW(), GRadioButton::NameW(), GRadioGroup::NameW(), GCheckBox::NameW(), and GButton::NameW().
GFont * GView::GetFont | ( | ) | [virtual] |
Gets the font this control should draw with.
The default font is the system font, owned by the GApp object.
Reimplemented in GProgressPane, GTextView3, GTextView4, and GToolBar.
References SysFont.
Referenced by Html2::GHtml2::Layout(), GHtml::Layout(), GText::Name(), GRadioButton::Name(), GRadioGroup::Name(), GCheckBox::Name(), GButton::Name(), GText::NameW(), GRadioButton::NameW(), GRadioGroup::NameW(), GCheckBox::NameW(), GButton::NameW(), Html2::GHtml2::OnKey(), GHtml::OnKey(), GText::OnPaint(), Html2::GHtml2::OnPaint(), GHtml::OnPaint(), GCombo::OnPaint(), GCheckBox::OnPaint(), GButton::OnPaint(), GText::OnPosChange(), GText::SetFont(), GRadioButton::SetFont(), GRadioGroup::SetFont(), GCombo::SetFont(), GCheckBox::SetFont(), GButton::SetFont(), and GText::SetWrap().
void GView::SetFont | ( | GFont * | Fnt, | |
bool | OwnIt = false | |||
) | [virtual] |
Sets the font for this control.
The lifetime of the font passed in is the responsibility of the caller. The GView object assumes the pointer will be valid at all times.
Reimplemented in GButton, GCheckBox, GCombo, GRadioGroup, GRadioButton, GText, GTextView3, and GTextView4.
References GetParent(), GFont::Handle(), Invalidate(), GTableLayout::InvalidateLayout(), and SysFont.
Referenced by GAbout::GAbout(), GText::SetFont(), GRadioButton::SetFont(), GRadioGroup::SetFont(), GCombo::SetFont(), GCheckBox::SetFont(), and GButton::SetFont().
bool GView::SetCursor | ( | int | Cursor | ) |
Sets the mouse cursor to display when the mouse is over this control.
This currently only works on Win32, as I can't get the X11 cursor functions to work. They seem horribly broken. (Surprise surprise)
Cursor |
The cursor to change to.
|
References d, GetWindow(), and Handle().
Referenced by GList::OnHitTest(), GSplitter::OnMouseMove(), GList::OnMouseMove(), Html2::GHtml2::OnMouseMove(), and GHtml::OnMouseMove().
void GView::SetMinimumSize | ( | GdcPt2 | Size | ) |
const char* GView::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 in GButton, GCheckBox, GCombo, GDocView, GEdit, GHtml, Html2::GHtml2, GList, GPopup, GProgress, GRadioGroup, GRadioButton, GScrollBar, GSlider, GTableLayout, GTabView, GText, GTextView3, GTextView4, GToolButton, GToolBar, GTree, GLayout, GWindow, and GSplitter.
bool GView::Capture | ( | bool | c | ) |
Captures all mouse events to this view.
Once you have mouse capture all mouse events will be passed to this view. i.e. during a mouse click.
Referenced by GDragDropSource::Drag(), GList::DragColumn(), GListItem::EditLabel(), GSubMenu::Float(), GList::OnFocus(), GTree::OnMouseClick(), GToolButton::OnMouseClick(), GTextView3::OnMouseClick(), GSplitter::OnMouseClick(), GScrollBar::OnMouseClick(), GRadioButton::OnMouseClick(), GList::OnMouseClick(), Html2::GHtml2::OnMouseClick(), GHtml::OnMouseClick(), GCheckBox::OnMouseClick(), GButton::OnMouseClick(), GTree::OnMouseMove(), and GList::OnMouseMove().
bool GView::GetMouse | ( | GMouse & | m, | |
bool | ScreenCoords = false | |||
) |
Gets the current mouse location.
m | The mouse location information returned |
ScreenCoords | Get the location in screen coordinates |
References GetParent(), GMouse::x, GRect::x1, GMouse::y, and GRect::y1.
Referenced by GDragDropSource::Drag(), MoveToMouse(), GTextView3::OnMouseClick(), Html2::GHtml2::OnMouseClick(), GHtml::OnMouseClick(), GTree::OnPulse(), GScrollBar::OnPulse(), GList::OnPulse(), Html2::GHtml2::OnPulse(), and GHtml::OnPulse().
int GView::GetId | ( | ) |
Gets the ID associated with the view.
The ID of a view is designed to associate controls defined in resource files with a object at runtime via a C header file define.
Referenced by FindControl(), GTabView::FindControl(), Focus(), GToolBar::OnButtonClick(), GButton::OnKey(), GToolButton::OnMouseClick(), GToolButton::OnPaint(), and GToolButton::Value().
void GView::SetTabStop | ( | bool | b | ) |
Sets whether this control is a tab stop.
A top stop is a control that receives focus if the user scrolls through the controls with the tab key.
Referenced by GButton::GButton(), GCheckBox::GCheckBox(), GCombo::GCombo(), GList::GList(), and GTabView::GTabView().
bool GView::Invalidate | ( | GRect * | r = NULL , |
|
bool | Repaint = false , |
|||
bool | NonClient = false | |||
) |
Causes the given area of the view to be repainted to update the screen.
r | The rectangle of the view to repaint, or NULL for the entire view |
Repaint | true if you want to wait for the update to happen |
NonClient | false to update in client coordinates, true to update the non client region |
References GetClient(), GetPos(), InThread(), IsAttached(), M_X11_INVALIDATE, GRect::Offset(), PostEvent(), GRect::Set(), GRect::X(), GRect::x1, GRect::Y(), and GRect::y1.
Referenced by GTabView::Append(), GButton::Default(), GSplitter::DetachViewA(), GSplitter::DetachViewB(), GList::Empty(), GList::EmptyColumns(), Enabled(), Focus(), GToolButton::Image(), GList::Insert(), GCombo::Insert(), Invalidate(), GTableLayout::InvalidateLayout(), Name(), GTextView3::Name(), GText::Name(), Html2::GHtml2::Name(), GHtml::Name(), GCombo::Name(), NameW(), GTextView3::NameW(), GText::NameW(), GTextView3::OnDrop(), OnEvent(), Html2::GHtml2::OnEvent(), GHtml::OnEvent(), GTextView3::OnFocus(), GTabView::OnFocus(), GRadioButton::OnFocus(), GDropDown::OnFocus(), GList::OnFocus(), GCombo::OnFocus(), GCheckBox::OnFocus(), GButton::OnFocus(), GTextView3::OnKey(), Html2::GHtml2::OnKey(), GHtml::OnKey(), GButton::OnKey(), GToolButton::OnMouseClick(), GTextView3::OnMouseClick(), GTabView::OnMouseClick(), GScrollBar::OnMouseClick(), GRadioButton::OnMouseClick(), GList::OnMouseClick(), Html2::GHtml2::OnMouseClick(), GHtml::OnMouseClick(), GCheckBox::OnMouseClick(), GButton::OnMouseClick(), GToolButton::OnMouseEnter(), GRadioButton::OnMouseEnter(), GCheckBox::OnMouseEnter(), GButton::OnMouseEnter(), GToolButton::OnMouseExit(), GRadioButton::OnMouseExit(), GCheckBox::OnMouseExit(), GButton::OnMouseExit(), GTextView3::OnMouseMove(), GSplitter::OnMouseMove(), GScrollBar::OnMouseMove(), GList::OnMouseMove(), Html2::GHtml2::OnMouseMove(), GHtml::OnMouseMove(), GTextView3::OnMouseWheel(), GList::OnMouseWheel(), Html2::GHtml2::OnMouseWheel(), GHtml::OnMouseWheel(), GTree::OnNotify(), GTextView3::OnNotify(), GDropDown::OnNotify(), GList::OnNotify(), Html2::GHtml2::OnNotify(), GHtml::OnNotify(), GTextView3::OnPaint(), Html2::GHtml2::OnPosChange(), GHtml::OnPosChange(), GTextView3::OnPulse(), Html2::GHtml2::OnPulse(), GHtml::OnPulse(), GTextView3::Open(), GProgressDlg::Pop(), GWindow::Pour(), GList::Remove(), GTree::RemoveAll(), GList::RemoveAll(), GList::ResizeColumnsToContent(), GListItem::ScrollTo(), GList::ScrollToSelection(), GTextView3::SelectAll(), GList::SelectAll(), GTextView3::SelectWord(), SetBackgroundFill(), GTextView3::SetCursor(), GBitmap::SetDC(), SetFont(), GText::SetFont(), GRadioButton::SetFont(), GRadioGroup::SetFont(), GCombo::SetFont(), GCheckBox::SetFont(), GButton::SetFont(), SetForegroundFill(), GScrollBar::SetLimits(), GList::SetMode(), GScrollBar::SetPage(), GLayout::SetScrollBars(), GScrollBar::SetVertical(), GSplitter::SetViewA(), GSplitter::SetViewB(), GText::SetWrap(), GTextView3::SetWrapType(), GList::Sort(), GTextView3::UnSelectAll(), Html2::GHtml2::UnSelectAll(), GHtml::UnSelectAll(), GListItem::Update(), GList::UpdateAllItems(), GSlider::Value(), GToolButton::Value(), GTabView::Value(), GSplitter::Value(), GRadioButton::Value(), GProgress::Value(), GCombo::Value(), GColourSelect::Value(), GCheckBox::Value(), GButton::Value(), and Visible().
bool GView::Invalidate | ( | GRegion * | r, | |
bool | Repaint = false , |
|||
bool | NonClient = false | |||
) |
Causes the given area of the view to be repainted to update the screen.
r | The region of the view to repaint |
Repaint | true if you want to wait for the update to happen |
NonClient | false to update in client coordinates, true to update the non client region |
References Invalidate(), and GRegion::Length().
void GView::SetPulse | ( | int | Ms = -1 |
) |
Sets a timer to call the OnPulse() event.
Ms | The milliseconds between calls to OnPulse() or -1 to disable |
Referenced by GTextView3::OnFocus(), GScrollBar::OnMouseClick(), GList::OnMouseClick(), Html2::GHtml2::OnMouseClick(), GHtml::OnMouseClick(), GTree::OnPulse(), and GList::OnPulse().
virtual bool GView::Pour | ( | GRegion & | r | ) | [inline, virtual] |
Layout all the child views.
r | The available space to lay out the views into |
Reimplemented in GProgressPane, GToolBar, GLayout, and GSplitter.
void GView::OnMouseClick | ( | GMouse & | m | ) |
The mouse was clicked over this view.
m | The event parameters |
Reimplemented in GBitmap, GButton, GCheckBox, GCombo, GTimePopup, GDatePopup, GHtml, Html2::GHtml2, GList, GDropDown, GRadioButton, GScrollBar, GTabView, GTextView3, GTextView4, GToolButton, GToolBar, GTree, and GSplitter.
References Script.
void GView::OnMouseEnter | ( | GMouse & | m | ) |
Mouse moves into the area over the control.
m | The event parameters |
Reimplemented in GButton, GCheckBox, GRadioButton, GToolButton, and GToolBar.
References Script.
void GView::OnMouseExit | ( | GMouse & | m | ) |
Mouse leaves the area over the control.
m | The event parameters |
Reimplemented in GButton, GCheckBox, GRadioButton, GToolButton, GToolBar, and GSplitter.
References Script.
void GView::OnMouseMove | ( | GMouse & | m | ) |
The mouse moves over the control.
m | The event parameters |
Reimplemented in GHtml, Html2::GHtml2, GList, GScrollBar, GTextView3, GTextView4, GToolButton, GToolBar, GTree, and GSplitter.
References Script.
void GView::OnMouseWheel | ( | double | Lines | ) |
The mouse wheel was scrolled.
Lines | The amount scrolled |
Reimplemented in GHtml, Html2::GHtml2, GList, GScrollBar, GTextView3, GTextView4, and GTree.
References Script.
void GView::OnFocus | ( | bool | f | ) |
The view gains or loses the keyboard focus.
f | True if the control is receiving focus |
Reimplemented in GButton, GCheckBox, GCombo, GList, GDropDown, GRadioButton, GTableLayout, GTabView, GTextView3, GTextView4, and GTree.
References Script.
Referenced by GList::OnFocus().
void GView::OnPulse | ( | ) |
Called every so often by the timer system.
Reimplemented in GHtml, Html2::GHtml2, GList, GScrollBar, GTextView3, GTextView4, and GTree.
References Script.
Referenced by OnEvent().
bool GView::OnRequestClose | ( | bool | OsShuttingDown | ) |
Called on a top level window when something requests to close the window.
OsShuttingDown | True if the operating system is shutting down. |
Reimplemented in GDocApp< OptionsFmt >, GWindow, and GDialog.
References Script.
Referenced by GWindow::OnRequestClose().
int GView::OnHitTest | ( | int | x, | |
int | y | |||
) |
Return the type of cursor that should be visible when the mouse is at x,y e.g. LCUR_Normal
x | The x coordinate in view coordinates |
y | The y coordinate in view coordinates |
Reimplemented in Html2::GHtml2, GList, GTextView3, GTextView4, and GSplitter.
References Script.
Referenced by GTextView3::OnHitTest().
int GView::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 in GTimeDrop, GAbout, GFindDlg, GReplaceDlg, GFontSelect, GHtml, Html2::GHtml2, GInput, GItemEdit, GList, GDropDown, GProgressPane, GRadioGroup, GTabView, GTextView3, GTextView4, GTree, GLayout, and GAlert.
References Script.
Referenced by OnEvent(), GBitmap::OnMouseClick(), and GLayout::OnNotify().