Back to index

supertuxkart  0.5+dfsg1
Private Member Functions | Private Attributes | Static Private Attributes | Friends
Widget Class Reference

#include <widget.hpp>

Collaboration diagram for Widget:
Collaboration graph
[legend]

List of all members.

Private Member Functions

 Widget (const int X_, const int Y_, const int WIDTH_, const int HEIGHT_)
 ~Widget ()
void update (const float DELTA)
void pulse ()
void resizeToText ()
void lightenColor ()
void darkenColor ()
void setFont (const WidgetFont FONT)
void setTexture (const char *FILENAME, const bool is_full_path=true)
bool createRect ()
 Initialize a display list containing a rectangle that can have rounded corners, with texture coordinates to properly apply a texture map to the rectangle as though the corners were not rounded .
void updateVariables (const float DELTA)
void draw ()
void applyTransformations ()

Private Attributes

int m_x
int m_y
int m_width
int m_height
int m_radius
bool m_enable_rect
GLuint m_rect_list
const GLfloat * m_rect_color
WidgetArea m_round_corners
bool m_enable_border
GLuint m_border_list
float m_border_percentage
const GLfloat * m_border_color
bool m_enable_texture
GLuint m_texture
bool m_enable_text
std::string m_text
WidgetFontSize m_text_size
Fontm_font
const GLfloat * m_text_color
WidgetFont m_curr_widget_font
bool m_enable_scroll
float m_scroll_pos_x
float m_scroll_pos_y
int m_scroll_speed_x
int m_scroll_speed_y
bool m_enable_rotation
float m_rotation_angle
int m_rotation_speed
int m_enable_track
int m_track_num
float m_text_scale

Static Private Attributes

static const int MAX_SCROLL = 1000000
static const float MAX_TEXT_SCALE = 1.2f
static const float MIN_TEXT_SCALE = 1.0f

Friends

class WidgetManager

Detailed Description

Definition at line 125 of file widget.hpp.


Constructor & Destructor Documentation

Widget::Widget ( const int  X_,
const int  Y_,
const int  WIDTH_,
const int  HEIGHT_ 
) [private]

Definition at line 69 of file widget.cpp.

  :
//Switch features are not set here to sane defaults because the WidgetManager
//handles that.
    m_x(X_), m_y(Y_),
    m_width(WIDTH_), m_height(HEIGHT_),
    m_rect_list(0),
    m_round_corners(WGT_AREA_ALL),
    m_border_list(0),
    m_scroll_pos_x(0), m_scroll_pos_y(0),
    m_text_scale(1.0f),
    m_enable_border(false)
{
}
Widget::~Widget ( ) [private]

Definition at line 89 of file widget.cpp.

{
    if(glIsList(m_rect_list))
    {
        glDeleteLists(m_rect_list, 1);
    }

    if(glIsList(m_border_list))
    {
        glDeleteLists(m_border_list, 1);
    }

}

Member Function Documentation

void Widget::applyTransformations ( ) [private]

Definition at line 808 of file widget.cpp.

{
    /* OpenGL transformations are affected by the order of the calls; but the
     * operations must be called in the inverse order that you want them to
     * be applied, since the calls are stacked, and the one at the top is
     * done first, till the one at the bottom.
     */
    glTranslatef ( (GLfloat)(m_x + m_width * 0.5f), (GLfloat)(m_y + m_height * 0.5f), 0);

    if( m_enable_rotation )
    {
        glRotatef( (GLfloat)m_rotation_angle, 0.0f, 0.0f, (GLfloat)1.0f );
    }
}

Here is the caller graph for this function:

bool Widget::createRect ( ) [private]

Initialize a display list containing a rectangle that can have rounded corners, with texture coordinates to properly apply a texture map to the rectangle as though the corners were not rounded .

Returns false if the call to glGenLists failed, otherwise it returns true.

Definition at line 265 of file widget.cpp.

