Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Title Class Reference

titre affiche une bare degradé titre avec des boutons (min,max,close) More...

#include <title.h>

Inheritance diagram for Title:

Control List of all members.

Public Member Functions

 Title ()
 ~Title ()
virtual void Create ()
void Create (Control *container, double depth=DEFAULT_DEPTH_TITLE)
void ToString (MyString &str)
 Pour le debugage.

void GotFocus ()
 Fenetre parente a le focus.

void LostFocus ()
 Fenetre parente n'a plus le focus.

void operator= (char *newCaption)
void SetText (char *newCaption)
void SetUses (BOOL _useMin, BOOL _useMax, BOOL _useClose, BOOL _useIcon)
int OnClick (StateMouse *mouse, int face)
int OnLButtonDown (StateMouse *mouse, int face)
 Un simple click.

int OnMButtonDown (StateMouse *mouse, int face)
int OnLMButtonUp (StateMouse *mouse, int face)
int OnMaxOrOriginal (StateMouse *mouse, int face)
 Swap soit en Maximize soit en OriginalSize.

int OnMaxOrOriginal ()
int OnMouseMove (StateMouse *mouse, int deltaX, int deltaY, int face)
 La souris bouge.

int OnMouseWheel (StateMouse *mouse, int face)
 La wheel configure le demplacement z.

int OnMin ()
 Bouton min clicker.

int OnMax ()
 Boutton max clicker.

int OnOriginal ()
 Affichage en taille par defaut.

int OnClose ()
 Bouton close clicker.

int OnKeyDown (StateKey *key, int face)
 si appuis de les touche de direction ==> move , si shift en meme temp ==> rotate

int OnKeyUp (StateKey *key, int face)
 si appuis de ESC sur le title ==> Close, HOME ==> angles=0

int OnRefresh (Timer *)
 A chaque rafraichisement graphique, verifie s'il y a des deplacements rapides.

int OnOverIn (Control *, int)
int OnOverOut (Control *, int)

Public Attributes

Button btnMin
Button btnMax
Button btnClose
Button btnIcon
Text3Dcaption
Tip tipCaption
Controlcontainer
 control pere contenant

BOOL focused
BOOL useIcon
 le bouton icone est il a utiliser

BOOL useMin
 le bouton min est il a utiliser

BOOL useMax
 le bouton max est il a utiliser

BOOL useClose
 le bouton close est il a utiliser

Point3D< LayoutDoubleoriginalSize
Point3D< GLdouble > originalAngle
FaceNodetempNode
StateTitle state
StateMouse oldMouse
EventTitle onTitle

Detailed Description

titre affiche une bare degradé titre avec des boutons (min,max,close)

Il n'a theoriquement pas d'interet seul, un conteneur peut s'en servire (Window,MsgBox,etc ...)

Definition at line 51 of file title.h.


Constructor & Destructor Documentation

Title::Title  ) 
 

Definition at line 29 of file title.cpp.

References align_center, btnClose, btnIcon, btnMax, btnMin, ce, EventButton::click, container, EventMouseButton::doubleClick, EventKey::down, EventMouseButton::down, focused, ControlEngine::fontTexture, ft_texture, EventOver::in, EventControl::key, EventMouse::left, BasicText3D::material, EventMouse::mid, EventControl::mouse, EventMouse::move, Control::name, Button::onButton, OnLMButtonUp(), OnMaxOrOriginal(), OnMin(), EventOver::out, EventControl::over, Text3D::SetAlign(), Material::SetDS(), Text3D::Setup(), SetUses(), Text3D::SetWrapping(), state, Tip::text, tipCaption, EventKey::up, EventMouseButton::up, and EventMouse::wheel.

Title::~Title  ) 
 

Definition at line 123 of file title.cpp.

References ce, Timer::onTimer, and ControlEngine::timerRefresh.


Member Function Documentation

void Title::Create Control container,
double  depth = DEFAULT_DEPTH_TITLE
 

Definition at line 72 of file title.cpp.

