The Möbius Operating System: OS::WindowImpl class Reference
HOME DOWNLOAD DOCUMENTATION SCREENSHOTS  

OS::WindowImpl Class Reference

Base class for custom window classes. More...

#include <Window.h>

Inheritance diagram for OS::WindowImpl:

OS::Window OS::MessageHandler OS::Control OS::DialogContainer OS::FrameWindow OS::Menu OS::Button OS::Edit OS::Label OS::DialogBox List of all members.

Public Member Functions

bool Create (WindowImpl *parent, const wchar_t *title, const rect_t &position=Rect(0, 0, 0, 0))
 Creates the window.

void AddChild (WindowImpl *child)
void RemoveChild (WindowImpl *child)
WindowImplGetParentFrame ()
void SetPosition (const rect_t &pos)

Protected Member Functions

wnd_h DoCreateWindow (WindowImpl *parent, const wchar_t *title, const rect_t &position)
void DoHandleMessage (const wnd_message_t *msg)
virtual void OnQuit ()
 Handler for MSG_QUIT messages.

virtual void OnPaint ()
 Handler for MSG_PAINT messages.

virtual void OnKeyDown (uint32_t key)
 Handler for MSG_KEYDOWN messages.

virtual void OnKeyUp (uint32_t key)
 Handler for MSG_KEYUP messages.

virtual void OnMouseMove (point_t pt)
 Handler for MSG_MOUSEMOVE messages.

virtual void OnMouseDown (point_t pt)
 Handler for MSG_MOUSEDOWN messages.

virtual void OnMouseUp (point_t pt)
 Handler for MSG_MOUSEUP messages.

virtual void OnClose (wnd_h handle)
virtual void OnFocus ()
 Handler for MSG_FOCUS messages.

virtual void OnBlur ()
 Handler for MSG_FOCUS messages.

virtual void OnAddChild (WindowImpl *child)
 Called when a child window is created.

virtual void OnRemoveChild (WindowImpl *child)
 Called when a child window is closed.

virtual bool OnCreate ()
 Called after the window is created.

virtual void OnSize (int width, int height)
 Called when the window is resized.


Protected Attributes

wchar_t * m_title
Rect m_position
WindowImplm_parent
const wnd_message_t * m_message

Detailed Description

Base class for custom window classes.

This class will create a window and process messages for it


Member Function Documentation

bool WindowImpl::Create WindowImpl parent,
const wchar_t *  title,
const rect_t &  position = Rect(0, 0, 0, 0)
 

Creates the window.

Parameters:
parent Pointer to the parent window, or NULL to create a top-level window (frame).
title Title of the window or control, or NULL for none.
position Position of the window

virtual void OS::WindowImpl::OnKeyDown uint32_t  key  )  [inline, protected, virtual]
 

Handler for MSG_KEYDOWN messages.

Parameters:
key Key code; see <os/keyboard.h>

Reimplemented in OS::Edit.

virtual void OS::WindowImpl::OnKeyUp uint32_t  key  )  [inline, protected, virtual]
 

Handler for MSG_KEYUP messages.

Parameters:
key Key code; see <os/keyboard.h>

virtual void OS::WindowImpl::OnMouseDown point_t  pt  )  [inline, protected, virtual]
 

Handler for MSG_MOUSEDOWN messages.

Parameters:
\pt Position of the mouse pointer when the button was pressed

Reimplemented in OS::Button, and OS::Edit.

virtual void OS::WindowImpl::OnMouseMove point_t  pt  )  [inline, protected, virtual]
 

Handler for MSG_MOUSEMOVE messages.

Parameters:
pt Position of the mouse pointer after it was moved

Reimplemented in OS::Button, and OS::Menu.

virtual void OS::WindowImpl::OnMouseUp point_t  pt  )  [inline, protected, virtual]
 

Handler for MSG_MOUSEUP messages.

Parameters:
\pt Position of the mouse pointer when the button was released

Reimplemented in OS::Button, and OS::Menu.

virtual void OS::WindowImpl::OnPaint  )  [inline, protected, virtual]
 

Handler for MSG_PAINT messages.

You should declare a Painter object in your OnPaint handler, or call BeginPaint.

Reimplemented in OS::Button, OS::DialogContainer, OS::Edit, OS::FrameWindow, OS::Label, and OS::Menu.


The documentation for this class was generated from the following files:
  • /include/gui/Window.h
  • /coreos/libgui/WindowImpl.cpp
Post a comment

From: