Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/pgui/pgButton.I

Go to the documentation of this file.
00001 // Filename: pgButton.I
00002 // Created by:  drose (13Mar02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 
00020 ////////////////////////////////////////////////////////////////////
00021 //     Function: PGButton::setup
00022 //       Access: Published
00023 //  Description: Sets up the button using the indicated NodePath as
00024 //               arbitrary geometry.
00025 ////////////////////////////////////////////////////////////////////
00026 INLINE void PGButton::
00027 setup(const NodePath &ready) {
00028   setup(ready, ready, ready, ready);
00029 }
00030 
00031 ////////////////////////////////////////////////////////////////////
00032 //     Function: PGButton::setup
00033 //       Access: Published
00034 //  Description: Sets up the button using the indicated NodePath as
00035 //               arbitrary geometry.
00036 ////////////////////////////////////////////////////////////////////
00037 INLINE void PGButton::
00038 setup(const NodePath &ready, const NodePath &depressed) {
00039   setup(ready, depressed, ready, ready);
00040 }
00041 
00042 ////////////////////////////////////////////////////////////////////
00043 //     Function: PGButton::setup
00044 //       Access: Published
00045 //  Description: Sets up the button using the indicated NodePath as
00046 //               arbitrary geometry.
00047 ////////////////////////////////////////////////////////////////////
00048 INLINE void PGButton::
00049 setup(const NodePath &ready, const NodePath &depressed, 
00050       const NodePath &rollover) {
00051   setup(ready, depressed, rollover, ready);
00052 }
00053 
00054 ////////////////////////////////////////////////////////////////////
00055 //     Function: PGButton::get_click_prefix
00056 //       Access: Published, Static
00057 //  Description: Returns the prefix that is used to define the click
00058 //               event for all PGButtons.  The click event is the
00059 //               concatenation of this string followed by get_id().
00060 ////////////////////////////////////////////////////////////////////
00061 INLINE string PGButton::
00062 get_click_prefix() {
00063   return "click-";
00064 }
00065 
00066 ////////////////////////////////////////////////////////////////////
00067 //     Function: PGButton::get_click_event
00068 //       Access: Published
00069 //  Description: Returns the event name that will be thrown when the
00070 //               button is clicked normally.
00071 ////////////////////////////////////////////////////////////////////
00072 INLINE string PGButton::
00073 get_click_event(const ButtonHandle &button) const {
00074   return "click-" + button.get_name() + "-" + get_id();
00075 }

Generated on Fri May 2 00:42:36 2003 for Panda by doxygen1.3