References Primitive::AddBox(), btnClose, btnIcon, btnMax, btnMin, ce, Textures::close, container, Tip::Create(), Button::Create(), MyTreeNode< T >::elem, MyTreeNode< T >::Elems(), FACE_FRONT, Control::faceNode, GotFocus(), Primitive::GoTo(), Textures::iconBase, Textures::max, Textures::min, ControlEngine::Pop(), ControlEngine::primitive, ControlEngine::Push(), Control::SetAlphaBlending(), Control::SetParent(), ControlEngine::texture, tipCaption, useClose, useIcon, useMax, useMin, Control::XDockCenter(), Control::XDockLeft(), Control::XDockRight(), and Control::YDockCenter().

virtual void Title::Create  )  [inline, virtual]
 

Reimplemented from Control.

Definition at line 78 of file title.h.

References DEFAULT_DEPTH_TITLE.

Referenced by Tutorial::BaseDemo::BaseDemo(), Window::Create(), and Tutorial::FaceDemo::FaceDemo().

void Title::GotFocus  ) 
 

Fenetre parente a le focus.

Todo:
Passer nouveau parametre a onTitle.GotFocus(oldSelected), gestion des selected control precedent et suivant

Definition at line 380 of file title.cpp.

References ce, Debug0Param, Textures::degradeeFocus, MyTreeNode< T >::Elems(), f, FACE_BOTTOM, FACE_FRONT, FACE_LEFT, FACE_RIGHT, FACE_TOP, focused, EventTitle::gotFocus, onTitle, and ControlEngine::texture.

Referenced by Create(), OnLButtonDown(), Window::OnLMRButton(), and OnMButtonDown().

void Title::LostFocus  ) 
 

Fenetre parente n'a plus le focus.

Definition at line 399 of file title.cpp.

References ce, Debug0Param, Textures::degradeeUnFocus, MyTreeNode< T >::Elems(), FACE_BOTTOM, FACE_FRONT, FACE_LEFT, FACE_RIGHT, FACE_TOP, focused, EventTitle::lostFocus, onTitle, and ControlEngine::texture.

int Title::OnClick StateMouse mouse,
int  face
 

Reimplemented from Control.

int Title::OnClose  ) 
 

Bouton close clicker.

Definition at line 416 of file title.cpp.

References EventTitle::close, Debug0Param, and onTitle.

Referenced by OnKeyUp().

int Title::OnKeyDown StateKey key,
int  face
 

si appuis de les touche de direction ==> move , si shift en meme temp ==> rotate

Reimplemented from Control.

Definition at line 300 of file title.cpp.

References BOOL(), StateKey::code, container, DebugKey2, StateKey::GetState(), and Control::RotateQuaternion().

int Title::OnKeyUp StateKey key,
int  face
 

si appuis de ESC sur le title ==> Close, HOME ==> angles=0

Reimplemented from Control.

Definition at line 283 of file title.cpp.

References StateKey::code, container, DebugKey2, OnClose(), and Control::RotateTo().

int Title::OnLButtonDown StateMouse mouse,
int  face
 

Un simple click.

Reimplemented from Control.

Definition at line 350 of file title.cpp.

References Cursor::ApplyTypes(), ce, ControlEngine::cursor, cursorRepere, DebugMouse2, and GotFocus().

int Title::OnLMButtonUp StateMouse mouse,
int  face
 

Definition at line 368 of file title.cpp.

References Cursor::ApplyTypes(), ce, ControlEngine::cursor, cursorRepere, and DebugMouse2.

Referenced by Title().

int Title::OnMax  ) 
 

Boutton max clicker.

place le title en fullScreen mode

Definition at line 262 of file title.cpp.

References btnMax, ce, container, Debug0Param, MyTreeNode< T >::elem, MyTreeNode< T >::Elems(), FACE_FRONT, Control::faceNode, MyTree< Face >::GetRoot(), Textures::maxAlternate, EventTitle::maximize, MyTreeNode< T >::MoveTo(), onTitle, originalAngle, originalSize, MyTreeNode< T >::parent, ControlEngine::primitive, Control::RotateTo(), state, tempNode, ControlEngine::texture, Primitive::tree, and useMax.

Referenced by Tutorial::LayoutDemo::LayoutDemo(), and OnMaxOrOriginal().

