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

panda/src/pgui/pgFrameStyle.I

Go to the documentation of this file.
00001 // Filename: pgFrameStyle.I
00002 // Created by:  drose (03Jul01)
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: PGFrameStyle::Constructor
00022 //       Access: Published
00023 //  Description: 
00024 ////////////////////////////////////////////////////////////////////
00025 INLINE PGFrameStyle::
00026 PGFrameStyle() {
00027   _type = T_none;
00028   _color.set(1.0f, 1.0f, 1.0f, 1.0f);
00029   _width.set(0.1f, 0.1f);
00030 }
00031 
00032 ////////////////////////////////////////////////////////////////////
00033 //     Function: PGFrameStyle::Copy Constructor
00034 //       Access: Published
00035 //  Description: 
00036 ////////////////////////////////////////////////////////////////////
00037 INLINE PGFrameStyle::
00038 PGFrameStyle(const PGFrameStyle &copy) :
00039   _type(copy._type),
00040   _color(copy._color),
00041   _width(copy._width)
00042 {
00043 }
00044 
00045 ////////////////////////////////////////////////////////////////////
00046 //     Function: PGFrameStyle::Copy Assignment Operator
00047 //       Access: Published
00048 //  Description: 
00049 ////////////////////////////////////////////////////////////////////
00050 INLINE void PGFrameStyle::
00051 operator = (const PGFrameStyle &copy) {
00052   _type = copy._type;
00053   _color = copy._color;
00054   _width = copy._width;
00055 }
00056 
00057 ////////////////////////////////////////////////////////////////////
00058 //     Function: PGFrameStyle::Destructor
00059 //       Access: Published
00060 //  Description: 
00061 ////////////////////////////////////////////////////////////////////
00062 INLINE PGFrameStyle::
00063 ~PGFrameStyle() {
00064 }
00065 
00066 ////////////////////////////////////////////////////////////////////
00067 //     Function: PGFrameStyle::set_type
00068 //       Access: Published
00069 //  Description: Sets the basic type of frame.
00070 ////////////////////////////////////////////////////////////////////
00071 INLINE void PGFrameStyle::
00072 set_type(PGFrameStyle::Type type) {
00073   _type = type;
00074 }
00075 
00076 ////////////////////////////////////////////////////////////////////
00077 //     Function: PGFrameStyle::get_type
00078 //       Access: Published
00079 //  Description: Returns the basic type of frame.
00080 ////////////////////////////////////////////////////////////////////
00081 INLINE PGFrameStyle::Type PGFrameStyle::
00082 get_type() const {
00083   return _type;
00084 }
00085 
00086 ////////////////////////////////////////////////////////////////////
00087 //     Function: PGFrameStyle::set_color
00088 //       Access: Published
00089 //  Description: Sets the dominant color of the frame.
00090 ////////////////////////////////////////////////////////////////////
00091 INLINE void PGFrameStyle::
00092 set_color(float r, float g, float b, float a) {
00093   set_color(Colorf(r, g, b, a));
00094 }
00095 
00096 ////////////////////////////////////////////////////////////////////
00097 //     Function: PGFrameStyle::set_color
00098 //       Access: Published
00099 //  Description: Sets the dominant color of the frame.
00100 ////////////////////////////////////////////////////////////////////
00101 INLINE void PGFrameStyle::
00102 set_color(const Colorf &color) {
00103   _color = color;
00104 }
00105 
00106 ////////////////////////////////////////////////////////////////////
00107 //     Function: PGFrameStyle::set_color
00108 //       Access: Published
00109 //  Description: Returns the dominant color of the frame.
00110 ////////////////////////////////////////////////////////////////////
00111 INLINE const Colorf &PGFrameStyle::
00112 get_color() const {
00113   return _color;
00114 }
00115 
00116 ////////////////////////////////////////////////////////////////////
00117 //     Function: PGFrameStyle::set_width
00118 //       Access: Published
00119 //  Description: Sets the width parameter, which has meaning only for
00120 //               certain frame types.  For instance, this is the width
00121 //               of the bevel for T_bevel_in or T_bevel_out.  The
00122 //               units are in screen units.
00123 ////////////////////////////////////////////////////////////////////
00124 INLINE void PGFrameStyle::
00125 set_width(float x, float y) {
00126   set_width(LVecBase2f(x, y));
00127 }
00128 
00129 ////////////////////////////////////////////////////////////////////
00130 //     Function: PGFrameStyle::set_width
00131 //       Access: Published
00132 //  Description: Sets the width parameter, which has meaning only for
00133 //               certain frame types.  For instance, this is the width
00134 //               of the bevel for T_bevel_in or T_bevel_out.  The
00135 //               units are in screen units.
00136 ////////////////////////////////////////////////////////////////////
00137 INLINE void PGFrameStyle::
00138 set_width(const LVecBase2f &width) {
00139   _width = width;
00140 }
00141 
00142 ////////////////////////////////////////////////////////////////////
00143 //     Function: PGFrameStyle::get_width
00144 //       Access: Published
00145 //  Description: Returns the width parameter, which has meaning only
00146 //               for certain frame types.  For instance, this is the
00147 //               width of the bevel for T_bevel_in or T_bevel_out.
00148 //               The units are in screen units.
00149 ////////////////////////////////////////////////////////////////////
00150 INLINE const LVecBase2f &PGFrameStyle::
00151 get_width() const {
00152   return _width;
00153 }
00154 
00155 ////////////////////////////////////////////////////////////////////
00156 //     Function: PGFrameStyle ostream output
00157 //  Description: 
00158 ////////////////////////////////////////////////////////////////////
00159 INLINE ostream &
00160 operator << (ostream &out, const PGFrameStyle &pfs) {
00161   pfs.output(out);
00162   return out;
00163 }

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