Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5391 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Oct 16, 2005, 1:37:41 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: more gui-definitions

Location:
trunk/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/defs/functor_list.h

    r5332 r5391  
    99   any later version.
    1010   */
    11 
    1211
    1312/*!
     
    105104
    106105#ifdef FUNCTOR_LIST
     106
    107107  FUNCTOR_LIST(0)();
    108108  //! makes functions with one string
     
    152152  FUNCTOR_LIST(2)(l_UINT, l_LONG);
    153153  FUNCTOR_LIST(2)(l_STRING, l_UINT);
     154
     155
    154156#endif /* FUNCTOR_LIST */
  • trunk/src/lib/coord/p_node.h

    r5387 r5391  
    11/*!
    2     @file p_node.h
    3   *  Definition of a parenting node
    4 
    5     parenting is how coordinates are handled in orxonox, meaning, that all coordinates
    6     are representet relative to another parent node. this nodes build a parenting
    7     tree of one-sided references (from up to down referenced).
    8     Every node manages itself a list of childrens (of whos it is parent - easy...)
    9 
    10     absCoordinate, absDirection have to be recalculated as soon as there was a change in
    11     place or ortientation. this is only the case if
    12     o bDirChanged is true (so changed) AND timeStamp != now
    13     o bCoorChanged is true (so moved) AND timeStamp != now
    14     this conditions make it cheaper to recalculate the tree (reduces redundant work).
    15 
    16     remember: if you have to change the coordinates or the directions, use the functions
    17     that are defined to execute this operation - otherwhise there will be big problems...
    18 */
     2 * @file p_node.h
     3 * @brief  Definition of a parenting node
     4 *
     5 *  parenting is how coordinates are handled in orxonox, meaning, that all coordinates
     6 *  are representet relative to another parent node. this nodes build a parenting
     7 *  tree of one-sided references (from up to down referenced).
     8 *  Every node manages itself a list of childrens (of whos it is parent - easy...).
     9 *
     10 *  absCoordinate, absDirection have to be recalculated as soon as there was a change in
     11 *  place or ortientation. this is only the case if
     12 *  o bDirChanged is true (so changed) AND timeStamp != now
     13 *  o bCoorChanged is true (so moved) AND timeStamp != now
     14 *  this conditions make it cheaper to recalculate the tree (reduces redundant work).
     15 */
    1916
    2017
  • trunk/src/lib/event/event.h

    r5366 r5391  
     1/*
     2   orxonox - the future of 3D-vertical-scrollers
     3
     4   Copyright (C) 2004 orx
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11### File Specific:
     12   main-programmer: Patrick Boenzli
     13   co-programmer: ...
     14
     15   Benjamin Grauer: added SDL_ResizeEvent resize (for the GraphicsEngine)
     16*/
     17
    118/*!
    219 * @file event.h
  • trunk/src/lib/gui/gl_gui/glgui_box.cc

    r5364 r5391  
    2323 * standard constructor
    2424*/
    25 GLGuiBox::GLGuiBox ()
     25GLGuiBox::GLGuiBox (GLGuiBoxType type)
    2626{
    2727  this->init();
    2828
     29  this->setType (type);
    2930}
    3031
  • trunk/src/lib/gui/gl_gui/glgui_box.h

    r5364 r5391  
    1212// FORWARD DECLARATION
    1313
     14typedef enum
     15{
     16  GLGuiBox_H,
     17  GLGuiBox_V,
     18} GLGuiBoxType;
     19
    1420//! This is BOX part of the openglGUI class
    1521/**
     
    1925
    2026 public:
    21   GLGuiBox();
     27  GLGuiBox(GLGuiBoxType type = GLGuiBox_H);
    2228  virtual ~GLGuiBox();
    2329
    2430  void init();
     31  void setType(GLGuiBoxType type) { this->type = type; };
    2532
    2633  virtual void draw();
    2734
    2835 private:
     36   GLGuiBoxType         type;
    2937
    3038};
  • trunk/src/lib/gui/gl_gui/glgui_checkbutton.h

    r5366 r5391  
    2424  void init();
    2525
     26  bool    isActive() { return this->bActive; };
     27  void    setActivity(bool bActive);
     28
    2629  virtual void draw();
    2730
    2831 private:
     32   bool             bActive;
    2933
    3034};
  • trunk/src/lib/gui/gl_gui/glgui_container.h

    r5364 r5391  
    2525  void init();
    2626
     27  void add(GLGuiWidget* widget);
     28
     29  void setBorderWidth(float borderwidth);
     30
    2731  void hideAll();
    2832  void showAll();
     33
    2934
    3035  virtual void draw();
  • trunk/src/lib/gui/gl_gui/glgui_handler.cc

    r5388 r5391  
    4646void GLGuiHandler::activate()
    4747{
    48 //  EventHandler::getInstance()->setState(ES_MENU);
     48  EventHandler::getInstance()->pushState(ES_MENU);
    4949
    5050}
     
    5252void GLGuiHandler::deactivate()
    5353{
     54  EventHandler::getInstance()->popState();
    5455
    5556}
  • trunk/src/lib/gui/gl_gui/glgui_menu.h

    r5366 r5391  
    1111
    1212// FORWARD DECLARATION
    13 
     13template<class T>  class tList;
    1414//! This is Menu part of the openglGUI class
    1515/**
     
    2424  void init();
    2525
     26  void addItem(const char* itemName);
     27  void removeItem(const char* itemName);
     28  void removeItem(unsigned int itemNumber);
     29  void selectItem(const char* itemName);
     30  void selectItem(unsigned int itemNumber);
     31
    2632  virtual void draw();
    2733
    2834 private:
     35   tList<char>*           itemList;
    2936
    3037};
  • trunk/src/lib/gui/gl_gui/glgui_widget.cc

    r5387 r5391  
    3939
    4040
     41bool GLGuiWidget::focusOverWidget(float x, float y)
     42{
     43  if (this->getAbsCoor2D().x < x && this->getAbsCoor2D().x+ this->getSizeX2D() > x &&
     44      this->getAbsCoor2D().y < y && this->getAbsCoor2D().y+ this->getSizeX2D() > y)
     45    return true;
     46  else
     47    return false;
     48}
     49
     50
    4151/**
    4252 * initializes the GUI-element
  • trunk/src/lib/gui/gl_gui/glgui_widget.h

    r5387 r5391  
    11/*!
    2 * @file glgui_widget.h
    3 * The gl_widget of the openglGUI
    4 */
     2 * @file glgui_widget.h
     3 * The gl_widget of the openglGUI
     4 */
    55
    66#ifndef _GLGUI_WIDGET_H
     
    99#include "element_2d.h"
    1010#include "glincl.h"
     11#include "event.h"
    1112
    1213// FORWARD DECLARATION
    1314class Material;
     15class Signal; //!< @todo create this!!
     16
     17typedef enum
     18{
     19  GLGuiSignal_click     = 0,
     20  GLGuiSignal_release   = 1,
     21  GLGuiSignal_rollOn    = 2,
     22  GLGuiSignal_rollOff   = 3,
     23  GLGuiSignal_open      = 4,
     24  GLGuiSignal_close     = 5,
     25  GLGuiSignal_destroy   = 6,
     26
     27  GLGuiSignalCount      = 7,
     28} GLGuiSignalType;
    1429
    1530//! if the Element should be visible by default.
     
    3045    void hide();
    3146
     47    void connectSignal(GLGuiSignalType signalType, Signal* signal);
     48    void disconnectSignal(GLGuiSignalType);
     49    bool focusOverWidget(float x, float y);
     50
     51    // if something was clickt on the GUI-widget.
     52    virtual void click(const Event& event) {};
     53    virtual void release(const Event& event) {};
     54
     55    virtual void receiveFocus() {};
     56    virtual void removeFocus() {};
    3257
    3358    virtual void update() = 0;
     
    4065    GLuint                frontModel;
    4166
     67    Signal*               widgetSignals[GLGuiSignalCount];
     68
    4269  private:
    4370    bool                  focusable;        //!< If this widget can receive focus.
  • trunk/src/lib/shell/shell_command.h

    r5329 r5391  
    22 * @file shell_command.h
    33 * Definition of a on-screen-shell
    4  *
    5  * @todo also take Static functions
    6 */
     4 */
    75
    86#ifndef _SHELL_COMMAND_H
Note: See TracChangeset for help on using the changeset viewer.