{

    //TODO: show warning if text > rect
    if(m_radius > m_width * 0.5)
    {
        std::cerr << "Warning: widget's radius > half width.\n";
    }
    if(m_radius > m_height * 0.5)
    {
        std::cerr << "Warning: widget's radius > half height.\n";
    }
    if(m_radius < 1)
    {
        std::cerr << "Warning: widget's radius < 1, setting to 1.\n";
        m_radius = 1;
    }

    if(m_width == 0)
    {
        std::cerr << "Warning: creating widget rect with width 0, " <<
            "setting to 1.\n";
        m_width = 1;
    }
    if(m_height == 0)
    {
        std::cerr << "Warning: creating widget rect with height 0, " <<
            "setting to 1.\n";
        m_height = 1;
    }

    if(!glIsList(m_rect_list))
    {
        m_rect_list = glGenLists(1);
        if(m_rect_list == 0)
        {
            std::cerr << "Error: could not create a widget's rect list.\n";
            return false;
        }
    }

    //Calculate the number of quads each side should have. The algorithm
    //isn't based just on logic, since it went through visual testing to give
    //the perception of roundness.
    const int MIN_QUADS = 2;
    const int NUM_QUADS = MIN_QUADS + m_radius;

    int i;

    const int SMALLER_SIDE_LENGTH = m_height < m_width ? m_height / 2 : m_width / 2;
    const float BORDER_LENGTH = SMALLER_SIDE_LENGTH * m_border_percentage;

    typedef std::vector<float> float3;
    std::vector<float3> inner_vertex;
    std::vector<float3> outer_vertex;

    //NUM_QUADS + 1, because we have to add the union between the sides, and
    //multiplied by 2, because there are two sides
    inner_vertex.resize((NUM_QUADS + 1) * 2);
    outer_vertex.resize((NUM_QUADS + 1) * 2);

    const float HALF_WIDTH = m_width * 0.5f;
    const float HALF_HEIGHT = m_height * 0.5f;

    glNewList(m_rect_list, GL_COMPILE);
    {
        glBegin(GL_QUAD_STRIP);
        {
            //These are used to center the widget; without centering, the
            //widget's 0,0 coordinates are at the lower left corner.
            float angle;
            float circle_x, circle_y;

            //Draw the left side of the inside
            for (i = 0; i <= NUM_QUADS; ++i)
            {
                //To find the position in the X and Y axis of each point of
                //the quads, we use the property of the unit circle (a circle
                //with radius = 1) that at any given angle, cos(angle) is the
                //position of the unit circle at that angle in the X axis,
                //and that sin(angle) is the position of the unit circle at
                //that angle in the Y axis. Then the values from cos(angle)
                //and sin(angle) are multiplied by the radius.
                //
                //First we find the angle: since 2 * pi is the number of
                //radians in an entire circle, 0.5 * pi is a quarter of the
                //circle, which is a corner of the rounded rectangle. Based
                //on that, we just split the radians in a corner in NUM_QUADS
                //+ 1 parts, and use the angles at those parts to find the
                //X and Y position of the points.
                angle = 0.5f * M_PI * (float)i / (float)NUM_QUADS;
                circle_x = m_radius * cos(angle);
                circle_y = m_radius * sin(angle);

                //After we generate the positions in circle for the angles,
                //we have to position each rounded corner properly depending
                //on the position of the rectangle and the radius. The y
                //position for the circle is dependant on rect; if a corner
                //wasn't given, then the y position is computed as if it was
                //for a rectangle without rounder corners.
                //
                //The value in the position 0 of these vectors is X, the
                //second the Y for the top part of the widget and the third
                //the Y for the lower part of the widget.
                inner_vertex[i].resize(3);
                outer_vertex[i].resize(3);
                outer_vertex[i][0] = m_radius - circle_x;
                inner_vertex[i][0] = outer_vertex[i][0] + BORDER_LENGTH;

                if( m_round_corners & WGT_AREA_NW )
                {
                    outer_vertex[i][1] = m_height + circle_y - m_radius;
                    inner_vertex[i][1] = outer_vertex[i][1] - BORDER_LENGTH;
                }
                else
                {
                    outer_vertex[i][1] =(float) m_height;
                    inner_vertex[i][1] = outer_vertex[i][1] - BORDER_LENGTH;
                }

                if( m_round_corners & WGT_AREA_SW )
                {
                    outer_vertex[i][2] = m_radius - circle_y;
                    inner_vertex[i][2] = outer_vertex[i][2] + BORDER_LENGTH;
                }
                else
                {
                    outer_vertex[i][2] = 0;
                    inner_vertex[i][2] = outer_vertex[i][2] + BORDER_LENGTH;
                }

                glTexCoord2f(inner_vertex[i][0] / (float)m_width, inner_vertex[i][1] / (float)m_height);
                glVertex2f(inner_vertex[i][0] - HALF_WIDTH, inner_vertex[i][1] - HALF_HEIGHT);

                glTexCoord2f(inner_vertex[i][0] / (float)m_width, inner_vertex[i][2] / (float)m_height);
                glVertex2f(inner_vertex[i][0] - HALF_WIDTH, inner_vertex[i][2] - HALF_HEIGHT);
            }

            //Draw the right side of a rectangle
            for (i = NUM_QUADS; i < NUM_QUADS * 2 + 1; ++i)
            {
                angle = 0.5f * M_PI * (float) (i - NUM_QUADS) / (float) NUM_QUADS;

                //By inverting the use of sin and cos we get corners that are
                //drawn from left to right instead of right to left
                circle_x = m_radius * sin(angle);
                circle_y = m_radius * cos(angle);

                inner_vertex[i+1].resize(3);
                outer_vertex[i+1].resize(3);
                outer_vertex[i+1][0] = m_width - m_radius + circle_x;
                inner_vertex[i+1][0] = outer_vertex[i+1][0] - BORDER_LENGTH;

                if( m_round_corners & WGT_AREA_NE )
                {
                    outer_vertex[i+1][1] = m_height - m_radius + circle_y;
                    inner_vertex[i+1][1] = outer_vertex[i+1][1] - BORDER_LENGTH;
                }
                else
                {
                    outer_vertex[i+1][1] = (float)m_height;
                    inner_vertex[i+1][1] = outer_vertex[i+1][1] - BORDER_LENGTH;
                }

                if( m_round_corners & WGT_AREA_SE )
                {
                    outer_vertex[i+1][2] = m_radius - circle_y;
                    inner_vertex[i+1][2] = outer_vertex[i+1][2] + BORDER_LENGTH;
                }
                else
                {
                    outer_vertex[i+1][2] = 0;
                    inner_vertex[i+1][2] = outer_vertex[i+1][2] + BORDER_LENGTH;
                }

                glTexCoord2f(inner_vertex[i+1][0] / (float)m_width, inner_vertex[i+1][1] / (float)m_height);
                glVertex2f(inner_vertex[i+1][0] - HALF_WIDTH, inner_vertex[i+1][1] - HALF_HEIGHT);

                glTexCoord2f(inner_vertex[i+1][0] / (float)m_width, inner_vertex[i+1][2] / (float)m_height);
                glVertex2f(inner_vertex[i+1][0] - HALF_WIDTH, inner_vertex[i+1][2] - HALF_HEIGHT);
            }
        }
        glEnd();
    }
    glEndList();


    if(!glIsList(m_border_list))
    {
        m_border_list = glGenLists(1);
        if(m_border_list == 0)
        {
            std::cerr << "Error: could not create a widget's border list.\n";
            return false;
        }
    }

    glNewList(m_border_list, GL_COMPILE);
    {
        glBegin(GL_QUAD_STRIP);
        {
            for (i = NUM_QUADS * 2 + 1; i >= 0 ; --i)
            {
                glVertex2f(outer_vertex[i][0] - HALF_WIDTH, outer_vertex[i][1] - HALF_HEIGHT);
                glVertex2f(inner_vertex[i][0] - HALF_WIDTH, inner_vertex[i][1] - HALF_HEIGHT);
            }

            for (i = 0; i <= NUM_QUADS * 2 + 1; ++i)
            {
                glVertex2f(outer_vertex[i][0] - HALF_WIDTH, outer_vertex[i][2] - HALF_HEIGHT);
                glVertex2f(inner_vertex[i][0] - HALF_WIDTH, inner_vertex[i][2] - HALF_HEIGHT);
            }

            //Close the border
            glVertex2f(outer_vertex[NUM_QUADS * 2 + 1][0] - HALF_WIDTH, outer_vertex[NUM_QUADS * 2 + 1][1] - HALF_HEIGHT);
            glVertex2f(inner_vertex[NUM_QUADS * 2 + 1][0] - HALF_WIDTH, inner_vertex[NUM_QUADS * 2 + 1][1] - HALF_HEIGHT);
        }
        glEnd();

    }
    glEndList();

    return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void Widget::darkenColor ( ) [private]
void Widget::draw ( ) [private]

Definition at line 638 of file widget.cpp.

{
    glPushMatrix();

    glClear( GL_STENCIL_BUFFER_BIT );

    applyTransformations();

    /*Start handling on/off features*/
    if( m_enable_texture )
    {
        glEnable( GL_TEXTURE_2D );
        if( glIsTexture ( m_texture ))
        {
            glBindTexture( GL_TEXTURE_2D, m_texture );
        }
        else
        {
            std::cerr << "Warning: widget tried to draw null texture.\n";
            std::cerr << "(Did you set the texture?)\n";
        }
    }
    else
    {
        //This ensures that a texture from another module doesn't affects the widget
        glDisable ( GL_TEXTURE_2D );
    }

    if( glIsList ( m_rect_list ))
    {
        //m_enable_rect == false doesn't disables this chunk of code because
        //we still need to draw the rect into OpenGL's selection buffer even
        //if it's not visible

        //FIXME: maybe there is some sort of stacking method to disable/enable
        //color masking
        if(!m_enable_rect)
        {
            glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
        }
        else
        {
            glColor4fv(m_rect_color);
        }

        //FIXME: I should probably revert the values to the defaults within the widget manager
        //(if glPushAttrib() doesn't), but right now this is the only thing using the
        //stencil test anyways.
        glStencilFunc(GL_ALWAYS, 0x1, 0x1);
        glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
        glCallList(m_rect_list);

        if(!m_enable_rect)
        {
            glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
        }
    }
    else
    {
        std::cerr << "Warning: widget tried to draw null rect list.\n";
        std::cerr << "(Did you created the rect?)\n";
    }

    if(glIsList(m_border_list))
    {
        if( m_enable_border )
        {
            glDisable ( GL_TEXTURE_2D );
            glColor4fv(m_border_color);

            //FIXME: I should probably revert the values to the defaults within the widget manager
            //(if glPushAttrib() doesn't)
            glStencilFunc(GL_ALWAYS, 0x1, 0x1);
            glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
            glCallList(m_border_list);
        }
    }
    else
    {
        std::cerr << "Warning: widget tried to draw null border list.\n";
        std::cerr << "(Did you created the border?)\n";
    }

    if( m_enable_track )
    {
        if( m_track_num > (int)(track_manager->getTrackCount()) - 1)
        {
            std::cerr << "Warning: widget tried to draw a track with a " <<
                "number bigger than the amount of tracks available.\n";
        }

        if( m_track_num != -1 )
        {
            track_manager->getTrack( m_track_num )->drawScaled2D( 0.0f, 
                0.0f, (float)m_width, (float)m_height);
        }
        else
        {
            std::cerr << "Warning: widget tried to draw an unset track.\n";
        }
    }

    if(m_enable_text)
    {
        if(m_text.empty())
        {
            std::cerr << "Warning: widget tried to print an empty string.\n";
            std::cerr << "(Did you set the text?)\n";
        }


        //For multilines we have to do a *very* ugly workaround for a plib
        //bug which causes multiline strings to move to the left, at least
        //while centering, and also gives wrong values for the size of the
        //text when there are multiple lines. Hopefully this work around will
        //be removed when we move away from plib; the scrolling and the other
        //text handling should be cleaned. Also, for some reason, different
        //positions are needed if the text is centered, and on top of that,
        //it's not 100% exact. Sorry for the mess.
        size_t line_end = 0;
        int lines = 0;

        do
        {
            line_end = m_text.find_first_of('\n', line_end + 1);
            ++lines;
        } while( line_end != std::string::npos );


        int x_pos = (int)(m_scroll_pos_x - m_width * 0.5f);
        int y_pos = - (int)m_scroll_pos_y + (lines - 1 )* m_text_size / 2;

        size_t line_start = 0;
        bool draw;

        glStencilFunc(GL_EQUAL,0x1,0x1);
        glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
        do
        {
            draw = true;
            if(y_pos + m_text_size / 2 > m_height / 2 )
            {
                if(y_pos - m_text_size / 2 >  m_height / 2) draw = false;
            }
            else if(y_pos + (m_height - m_text_size) / 2 < 0)
            {
                if(y_pos + (m_height + m_text_size) / 2 < 0) draw = false;
            }

            line_end = m_text.find_first_of('\n', line_start);

            if( draw )
            {
                glScalef(m_text_scale, m_text_scale, 1.0f);
                m_font->PrintBold(m_text.substr(line_start, line_end - line_start).c_str(), 
                    m_text_size,
                    x_pos, y_pos - m_text_size / 2,
                    m_text_color, 1.0f, 1.0f);
                glScalef(1.0f/m_text_scale, 1.0f/m_text_scale, 1.0f);
            }

            y_pos -= m_text_size;
            line_start = line_end + 1;

        } while( line_end != std::string::npos );
    }
    glPopMatrix();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void Widget::lightenColor ( ) [private]
void Widget::pulse ( ) [inline, private]

Definition at line 198 of file widget.hpp.

void Widget::resizeToText ( ) [private]

Definition at line 111 of file widget.cpp.

{
    if( !m_text.empty() )
    {
        float left, right, bottom, top;
        m_font->getBBoxMultiLine(m_text, m_text_size, false, &left, &right, &bottom, &top);

        const int TEXT_WIDTH = (int)(right - left);
        const int TEXT_HEIGHT = (int)(top - bottom);

        if( TEXT_WIDTH > m_width ) m_width = TEXT_WIDTH;
        if( TEXT_HEIGHT > m_height ) m_height = TEXT_HEIGHT;
    }
}

Here is the call graph for this function:

void Widget::setFont ( const WidgetFont  FONT) [private]

Definition at line 235 of file widget.cpp.

{
    switch( FONT )
    {
        case WGT_FONT_GUI:
            m_font = font_gui;
            break;

        case WGT_FONT_RACE:
            m_font = font_race;
            break;
    };

    //TODO: the curr_widget_font variable exists only for a bug around; after
    //some restructuration, it should be fine to remove this.
    m_curr_widget_font = FONT;
}

Here is the caller graph for this function:

void Widget::setTexture ( const char *  FILENAME,
const bool  is_full_path = true 
) [private]

Definition at line 254 of file widget.cpp.

{
    Material *m = material_manager->getMaterial( FILENAME, is_full_path );
    m_texture = m->getState()->getTextureHandle();
}

Here is the call graph for this function:

void Widget::update ( const float  DELTA) [private]

Definition at line 104 of file widget.cpp.

{
    updateVariables( DELTA );
    draw();
}

Here is the call graph for this function:

void Widget::updateVariables ( const float  DELTA) [private]

Definition at line 491 of file widget.cpp.

{
    if( m_enable_rotation ) m_rotation_angle += m_rotation_speed * DELTA;

    /*Handle delta time dependent features*/
    if(m_text_scale > MIN_TEXT_SCALE)
    {
        m_text_scale -= MIN_TEXT_SCALE * DELTA;
        if(m_text_scale < MIN_TEXT_SCALE) m_text_scale = MIN_TEXT_SCALE;
    }


    //For multilines we have to do a *very* ugly workaround for a plib
    //bug which causes multiline strings to move to the left, at least
    //while centering, and also gives wrong values for the size of the
    //text when there are multiple lines. Hopefully this work around will
    //be removed when we move away from plib; the scrolling and the other
    //text handling should be cleaned. Also, for some reason, different
    //positions are needed if the text is centered, and on top of that,
    //it's not 100% exact. Sorry for the mess.
    size_t line_end = 0;
    int lines = 0;

    do
    {
        line_end = m_text.find_first_of('\n', line_end + 1);
        ++lines;
    } while( line_end != std::string::npos );


    /* Handle preset scrolling positions */
    // In the Y-axis, a scroll position of 0 leaves the text centered, and
    // positive values lowers the text, and negatives (obviously) raise the
    // text, in the X-axis, a position of 0 leaves the text aligned to the
    // left; positive values move to the right and negative
    // values to the left.

    float left, right;
    m_font->getBBoxMultiLine(m_text, m_text_size, false, &left, &right, NULL, NULL);
    int text_width = (int)(right - left + 0.99);


    const int Y_LIMIT = lines * m_text_size + m_height;

    //A work around for yet another bug with multilines: we get the wrong
    //width when using multilines.
    if( text_width > m_width )
    {
        text_width = m_width;
    }

    //With the preset positions, we do comparations with the equal sign on
    //floating point variables; however, no operations are done of the
    //variables between the assignment of these integer values and the
    //comparation and the values are small enough to fit in a few bytes,
    //so no inaccuracies because of floating point rounding should happen.
    //X-axis preset positions
    if( m_scroll_pos_x == WGT_SCROLL_START_LEFT )
    {
        m_scroll_pos_x = 0;
    }
    else if( m_scroll_pos_x == WGT_SCROLL_START_RIGHT )
    {
        m_scroll_pos_x = (float)m_width;
    }
    else if( m_scroll_pos_x == WGT_SCROLL_CENTER )
    {
        m_scroll_pos_x = (float)( (m_width - text_width) / 2 );
    }
    else if( m_scroll_pos_x == WGT_SCROLL_END_LEFT )
    {
        m_scroll_pos_x = (float)(-text_width);
    }
    else if( m_scroll_pos_x == WGT_SCROLL_END_RIGHT )
    {
        m_scroll_pos_x = (float)(m_width - text_width);
    }
    else if( m_scroll_pos_x > MAX_SCROLL )
    {
        std::cerr << "WARNING: text position is too much to the right to " <<
            "scroll!.\n";
    }
    else if( m_scroll_pos_x < -MAX_SCROLL )
    {
        std::cerr << "WARNING: text position is too much to the left to " <<
            "to scroll!.\n";
    }

    //Y-axis preset positions
    if( m_scroll_pos_y == WGT_SCROLL_START_TOP )
    {
        m_scroll_pos_y =(float)(Y_LIMIT / 2 - m_height);
    }
    else if( m_scroll_pos_y == WGT_SCROLL_START_BOTTOM )
    {
        m_scroll_pos_y = (float)(Y_LIMIT / 2);
    }
    else if( m_scroll_pos_y == WGT_SCROLL_CENTER )
    {
        m_scroll_pos_y = 0;
    }
    else if( m_scroll_pos_y == WGT_SCROLL_END_TOP )
    {
        m_scroll_pos_y = (float)(-Y_LIMIT / 2);
    }
    else if( m_scroll_pos_y == WGT_SCROLL_END_BOTTOM )
    {
        m_scroll_pos_y = (float)(-Y_LIMIT / 2 + m_height);
    }
    else if( m_scroll_pos_y > MAX_SCROLL )
    {
        std::cerr << "WARNING: text position too high to scroll!.\n";
    }
    else if( m_scroll_pos_y < -MAX_SCROLL )
    {
        std::cerr << "WARNING: text position too low to scroll!.\n";
    }

    if(m_enable_scroll)
    {
        //TODO: constrain speed to sane values
        m_scroll_pos_x += m_scroll_speed_x * DELTA;
        m_scroll_pos_y += m_scroll_speed_y * DELTA;

        //Y-axis wrapping
        if(m_scroll_pos_y * 2 > Y_LIMIT)
        {
            m_scroll_pos_y = WGT_SCROLL_END_TOP;
        }
        else if(-m_scroll_pos_y * 2 > Y_LIMIT)
        {
            m_scroll_pos_y = WGT_SCROLL_START_BOTTOM;
        }

        //X-axis wrapping
        if(m_scroll_pos_x > m_width )
        {
            m_scroll_pos_x = WGT_SCROLL_END_LEFT;
        }
        else if(m_scroll_pos_x < -text_width )
        {
            m_scroll_pos_x = WGT_SCROLL_START_RIGHT;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class WidgetManager [friend]

Definition at line 130 of file widget.hpp.


Member Data Documentation

const GLfloat* Widget::m_border_color [private]

Definition at line 148 of file widget.hpp.

GLuint Widget::m_border_list [private]

Definition at line 146 of file widget.hpp.

float Widget::m_border_percentage [private]

Definition at line 147 of file widget.hpp.

Definition at line 161 of file widget.hpp.

bool Widget::m_enable_border [private]

Definition at line 145 of file widget.hpp.

bool Widget::m_enable_rect [private]

Definition at line 138 of file widget.hpp.

bool Widget::m_enable_rotation [private]

Definition at line 170 of file widget.hpp.

bool Widget::m_enable_scroll [private]

Definition at line 164 of file widget.hpp.

bool Widget::m_enable_text [private]

Definition at line 153 of file widget.hpp.

bool Widget::m_enable_texture [private]

Definition at line 150 of file widget.hpp.

int Widget::m_enable_track [private]

Definition at line 177 of file widget.hpp.

Font* Widget::m_font [private]

Definition at line 156 of file widget.hpp.

int Widget::m_height [private]

Definition at line 134 of file widget.hpp.

int Widget::m_radius [private]

Definition at line 135 of file widget.hpp.

const GLfloat* Widget::m_rect_color [private]

Definition at line 141 of file widget.hpp.

GLuint Widget::m_rect_list [private]

Definition at line 139 of file widget.hpp.

float Widget::m_rotation_angle [private]

Definition at line 171 of file widget.hpp.

int Widget::m_rotation_speed [private]

Definition at line 172 of file widget.hpp.

Definition at line 143 of file widget.hpp.

float Widget::m_scroll_pos_x [private]

Definition at line 165 of file widget.hpp.

float Widget::m_scroll_pos_y [private]

Definition at line 166 of file widget.hpp.

int Widget::m_scroll_speed_x [private]

Definition at line 167 of file widget.hpp.

int Widget::m_scroll_speed_y [private]

Definition at line 168 of file widget.hpp.

std::string Widget::m_text [private]

Definition at line 154 of file widget.hpp.

const GLfloat* Widget::m_text_color [private]

Definition at line 157 of file widget.hpp.

float Widget::m_text_scale [private]

Definition at line 184 of file widget.hpp.

Definition at line 155 of file widget.hpp.

GLuint Widget::m_texture [private]

Definition at line 151 of file widget.hpp.

int Widget::m_track_num [private]

Definition at line 178 of file widget.hpp.

int Widget::m_width [private]

Definition at line 134 of file widget.hpp.

int Widget::m_x [private]

Definition at line 133 of file widget.hpp.

int Widget::m_y [private]

Definition at line 133 of file widget.hpp.

const int Widget::MAX_SCROLL = 1000000 [static, private]

Definition at line 163 of file widget.hpp.

const float Widget::MAX_TEXT_SCALE = 1.2f [static, private]

Definition at line 182 of file widget.hpp.

const float Widget::MIN_TEXT_SCALE = 1.0f [static, private]

Definition at line 183 of file widget.hpp.


The documentation for this class was generated from the following files: