Ticket #3905: 3905_COList_refresh_v3.patch

File 3905_COList_refresh_v3.patch, 21.3 KB (added by Imarok, 8 years ago)

Remove every "def". Store the selected column string instead of the selected column index. Some cleanup

  • binaries/data/mods/mod/gui/gui.rnc

     
    122122    ((object
    123123      | action
    124124      | \attribute
    125       | def
     125      | column
    126126      | \include
    127127      | item
    128128      | repeat
     
    143143    (keep | translate)*,
    144144    attribute id { text }
    145145  }
    146 def =
    147   element def {
     146column =
     147  element column {
    148148    translatableAttribute?,
    149149    (
    150150    attribute id { text }&
  • binaries/data/mods/mod/gui/gui.rng

     
    446446            <ref name="object"/>
    447447            <ref name="action"/>
    448448            <ref name="attribute"/>
    449             <ref name="def"/>
     449            <ref name="column"/>
    450450            <ref name="include"/>
    451451            <ref name="item"/>
    452452            <ref name="repeat"/>
     
    480480      <attribute name="id"/>
    481481    </element>
    482482  </define>
    483   <define name="def">
    484     <element name="def">
     483  <define name="column">
     484    <element name="column">
    485485      <optional>
    486486        <ref name="translatableAttribute"/>
    487487      </optional>
  • binaries/data/mods/mod/gui/modmod/modmod.xml

     
    8989            <object name="modsAvailableList" style="ModernList" type="olist" size="0 25 100%-2 100%" font="sans-stroke-13">
    9090                <action on="SelectionChange">showModDescription(this.name);</action>
    9191                <!-- List headers -->
    92                 <def id="name" color="100 100 200" width="10%">
     92                <column id="name" color="100 100 200" width="10%">
    9393                    <translatableAttribute id="heading">Name</translatableAttribute>
    94                 </def>
    95                 <def id="modVersion" color="128 128 128" width="7%">
     94                </column>
     95                <column id="modVersion" color="128 128 128" width="7%">
    9696                    <translatableAttribute id="heading">Version</translatableAttribute>
    97                 </def>
    98                 <def id="modFolderName" color="100 100 200" width="13%">
     97                </column>
     98                <column id="modFolderName" color="100 100 200" width="13%">
    9999                    <translatableAttribute id="heading">(Folder)</translatableAttribute>
    100                 </def>
    101                 <def id="modLabel" color="0 60 0" width="18%">
     100                </column>
     101                <column id="modLabel" color="0 60 0" width="18%">
    102102                    <translatableAttribute id="heading">Mod Label</translatableAttribute>
    103                 </def>
    104                 <def id="modType" color="0 128 128" width="12%">
     103                </column>
     104                <column id="modType" color="0 128 128" width="12%">
    105105                    <translatableAttribute id="heading">Mod Type</translatableAttribute>
    106                 </def>
    107                 <def id="modDependencies" color="128 128 128" width="20%">
     106                </column>
     107                <column id="modDependencies" color="128 128 128" width="20%">
    108108                    <translatableAttribute id="heading">Dependencies</translatableAttribute>
    109                 </def>
    110                 <def id="modURL" color="128 128 128" width="24%">
     109                </column>
     110                <column id="modURL" color="128 128 128" width="24%">
    111111                    <translatableAttribute id="heading">Website</translatableAttribute>
    112                 </def>
     112                </column>
    113113            </object>
    114114            <object name="globalModDescription" type="text" style="ModmodScrollbar" size="0 100%-28 100%-16 100%">
    115115                <attribute id="caption"><keep>[color="100 100 100"]</keep><translate>Description</translate><keep>[/color]</keep></attribute>
     
    130130            <object name="modsEnabledList" style="ModernList" type="olist" size="0 25 96%-5 100%" font="sans-stroke-13" tooltip_style="pgToolTip">
    131131                <action on="SelectionChange">showModDescription(this.name);</action>
    132132                <!-- List headers -->
    133                 <def id="name" color="100 100 200" width="10%">
     133                <column id="name" color="100 100 200" width="10%">
    134134                    <translatableAttribute id="heading">Name</translatableAttribute>
    135                 </def>
    136                 <def id="modVersion" color="128 128 128" width="7%">
     135                </column>
     136                <column id="modVersion" color="128 128 128" width="7%">
    137137                    <translatableAttribute id="heading">Version</translatableAttribute>
    138                 </def>
    139                 <def id="modFolderName" color="100 100 200" width="13%">
     138                </column>
     139                <column id="modFolderName" color="100 100 200" width="13%">
    140140                    <translatableAttribute id="heading">(Folder)</translatableAttribute>
    141                 </def>
    142                 <def id="modLabel" color="0 60 0" width="18%">
     141                </column>
     142                <column id="modLabel" color="0 60 0" width="18%">
    143143                    <translatableAttribute id="heading">Mod Label</translatableAttribute>
    144                 </def>
    145                 <def id="modType" color="0 128 128" width="12%">
     144                </column>
     145                <column id="modType" color="0 128 128" width="12%">
    146146                    <translatableAttribute id="heading">Mod Type</translatableAttribute>
    147                 </def>
    148                 <def id="modDependencies" color="128 128 128" width="20%">
     147                </column>
     148                <column id="modDependencies" color="128 128 128" width="20%">
    149149                    <translatableAttribute id="heading">Dependencies</translatableAttribute>
    150                 </def>
    151                 <def id="modURL" color="128 128 128" width="20%">
     150                </column>
     151                <column id="modURL" color="128 128 128" width="20%">
    152152                    <translatableAttribute id="heading">Website</translatableAttribute>
    153                 </def>
     153                </column>
    154154            </object>
    155155
    156156            <object type="button" style="ModernButtonRed" size="96% 23 100% 40%+12">
  • binaries/data/mods/public/gui/lobby/lobby.xml

     
    2424        <!-- Left panel: Player list. -->
    2525        <object name="leftPanel" size="20 30 20% 100%-280">
    2626            <object name="playersBox" style="ModernList" sprite_asc="ModernArrowDown" default_column="name" default_column_order="1" sprite_desc="ModernArrowUp" sprite_not_sorted="ModernNotSorted" type="olist" sortable="true" size="0 0 100% 100%" font="sans-bold-stroke-13">
    27                 <def id="status" width="26%">
     27                <column id="status" width="26%">
    2828                    <translatableAttribute id="heading">Status</translatableAttribute>
    29                 </def>
    30                 <def id="name" width="48%">
     29                </column>
     30                <column id="name" width="48%">
    3131                    <translatableAttribute id="heading">Name</translatableAttribute>
    32                 </def>
    33                 <def id="rating" width="26%">
     32                </column>
     33                <column id="rating" width="26%">
    3434                    <translatableAttribute id="heading">Rating</translatableAttribute>
    35                 </def>
     35                </column>
    3636                <action on="SelectionChange">
    3737                    displayProfile("lobbylist");
    3838                </action>
     
    176176                <action on="SelectionChange">updateGameSelection();</action>
    177177                <action on="SelectionColumnChange">applyFilters();</action>
    178178                <action on="mouseleftdoubleclickitem">joinButton();</action>
    179                 <def id="name" color="0 60 0" width="27%">
     179                <column id="name" color="0 60 0" width="27%">
    180180                    <translatableAttribute id="heading">Name</translatableAttribute>
    181                 </def>
    182                 <!--<def id="ip" heading="IP" color="0 128 128" width="170"/>-->
    183                 <def id="mapName" color="128 128 128" width="25%">
     181                </column>
     182                <!--<column id="ip" heading="IP" color="0 128 128" width="170"/>-->
     183                <column id="mapName" color="128 128 128" width="25%">
    184184                    <translatableAttribute id="heading">Map Name</translatableAttribute>
    185                 </def>
    186                 <def id="mapSize" color="128 128 128" width="16%">
     185                </column>
     186                <column id="mapSize" color="128 128 128" width="16%">
    187187                    <translatableAttribute id="heading" context="map">Size</translatableAttribute>
    188                 </def>
    189                 <def id="mapType" color="0 128 128" width="16%">
     188                </column>
     189                <column id="mapType" color="0 128 128" width="16%">
    190190                    <translatableAttribute id="heading" context="map">Type</translatableAttribute>
    191                 </def>
    192                 <def id="nPlayers" color="0 128 128" width="16%">
     191                </column>
     192                <column id="nPlayers" color="0 128 128" width="16%">
    193193                    <translatableAttribute id="heading">Players</translatableAttribute>
    194                 </def>
     194                </column>
    195195            </object>
    196196
    197197            <object name="filterPanel" size="0 0 100% 24">
     
    254254                style="ModernList"
    255255                type="olist"
    256256                size="19 19 100%-19 100%-62">
    257                 <def id="rank" color="255 255 255" width="15%">
     257                <column id="rank" color="255 255 255" width="15%">
    258258                    <translatableAttribute id="heading">Rank</translatableAttribute>
    259                 </def>
    260                 <def id="name" color="255 255 255" width="55%">
     259                </column>
     260                <column id="name" color="255 255 255" width="55%">
    261261                    <translatableAttribute id="heading">Name</translatableAttribute>
    262                 </def>
    263                 <def id="rating" color="255 255 255" width="30%">
     262                </column>
     263                <column id="rating" color="255 255 255" width="30%">
    264264                    <translatableAttribute id="heading">Rating</translatableAttribute>
    265                 </def>
     265                </column>
    266266                <action on="SelectionChange">
    267267                    displayProfile("leaderboard");
    268268                </action>
  • binaries/data/mods/public/gui/replaymenu/replay_menu.xml

     
    7171
    7272                <!-- Columns -->
    7373                <!-- We have to call one "name" as the GUI expects one. -->
    74                 <def id="name" color="172 172 212" width="12%">
     74                <column id="name" color="172 172 212" width="12%">
    7575                    <translatableAttribute id="heading" context="replay">Date / Time</translatableAttribute>
    76                 </def>
     76                </column>
    7777
    78                 <def id="players" color="192 192 192" width="44%">
     78                <column id="players" color="192 192 192" width="44%">
    7979                    <translatableAttribute id="heading" context="replay">Players</translatableAttribute>
    80                 </def>
     80                </column>
    8181
    82                 <def id="mapName" color="192 192 192" width="14%">
     82                <column id="mapName" color="192 192 192" width="14%">
    8383                    <translatableAttribute id="heading" context="replay">Map Name</translatableAttribute>
    84                 </def>
     84                </column>
    8585
    86                 <def id="mapSize" color="192 192 192" width="10%">
     86                <column id="mapSize" color="192 192 192" width="10%">
    8787                    <translatableAttribute id="heading" context="replay">Size</translatableAttribute>
    88                 </def>
     88                </column>
    8989
    90                 <def id="popCapacity" color="192 192 192" width="10%">
     90                <column id="popCapacity" color="192 192 192" width="10%">
    9191                    <translatableAttribute id="heading" context="replay">Population</translatableAttribute>
    92                 </def>
     92                </column>
    9393
    94                 <def id="duration" color="192 192 192" width="10%">
     94                <column id="duration" color="192 192 192" width="10%">
    9595                    <translatableAttribute id="heading" context="replay">Duration</translatableAttribute>
    96                 </def>
     96                </column>
    9797
    9898            </object>
    9999
  • source/gui/COList.cpp

     
    2424#include "soundmanager/ISoundManager.h"
    2525
    2626COList::COList()
    27     : CList(), m_HeadingHeight(30.f), m_SelectedDef(-1), m_SelectedColumnOrder(0)
     27    : CList(), m_HeadingHeight(30.f), m_SelectedColumn(""), m_SelectedColumnOrder(0)
    2828{
    2929    AddSetting(GUIST_CGUISpriteInstance,    "sprite_heading");
    3030    AddSetting(GUIST_bool,                  "sortable"); // The actual sorting is done in JS for more versatility
     
    3232    AddSetting(GUIST_int,                   "selected_column_order");
    3333    AddSetting(GUIST_CStr,                  "default_column");
    3434    AddSetting(GUIST_int,                   "default_column_order");
    35     AddSetting(GUIST_int,                   "selected_def");
    3635    AddSetting(GUIST_CGUISpriteInstance,    "sprite_asc");  // Show the order of sorting
    3736    AddSetting(GUIST_CGUISpriteInstance,    "sprite_desc");
    3837    AddSetting(GUIST_CGUISpriteInstance,    "sprite_not_sorted");
     
    3938
    4039    GUI<CStr>::SetSetting(this, "selected_column", "");
    4140    GUI<int>::SetSetting(this, "selected_column_order", 0);
    42     GUI<int>::SetSetting(this, "selected_def", -1);
    4341}
    4442
    4543void COList::SetupText()
     
    7371    if (scrollbar && GetScrollBar(0).GetStyle())
    7472        width -= GetScrollBar(0).GetStyle()->m_Width;
    7573
    76     m_TotalAvalibleColumnWidth = width;
     74    m_TotalAvailbleColumnWidth = width;
    7775
    7876    float buffer_zone = 0.f;
    7977    GUI<float>::GetSetting(this, "buffer_zone", buffer_zone);
    8078
    81     CStr defaultColumn;
    82     GUI<CStr>::GetSetting(this, "default_column", defaultColumn);
    83     defaultColumn = "list_" + defaultColumn;
    84 
    85     for (size_t c = 0; c < m_ObjectsDefs.size(); ++c)
     79    for (COListColumn column : m_Columns)
    8680    {
    8781        SGUIText* text = new SGUIText();
    8882        CGUIString gui_string;
    89         gui_string.SetValue(m_ObjectsDefs[c].m_Heading);
     83        gui_string.SetValue(column.m_Heading);
    9084        *text = GetGUI()->GenerateText(gui_string, font, width, buffer_zone, this);
    9185        AddText(text);
    92 
    93         if (m_SelectedDef == (size_t)-1 && defaultColumn == m_ObjectsDefs[c].m_Id)
    94             m_SelectedDef = c;
    9586    }
    9687
    97     if (m_SelectedDef != (size_t)-1)
    98         GUI<CStr>::SetSetting(this, "selected_column", m_ObjectsDefs[m_SelectedDef].m_Id.substr(5));
     88    if (m_SelectedColumn == "")
     89        GUI<CStr>::GetSetting(this, "default_column", m_SelectedColumn);
    9990
     91    if (m_SelectedColumn != "")
     92        GUI<CStr>::SetSetting(this, "selected_column", m_SelectedColumn);
     93
    10094    if (m_SelectedColumnOrder == 0)
    10195    {
    10296        GUI<int>::GetSetting(this, "default_column_order", m_SelectedColumnOrder);
     
    109103    for (size_t i = 0; i < pList->m_Items.size(); ++i)
    110104    {
    111105        m_ItemsYPositions[i] = buffered_y;
    112         for (size_t c = 0; c < m_ObjectsDefs.size(); ++c)
     106        for (size_t c = 0; c < m_Columns.size(); ++c)
    113107        {
    114108            CGUIList* pList_c;
    115             GUI<CGUIList>::GetSettingPointer(this, m_ObjectsDefs[c].m_Id, pList_c);
     109            GUI<CGUIList>::GetSettingPointer(this, "list_" + m_Columns[c].m_Id, pList_c);
    116110            SGUIText* text = new SGUIText();
    117111            *text = GetGUI()->GenerateText(pList_c->m_Items[i], font, width, buffer_zone, this);
    118112            if (c == 0)
     
    147141
    148142    switch (Message.type)
    149143    {
     144    case GUIM_SETTINGS_UPDATED:
     145        {
     146            if (Message.value == "selected_column_order")
     147                GUI<int>::GetSetting(this, "selected_column_order", m_SelectedColumnOrder);
     148            else if (Message.value == "selected_column")
     149                GUI<CStr>::GetSetting(this, "selected_column", m_SelectedColumn);
     150            return;
     151        }
    150152    // If somebody clicks on the column heading
    151153    case GUIM_MOUSE_PRESS_LEFT:
    152154    {
     
    160162            return;
    161163
    162164        float xpos = 0;
    163         for (size_t def = 0; def < m_ObjectsDefs.size(); ++def)
     165        for (COListColumn column : m_Columns)
    164166        {
    165             float width = m_ObjectsDefs[def].m_Width;
     167            float width = column.m_Width;
    166168            // Check if it's a decimal value, and if so, assume relative positioning.
    167             if (m_ObjectsDefs[def].m_Width < 1 && m_ObjectsDefs[def].m_Width > 0)
    168                 width *= m_TotalAvalibleColumnWidth;
     169            if (column.m_Width < 1 && column.m_Width > 0)
     170                width *= m_TotalAvailbleColumnWidth;
    169171            CPos leftTopCorner = m_CachedActualSize.TopLeft() + CPos(xpos, 0);
    170172            if (mouse.x >= leftTopCorner.x &&
    171173                mouse.x < leftTopCorner.x + width &&
    172174                mouse.y < leftTopCorner.y + m_HeadingHeight)
    173175            {
    174                 if (def != m_SelectedDef)
     176                if (column.m_Id != m_SelectedColumn)
    175177                {
    176178                    m_SelectedColumnOrder = 1;
    177                     m_SelectedDef = def;
     179                    m_SelectedColumn = column.m_Id;
    178180                }
    179181                else
    180182                    m_SelectedColumnOrder = -m_SelectedColumnOrder;
    181                 GUI<CStr>::SetSetting(this, "selected_column", m_ObjectsDefs[def].m_Id.substr(5));
     183                GUI<CStr>::SetSetting(this, "selected_column", column.m_Id);
    182184                GUI<int>::SetSetting(this, "selected_column_order", m_SelectedColumnOrder);
    183                 GUI<int>::SetSetting(this, "selected_def", def);
    184185                ScriptEvent("selectioncolumnchange");
    185186
    186187                CStrW soundPath;
     
    203204    #define ELMT(x) int elmt_##x = pFile->GetElementID(#x)
    204205    #define ATTR(x) int attr_##x = pFile->GetAttributeID(#x)
    205206    ELMT(item);
    206     ELMT(def);
     207    ELMT(column);
    207208    ELMT(translatableAttribute);
    208209    ATTR(id);
    209210    ATTR(context);
     
    213214        AddItem(child.GetText().FromUTF8(), child.GetText().FromUTF8());
    214215        return true;
    215216    }
    216     else if (child.GetNodeName() == elmt_def)
     217    else if (child.GetNodeName() == elmt_column)
    217218    {
    218         ObjectDef oDef;
     219        COListColumn column;
    219220
    220221        for (XMBAttribute attr : child.GetAttributes())
    221222        {
     
    227228                CColor color;
    228229                if (!GUI<CColor>::ParseString(attr_value.FromUTF8(), color))
    229230                    LOGERROR("GUI: Error parsing '%s' (\"%s\")", attr_name.c_str(), attr_value.c_str());
    230                 else oDef.m_TextColor = color;
     231                else column.m_TextColor = color;
    231232            }
    232233            else if (attr_name == "id")
    233234            {
    234                 oDef.m_Id = "list_"+attr_value;
     235                column.m_Id = attr_value;
    235236            }
    236237            else if (attr_name == "width")
    237238            {
     
    243244                    // Check if it's a relative value, and save as decimal if so.
    244245                    if (attr_value.find("%") != std::string::npos)
    245246                        width = width / 100.f;
    246                     oDef.m_Width = width;
     247                    column.m_Width = width;
    247248                }
    248249            }
    249250            else if (attr_name == "heading")
    250251            {
    251                 oDef.m_Heading = attr_value.FromUTF8();
     252                column.m_Heading = attr_value.FromUTF8();
    252253            }
    253254        }
    254255
     
    258259                continue;
    259260
    260261            CStr attributeName(grandchild.GetAttributes().GetNamedItem(attr_id));
    261             // only the heading is translatable for list defs
     262            // only the heading is translatable for list column
    262263            if (attributeName.empty() || attributeName != "heading")
    263264            {
    264                 LOGERROR("GUI: translatable attribute in olist def that isn't a heading. (object: %s)", this->GetPresentableName().c_str());
     265                LOGERROR("GUI: translatable attribute in olist column that isn't a heading. (object: %s)", this->GetPresentableName().c_str());
    265266                continue;
    266267            }
    267268
     
    273274            if (!context.empty())
    274275            {
    275276                CStr translatedValue(g_L10n.TranslateWithContext(context, value));
    276                 oDef.m_Heading = translatedValue.FromUTF8();
     277                column.m_Heading = translatedValue.FromUTF8();
    277278            }
    278279            else
    279280            {
    280281                CStr translatedValue(g_L10n.Translate(value));
    281                 oDef.m_Heading = translatedValue.FromUTF8();
     282                column.m_Heading = translatedValue.FromUTF8();
    282283            }
    283284        }
    284285
    285         m_ObjectsDefs.push_back(oDef);
     286        m_Columns.push_back(column);
    286287
    287         AddSetting(GUIST_CGUIList, oDef.m_Id);
     288        AddSetting(GUIST_CGUIList, "list_" + column.m_Id);
    288289        SetupText();
    289290
    290291        return true;
     
    380381
    381382    // Draw column headers
    382383    float xpos = 0;
    383     for (size_t def = 0; def < m_ObjectsDefs.size(); ++def)
     384    for (size_t col = 0; col < m_Columns.size(); ++col)
    384385    {
    385386        // Check if it's a decimal value, and if so, assume relative positioning.
    386         float width = m_ObjectsDefs[def].m_Width;
    387         if (m_ObjectsDefs[def].m_Width < 1 && m_ObjectsDefs[def].m_Width > 0)
    388             width *= m_TotalAvalibleColumnWidth;
     387        float width = m_Columns[col].m_Width;
     388        if (m_Columns[col].m_Width < 1 && m_Columns[col].m_Width > 0)
     389            width *= m_TotalAvailbleColumnWidth;
    389390
    390391        CPos leftTopCorner = m_CachedActualSize.TopLeft() + CPos(xpos, 0);
    391392
    392393        CGUISpriteInstance* sprite;
    393394        // If the list sorted by current column
    394         if (m_SelectedDef == def)
     395        if (m_SelectedColumn == m_Columns[col].m_Id)
    395396            sprite = sprite_order;
    396397        else
    397398            sprite = sprite_not_sorted;
     
    400401        GetGUI()->DrawSprite(*sprite, cell_id, bz + 0.1f, CRect(leftTopCorner + CPos(width - 16, 0), leftTopCorner + CPos(width, 16)));
    401402
    402403        // Draw column header text
    403         DrawText(def, color, leftTopCorner + CPos(0, 4), bz + 0.1f, rect_head);
     404        DrawText(col, color, leftTopCorner + CPos(0, 4), bz + 0.1f, rect_head);
    404405        xpos += width;
    405406    }
    406407
    407408    // Draw list items for each column
    408     const size_t objectsCount = m_ObjectsDefs.size();
     409    const size_t objectsCount = m_Columns.size();
    409410    for (size_t i = 0; i < pList->m_Items.size(); ++i)
    410411    {
    411412        if (m_ItemsYPositions[i+1] - scroll < 0 ||
     
    430431
    431432        // Draw all items for that column
    432433        xpos = 0;
    433         for (size_t def = 0; def < objectsCount; ++def)
     434        for (size_t col = 0; col < objectsCount; ++col)
    434435        {
    435436            // Determine text position and width
    436437            const CPos textPos = rect.TopLeft() + CPos(xpos, -scroll + m_ItemsYPositions[i]);
    437438
    438             float width = m_ObjectsDefs[def].m_Width;;
     439            float width = m_Columns[col].m_Width;;
    439440            // Check if it's a decimal value, and if so, assume relative positioning.
    440             if (m_ObjectsDefs[def].m_Width < 1 && m_ObjectsDefs[def].m_Width > 0)
    441                 width *= m_TotalAvalibleColumnWidth;
     441            if (m_Columns[col].m_Width < 1 && m_Columns[col].m_Width > 0)
     442                width *= m_TotalAvailbleColumnWidth;
    442443
    443444            // Clip text to the column (to prevent drawing text into the neighboring column)
    444445            CRect cliparea2 = cliparea;
     
    446447            cliparea2.bottom = std::min(cliparea2.bottom, textPos.y + rowHeight);
    447448
    448449            // Draw list item
    449             DrawText(objectsCount * (i+/*Heading*/1) + def, m_ObjectsDefs[def].m_TextColor, textPos, bz+0.1f, cliparea2);
     450            DrawText(objectsCount * (i +/*Heading*/1) + col, m_Columns[col].m_TextColor, textPos, bz + 0.1f, cliparea2);
    450451            xpos += width;
    451452        }
    452453    }
  • source/gui/COList.h

     
    2323/**
    2424 * Represents a column.
    2525 */
    26 struct ObjectDef
     26struct COListColumn
    2727{
    2828  CColor m_TextColor;
    2929  CStr m_Id;
     
    6363    /**
    6464     * Available columns.
    6565     */
    66     std::vector<ObjectDef> m_ObjectsDefs;
     66    std::vector<COListColumn> m_Columns;
    6767
    6868    /**
    6969     * Index of the selected column.
    7070     */
    71     size_t m_SelectedDef;
     71    CStr m_SelectedColumn;
    7272
    7373    /**
    7474     * +1 for ascending, -1 for descending sort order.
     
    7777
    7878private:
    7979    float m_HeadingHeight;
    80     // Width of space avalible for columns
    81     float m_TotalAvalibleColumnWidth;
     80    // Width of space availble for columns
     81    float m_TotalAvailbleColumnWidth;
    8282};
    8383
    8484#endif // INCLUDED_COLIST