class XGWindow

Declared in <XWindow.h>
Declared from XGOwner, XGFocus

The wrapper of the window for the native OS. This serves as only a wrapper for the window specific stuff


Construction/Destruction

XGWindow::CloseWindow
XGWindow::SetWindowView
XGWindow::XGWindow
XGWindow::~XGWindow

Window Attributes

XGWindow::FindViewByAccel
XGWindow::FindViewByID
XGWindow::FindViewByPoint
XGWindow::GetDocument
XGWindow::GetForm
XGWindow::GetFrontWindow
XGWindow::GetScreenSize
XGWindow::GetTitle
XGWindow::GetView
XGWindow::GetWindowAttributes
XGWindow::GetWindowID
XGWindow::GetWindowKind
XGWindow::GetWindowType
XGWindow::HideWindow
XGWindow::IsVisible
XGWindow::SelectWindow
XGWindow::SetTitle
XGWindow::ShowWindow

Document Support

XGWindow::DoSave
XGWindow::IsDirty

Window Size Support

XGWindow::LimitWindowSize
XGWindow::MaxWindowSize
XGWindow::MinWindowSize
XGWindow::ZoomWindowSize

Window Size

XGWindow::ContentToSize
XGWindow::GetContentRect
XGWindow::GetContentSize
XGWindow::GetWindowLocation
XGWindow::GetWindowPos
XGWindow::GetWindowSize
XGWindow::SetWindowLocation
XGWindow::SetWindowPos
XGWindow::SetWindowSize
XGWindow::SizeToContent

Window Events (internal)

XGWindow::Dispatch
XGWindow::DoActivate
XGWindow::DoDraw
XGWindow::DoMouseDown
XGWindow::DoMouseMove
XGWindow::DoMouseUp
XGWindow::DoSizeWindow
XGWindow::FirstTabStop
XGWindow::NextTabStop
XGWindow::PrevTabStop


Construction/Destruction

XGWindow::CloseWindow

Usage: bool XGWindow::CloseWindow()

Handle closing this window. This queries the contained document and processes the close after saving the file

XGWindow::SetWindowView

Usage: void XGWindow::SetWindowView(XGView*v)

Add this view to this window. This does all the approriate magical calls

XGWindow::XGWindow

Usage: XGWindow::XGWindow(XGArgStream&stream,XGDocument*doc,XGForm*form)

Three versions of me to create/destroy me

XGWindow::~XGWindow

Usage: XGWindow::~XGWindow()

Close me

Window Attributes

XGWindow::FindViewByAccel

Usage: XGView*FindViewByAccel(char x)

Finds the view by the specified accelerator key.

XGWindow::FindViewByID

Usage: XGView*FindViewByID(short x)

Finds the view in this window with the specified ID.

XGWindow::FindViewByPoint

Usage: XGView*FindViewByPoint(Point pt,bool recurse=true)

Finds the view in this window that the mouse is inside.

XGWindow::GetDocument

Usage: XGDocument*GetDocument()

Returns the XGDocument object associated with this window.

XGWindow::GetForm

Usage: XGForm*GetForm()

Gets the XGForm object associated with this window.

XGWindow::GetFrontWindow

Usage: XGWindow*XGWindow::GetFrontWindow()

Get the front window

XGWindow::GetScreenSize

Usage: void XGWindow::GetScreenSize(Rect*r)

Return the size of the main screen (minus the menu bar)

XGWindow::GetTitle

Usage: void XGWindow::GetTitle(char*name)

Get the name of this window

XGWindow::GetView

Usage: XGView*GetView()

Gets the root level view associated with this window.

XGWindow::GetWindowAttributes

Usage: unsigned short XGWindow::GetWindowAttributes()

Based on the type of window, this returns an attribute flag

XGWindow::GetWindowID

Usage: short GetWindowID()

Gets the window ID of this window.

XGWindow::GetWindowKind

Usage: short GetWindowKind()

Gets the kind of this window

XGWindow::GetWindowType

Usage: long GetWindowType()

Gets the window type of this window

XGWindow::HideWindow