int Title::OnMaxOrOriginal  ) 
 

Definition at line 189 of file title.cpp.

References Debug0Param, OnMax(), OnOriginal(), and state.

int Title::OnMaxOrOriginal StateMouse mouse,
int  face
 

Swap soit en Maximize soit en OriginalSize.

Definition at line 178 of file title.cpp.

References DebugMouse2, OnMax(), OnOriginal(), and state.

Referenced by Title().

int Title::OnMButtonDown StateMouse mouse,
int  face
 

Reimplemented from Control.

Definition at line 359 of file title.cpp.

References Cursor::ApplyTypes(), ce, ControlEngine::cursor, cursorRepere, DebugMouse2, and GotFocus().

int Title::OnMin  ) 
 

Bouton min clicker.

Sauvegarde la taille et position original de la fenetre et place le titre le plus bas a gauche du conteneur

Todo:
Seul l'univers pour le moment, mais dois etre etendu style fenetre MDI)

Definition at line 241 of file title.cpp.

References TaskWindow::Add(), ce, container, Debug0Param, MyTreeNode< T >::elem, Control::faceNode, MyTree< Face >::GetRoot(), EventTitle::minimize, MyTreeNode< T >::MoveTo(), onTitle, originalAngle, originalSize, MyTreeNode< T >::parent, state, ControlEngine::taskWindow, tempNode, and ControlEngine::trash.

Referenced by Demo::Demo(), Tutorial::Demo::Demo(), Tutorial::ApplicationDemo::OnEnd(), Tutorial::WindowDemo::OnEnd(), Tutorial::BaseDemo::OnEnd(), Title(), and Tutorial::Tutorial().

int Title::OnMouseMove StateMouse mouse,
int  deltaX,
int  deltaY,
int  face
 

La souris bouge.

Definition at line 335 of file title.cpp.

References container, FACE_FRONT, StateMouse::GetNbButtonPush(), StateMouse::leftBtn, StateMouse::midBtn, Control::Move(), and Control::RotateQuaternion().

int Title::OnMouseWheel StateMouse mouse,
int  face
 

La wheel configure le demplacement z.

Reimplemented from Control.

Definition at line 226 of file title.cpp.

References container, DebugMouse2, Control::Move(), and StateMouse::wheelDelta.

int Title::OnOriginal  ) 
 

Affichage en taille par defaut.

Action:

  • Change le boutton de Max en mode "original"
  • re-place le container a sa postion et d'origine
  • retir de taskWindow le boutton de restor

Definition at line 208 of file title.cpp.

References btnMax, ce, container, Debug0Param, MyTreeNode< T >::elem, MyTreeNode< T >::Elems(), FACE_FRONT, Control::faceNode, Textures::max, MyTreeNode< T >::MoveTo(), originalAngle, originalSize, TaskWindow::Restore(), state, ControlEngine::taskWindow, tempNode, ControlEngine::texture, and useMax.

Referenced by Tutorial::ApplicationDemo::ApplicationDemo(), Tutorial::BaseDemo::BaseDemo(), Tutorial::Demo::Ending(), OnMaxOrOriginal(), Tutorial::WindowDemo::WindowDemo(), and Tutorial::~Tutorial().

int Title::OnOverIn Control ,
int 
 

Definition at line 147 of file title.cpp.

References Cursor::ApplyTypes(), ce, ControlEngine::cursor, cursorRepere, Debug2Param, Control::name, Timer::onTimer, and ControlEngine::timerRefresh.

int Title::OnOverOut Control ,
int 
 

Definition at line 155 of file title.cpp.

References ce, Debug2Param, Control::name, Timer::onTimer, and ControlEngine::timerRefresh.

int Title::OnRefresh Timer  ) 
 

A chaque rafraichisement graphique, verifie s'il y a des deplacements rapides.

Definition at line 129 of file title.cpp.

References container, Timer::GetDeltaTime(), StateKey::GetState(), and Control::Move().

void Title::operator= char *  newCaption  )  [inline]
 

Definition at line 83 of file title.h.

References SetText().