Usage: void XGWindow::HideWindow()

Show this window.

XGWindow::IsVisible

Usage: bool XGWindow::IsVisible()

Is this window visible?

XGWindow::SelectWindow

Usage: void XGWindow::SelectWindow()

Bring this window frontmost

XGWindow::SetTitle

Usage: void XGWindow::SetTitle(const char*name)

Set the window name

XGWindow::ShowWindow

Usage: void XGWindow::ShowWindow()

Show this window.

Document Support

XGWindow::DoSave

Usage: bool XGWindow::DoSave()

Do save. This by default passes up to the document

XGWindow::IsDirty

Usage: bool XGWindow::IsDirty()

Is this dirty? This by default passes up to the document

Window Size Support

XGWindow::LimitWindowSize

Usage: void XGWindow::LimitWindowSize(Point*pt)

This is a support routine used for limiting the window's size

XGWindow::MaxWindowSize

Usage: Point XGWindow::MaxWindowSize()

Default: return what I read in

XGWindow::MinWindowSize

Usage: Point XGWindow::MinWindowSize()

Default: return what I read in

XGWindow::ZoomWindowSize

Usage: Point XGWindow::ZoomWindowSize()

Default: return what I read in

Window Size

XGWindow::ContentToSize

Usage: void XGWindow::ContentToSize(Point*size)

Convert from content to outer size of window. We don't care as much about the outer size of the window because that's used to approximate the location of a bunch of tiled windows on the screen. We do care about the interior, however.

XGWindow::GetContentRect

Usage: Rect XGWindow::GetContentRect()const

Get the content rectangle

XGWindow::GetContentSize

Usage: Point XGWindow::GetContentSize(void)const

Return the size of the content area

XGWindow::GetWindowLocation

Usage: Rect XGWindow::GetWindowLocation()const

Get the location of this thing. This is basically the screen location of the content region.

XGWindow::GetWindowPos

Usage: Point XGWindow::GetWindowPos()const

Get the window's current location

XGWindow::GetWindowSize

Usage: Point XGWindow::GetWindowSize()const

Get the window's current size

XGWindow::SetWindowLocation

Usage: void XGWindow::SetWindowLocation(Rect r)

Set the window's global location

XGWindow::SetWindowPos

Usage: void XGWindow::SetWindowPos(Point pos)

Set the window's location (by the window's outer border)

XGWindow::SetWindowSize

Usage: void XGWindow::SetWindowSize(Point size)

Resize this window

XGWindow::SizeToContent

Usage: void XGWindow::SizeToContent(Point*size)

Inverse of the above conversions.

Window Events (internal)

XGWindow::Dispatch

Usage: long XGWindow::Dispatch(long msg,long arg,void*parg)

Send message to the form if present

XGWindow::DoActivate

Usage: void XGWindow::DoActivate(bool active)

Handle activate event

XGWindow::DoDraw

Usage: void XGWindow::DoDraw(Rect r)

Handle drawing inside of this window. This draws the grow icon, the view, and redoes the grow icon again.

XGWindow::DoMouseDown

Usage: XGView*XGWindow::DoMouseDown(Point pt,short flags)

Handle the mouse down

XGWindow::DoMouseMove

Usage: void XGWindow::DoMouseMove(Point pt,short flags,XGView*v)

Handle mouse move

XGWindow::DoMouseUp

Usage: void XGWindow::DoMouseUp(Point pt,short flags,XGView*v)

Handle mouse up

XGWindow::DoSizeWindow

Usage: void XGWindow::DoSizeWindow()

Resize the view to fit within this window. This can also be called when the window is first opened

XGWindow::FirstTabStop

Usage: void XGWindow::FirstTabStop(void)

Find the first non-zero ID'ed view with the tab stop, visible, and enabled views

XGWindow::NextTabStop

Usage: void XGWindow::NextTabStop(void)

Find the next non-zero ID'ed view with the tab stop, visible, and enabled views

XGWindow::PrevTabStop

Usage: void XGWindow::PrevTabStop(void)

Find the previous non-zero ID'ed view with the tab stop, visible, and enabled views