void Title::SetText char *  newCaption  ) 
 

Definition at line 170 of file title.cpp.

References Text3D::SetText().

Referenced by Tutorial::ApplicationDemo::ApplicationDemo(), Tutorial::BaseDemo::BaseDemo(), Tutorial::FaceDemo::FaceDemo(), Tutorial::LayoutDemo::LayoutDemo(), operator=(), TaskWindow::TaskWindow(), and Tutorial::WindowDemo::WindowDemo().

void Title::SetUses BOOL  _useMin,
BOOL  _useMax,
BOOL  _useClose,
BOOL  _useIcon
 

Definition at line 162 of file title.cpp.

References useClose, useIcon, useMax, and useMin.

Referenced by Tutorial::FaceDemo::FaceDemo(), and Title().

void Title::ToString MyString str  ) 
 

Pour le debugage.

Reimplemented from Control.

Definition at line 426 of file title.cpp.

References MyString::AddFormat(), MyTreeNode< T >::Elems(), FACE_FRONT, and focused.


Member Data Documentation

Button Title::btnClose
 

Definition at line 55 of file title.h.

Referenced by Create(), MsgBox::MsgBox(), and Title().

Button Title::btnIcon
 

Definition at line 56 of file title.h.

Referenced by Create(), Calculator::Create(), and Title().

Button Title::btnMax
 

Definition at line 55 of file title.h.

Referenced by Create(), OnMax(), OnOriginal(), and Title().

Button Title::btnMin
 

Definition at line 55 of file title.h.

Referenced by Create(), and Title().

Text3D* Title::caption
 

Definition at line 57 of file title.h.

Referenced by TaskWindow::Add().

Control* Title::container
 

control pere contenant

Definition at line 59 of file title.h.

Referenced by Create(), OnKeyDown(), OnKeyUp(), OnMax(), OnMin(), OnMouseMove(), OnMouseWheel(), OnOriginal(), OnRefresh(), and Title().

BOOL Title::focused
 

Definition at line 61 of file title.h.

Referenced by GotFocus(), LostFocus(), Title(), and ToString().

StateMouse Title::oldMouse
 

Definition at line 72 of file title.h.

EventTitle Title::onTitle
 

Definition at line 73 of file title.h.

Referenced by GotFocus(), LostFocus(), OnClose(), OnMax(), OnMin(), and Window::Window().

Point3D<GLdouble> Title::originalAngle
 

Definition at line 69 of file title.h.

Referenced by OnMax(), OnMin(), and OnOriginal().

Point3D<LayoutDouble> Title::originalSize
 

Definition at line 68 of file title.h.

Referenced by OnMax(), OnMin(), and OnOriginal().

StateTitle Title::state
 

Definition at line 71 of file title.h.

Referenced by OnMax(), OnMaxOrOriginal(), OnMin(), OnOriginal(), and Title().

FaceNode* Title::tempNode
 

Definition at line 70 of file title.h.

Referenced by OnMax(), OnMin(), and OnOriginal().

Tip Title::tipCaption
 

Definition at line 58 of file title.h.

Referenced by Create(), and Title().

BOOL Title::useClose
 

le bouton close est il a utiliser

Definition at line 65 of file title.h.

Referenced by Create(), SetUses(), TaskWindow::TaskWindow(), and Tutorial::Tutorial().

BOOL Title::useIcon
 

le bouton icone est il a utiliser

Definition at line 62 of file title.h.

Referenced by Create(), and SetUses().

BOOL Title::useMax
 

le bouton max est il a utiliser

Definition at line 64 of file title.h.

Referenced by Calculator::Calculator(), Create(), MsgBox::MsgBox(), OnMax(), OnOriginal(), SetUses(), TaskWindow::TaskWindow(), and Tutorial::Tutorial().

BOOL Title::useMin
 

le bouton min est il a utiliser

Definition at line 63 of file title.h.

Referenced by Create(), MsgBox::MsgBox(), SetUses(), and Tutorial::Tutorial().


The documentation for this class was generated from the following files:
Generated on Fri Aug 20 19:21:47 2004 for 3d Controls by doxygen 1.3.6