Torque3D Documentation / _generateds / guiTextListCtrl.cpp

guiTextListCtrl.cpp

Engine/source/gui/controls/guiTextListCtrl.cpp

More...

Public Variables

Public Functions

ConsoleDocClass(GuiTextListCtrl , "@brief GUI <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> that displays <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> list of text. Text items in the list can be individually <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" " <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/class/classguitextlistctrl/">GuiTextListCtrl</a>(EndGameGuiList)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " {\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "			columns = \"0 256\";\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "	        fitParentWidth = \"1\";\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "			clipColumnText = \"0\";\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "		    //Properties not specific <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> this <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> have been omitted from this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">example.\n</a>" "		};\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n\n</a>" "@see <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Reference\n\n</a>" "@ingroup <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">GuiControls\n</a>" )
DefineEngineMethod(GuiTextListCtrl , addRow , S32 , (S32 id, const char *text, S32 index) , (0,"",-1) , "@brief Adds <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> row at end of the list with the defined <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> and <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">text.\n</a>" "If index is used, then the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> row is inserted at the row location of 'index'.\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" " @param <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> Id of the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">row.\n</a>" " @param text Text <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> display at the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">row.\n</a>" " @param index Index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> insert the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> row at. If not used, <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> row will be placed at the end of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">list.\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id\n</a>" "% id)
DefineEngineMethod(GuiTextListCtrl , clear , void , () , "@brief Clear the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">list.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Inform the <a href="/coding/class/classguitextlistctrl/">GuiTextListCtrl</a> <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> clear its <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">contents\n</a>" "%thisGuiTextListCtrl.clear();\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n\n</a>" "@see <a href="/coding/class/classguicontrol/">GuiControl</a>" )
DefineEngineMethod(GuiTextListCtrl , clearSelection , void , () , "@brief Set the selection <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">nothing.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Deselect anything that is currently <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected\n</a>" "%thisGuiTextListCtrl.clearSelection();\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n\n</a>" "@see <a href="/coding/class/classguicontrol/">GuiControl</a>" )
DefineEngineMethod(GuiTextListCtrl , findTextIndex , S32 , (const char *needle) , "@brief Find needle in the list, and return the row number it was found <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">in.\n\n</a>" " @param needle Text <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> find in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">list.\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Define the text <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> find in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">list\n</a>" "% needle)
DefineEngineMethod(GuiTextListCtrl , getRowId , S32 , (S32 index) , "@brief Get the row ID <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> an <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">index.\n\n</a>" "@param index Index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> get the RowID <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">at\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">index\n</a>" "% index)
DefineEngineMethod(GuiTextListCtrl , getRowNumById , S32 , (S32 id) , "@brief Get the row number <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id.\n\n</a>" "@param <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> get the row number <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">at\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id\n</a>" "% id)
DefineEngineMethod(GuiTextListCtrl , getRowText , const char * , (S32 index) , "@brief Get the text of the row with the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">index.\n\n</a>" "@param index Row index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> acquire the text <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">at.\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the row <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">index\n</a>" "% index)
DefineEngineMethod(GuiTextListCtrl , getRowTextById , const char * , (S32 id) , "@brief Get the text of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> row with the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id\n</a>" "% id)
DefineEngineMethod(GuiTextListCtrl , getSelectedId , S32 , () )
DefineEngineMethod(GuiTextListCtrl , getSelectedRow , S32 , () )
DefineEngineMethod(GuiTextListCtrl , isRowActive , bool , (S32 rowNum) , "@brief Check <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the specified row is currently active or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n\n</a>" "@param rowNum Row number <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> check the active <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">state.\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the row <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">number\n</a>" "% rowNum)
DefineEngineMethod(GuiTextListCtrl , removeRow , void , (S32 index) , "@brief Remove <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> row from the table, based on its <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">index.\n\n</a>" " @param index Row index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> remove from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">list.\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Define the row <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">index\n</a>" "% index)
DefineEngineMethod(GuiTextListCtrl , removeRowById , void , (S32 id) , "@brief Remove row with the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id.\n\n</a>" "@param <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> remove the row entry <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">at\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id\n</a>" "% id)
DefineEngineMethod(GuiTextListCtrl , scrollVisible , void , (S32 rowNum) , "@brief Scroll so the specified row is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">visible\n\n</a>" "@param rowNum Row number <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> make <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">visible\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the row number <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> make <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">visible\n</a>" "% rowNum)
DefineEngineMethod(GuiTextListCtrl , setRowActive , void , (S32 rowNum, bool active) , "@brief Mark <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> specified row as active/<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n\n</a>" "@param rowNum Row number <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> change the active <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">state.\n</a>" "@param active Boolean active state <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> set the row <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">number.\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the row <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">number\n</a>" "% rowNum)
DefineEngineMethod(GuiTextListCtrl , setRowById , void , (S32 id, const char *text) , "@brief Sets the text at the defined <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id.\n\n</a>" "@param <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">change.\n</a>" "@param text Text <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> use at the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Id.\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id\n</a>" "% id)
DefineEngineMethod(GuiTextListCtrl , setSelectedById , void , (S32 id) , "@brief Finds the specified entry by id, then marks its row as <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected.\n\n</a>" " @param <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> Entry within the text list <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> make <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected.\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id\n</a>" "% id)
DefineEngineMethod(GuiTextListCtrl , setSelectedRow , void , (S32 rowNum) , "@briefSelects the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">row.\n\n</a>" "@param rowNum Row number <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> set <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected.\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the row number <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> set <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected\n</a>" "% rowNum)
DefineEngineMethod(GuiTextListCtrl , sort , void , (S32 columnId, bool increasing) , (true) , "@brief Performs <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> standard (alphabetical) sort on the values in the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">column.\n\n</a>" "@param columnId Column ID <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> perform the sort <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">on.\n</a>" "@param increasing If false, sort will be performed in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">reverse.\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">columnId\n</a>" "% id)
DefineEngineMethod(GuiTextListCtrl , sortNumerical , void , (S32 columnID, bool increasing) , (true) , "@brief Perform <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> numerical sort on the values in the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">column.\n\n</a>" "Detailed <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">description\n\n</a>" "@param columnId Column ID <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> perform the sort <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">on.\n</a>" "@param increasing If false, sort will be performed in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">reverse.\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">columnId\n</a>" "% id)
const char *
getColumn(const char * text)
IMPLEMENT_CALLBACK(GuiTextListCtrl , onDeleteKey , void , (S32 id) , (id) , "@brief Called when the delete key has been <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pressed.\n\n</a>" "@param <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> Id of the selected item in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">list\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// The delete key was pressed <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a0e48c1f64b558d03d870367324920354">while</a> the <a href="/coding/class/classguitextlistctrl/">GuiTextListCtrl</a> was in focus, causing the callback <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">occur.\n</a>" "GuiTextListCtrl::onDeleteKey(%this,%<a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a>)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " {\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "//Code <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> run when the delete key is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pressed\n</a>" " }\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n\n</a>" " @see <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">GuiControl\n\n</a>" )
IMPLEMENT_CALLBACK(GuiTextListCtrl , onSelect , void , (S32 cellid, const char *text) , (cellid, text) , "@brief Called whenever an item in the list is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected.\n\n</a>" "@param cellid The ID of the cell that was <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected\n</a>" "@param text The text in the selected <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">cel\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// A cel in the <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> was selected, causing the callback <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">occur\n</a>" "<a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1adfb6d6e76af82063022d153c28e5f7a8">GuiTextListCtrl::onSelect</a>(%this,%callid,%text)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " {\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "//Code <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> run when <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> cel item is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected\n</a>" " }\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n\n</a>" " @see <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">GuiControl\n\n</a>" )

Detailed Description

Public Variables

bool sIncreasing 
S32 sortColumn 

Public Functions

ConsoleDocClass(GuiTextListCtrl , "@brief GUI <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> that displays <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> list of text. Text items in the list can be individually <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" " <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/class/classguitextlistctrl/">GuiTextListCtrl</a>(EndGameGuiList)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " {\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "			columns = \"0 256\";\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "	        fitParentWidth = \"1\";\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "			clipColumnText = \"0\";\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "		    //Properties not specific <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> this <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> have been omitted from this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">example.\n</a>" "		};\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n\n</a>" "@see <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Reference\n\n</a>" "@ingroup <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">GuiControls\n</a>" )

DefineEngineMethod(GuiTextListCtrl , addRow , S32 , (S32 id, const char *text, S32 index) , (0,"",-1) , "@brief Adds <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> row at end of the list with the defined <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> and <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">text.\n</a>" "If index is used, then the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> row is inserted at the row location of 'index'.\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" " @param <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> Id of the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">row.\n</a>" " @param text Text <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> display at the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">row.\n</a>" " @param index Index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> insert the <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> row at. If not used, <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> row will be placed at the end of the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">list.\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id\n</a>" "% id)

DefineEngineMethod(GuiTextListCtrl , clear , void , () , "@brief Clear the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">list.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Inform the <a href="/coding/class/classguitextlistctrl/">GuiTextListCtrl</a> <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> clear its <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">contents\n</a>" "%thisGuiTextListCtrl.clear();\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n\n</a>" "@see <a href="/coding/class/classguicontrol/">GuiControl</a>" )

DefineEngineMethod(GuiTextListCtrl , clearSelection , void , () , "@brief Set the selection <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">nothing.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Deselect anything that is currently <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected\n</a>" "%thisGuiTextListCtrl.clearSelection();\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n\n</a>" "@see <a href="/coding/class/classguicontrol/">GuiControl</a>" )

DefineEngineMethod(GuiTextListCtrl , findTextIndex , S32 , (const char *needle) , "@brief Find needle in the list, and return the row number it was found <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">in.\n\n</a>" " @param needle Text <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> find in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">list.\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Define the text <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> find in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">list\n</a>" "% needle)

DefineEngineMethod(GuiTextListCtrl , getRowId , S32 , (S32 index) , "@brief Get the row ID <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> an <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">index.\n\n</a>" "@param index Index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> get the RowID <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">at\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">index\n</a>" "% index)

DefineEngineMethod(GuiTextListCtrl , getRowNumById , S32 , (S32 id) , "@brief Get the row number <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id.\n\n</a>" "@param <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> get the row number <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">at\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id\n</a>" "% id)

DefineEngineMethod(GuiTextListCtrl , getRowText , const char * , (S32 index) , "@brief Get the text of the row with the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">index.\n\n</a>" "@param index Row index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> acquire the text <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">at.\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the row <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">index\n</a>" "% index)

DefineEngineMethod(GuiTextListCtrl , getRowTextById , const char * , (S32 id) , "@brief Get the text of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> row with the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id.\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id\n</a>" "% id)

DefineEngineMethod(GuiTextListCtrl , getSelectedId , S32 , () )

DefineEngineMethod(GuiTextListCtrl , getSelectedRow , S32 , () )

DefineEngineMethod(GuiTextListCtrl , isRowActive , bool , (S32 rowNum) , "@brief Check <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the specified row is currently active or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n\n</a>" "@param rowNum Row number <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> check the active <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">state.\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the row <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">number\n</a>" "% rowNum)

DefineEngineMethod(GuiTextListCtrl , removeRow , void , (S32 index) , "@brief Remove <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> row from the table, based on its <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">index.\n\n</a>" " @param index Row index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> remove from the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">list.\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Define the row <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">index\n</a>" "% index)

DefineEngineMethod(GuiTextListCtrl , removeRowById , void , (S32 id) , "@brief Remove row with the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id.\n\n</a>" "@param <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> remove the row entry <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">at\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id\n</a>" "% id)

DefineEngineMethod(GuiTextListCtrl , rowCount , S32 , () )

DefineEngineMethod(GuiTextListCtrl , scrollVisible , void , (S32 rowNum) , "@brief Scroll so the specified row is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">visible\n\n</a>" "@param rowNum Row number <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> make <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">visible\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the row number <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> make <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">visible\n</a>" "% rowNum)

DefineEngineMethod(GuiTextListCtrl , setRowActive , void , (S32 rowNum, bool active) , "@brief Mark <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> specified row as active/<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n\n</a>" "@param rowNum Row number <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> change the active <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">state.\n</a>" "@param active Boolean active state <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> set the row <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">number.\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the row <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">number\n</a>" "% rowNum)

DefineEngineMethod(GuiTextListCtrl , setRowById , void , (S32 id, const char *text) , "@brief Sets the text at the defined <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id.\n\n</a>" "@param <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">change.\n</a>" "@param text Text <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> use at the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Id.\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id\n</a>" "% id)

DefineEngineMethod(GuiTextListCtrl , setSelectedById , void , (S32 id) , "@brief Finds the specified entry by id, then marks its row as <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected.\n\n</a>" " @param <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> Entry within the text list <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> make <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected.\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">id\n</a>" "% id)

DefineEngineMethod(GuiTextListCtrl , setSelectedRow , void , (S32 rowNum) , "@briefSelects the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">row.\n\n</a>" "@param rowNum Row number <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> set <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected.\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// Define the row number <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> set <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected\n</a>" "% rowNum)

DefineEngineMethod(GuiTextListCtrl , sort , void , (S32 columnId, bool increasing) , (true) , "@brief Performs <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> standard (alphabetical) sort on the values in the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">column.\n\n</a>" "@param columnId Column ID <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> perform the sort <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">on.\n</a>" "@param increasing If false, sort will be performed in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">reverse.\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">columnId\n</a>" "% id)

DefineEngineMethod(GuiTextListCtrl , sortNumerical , void , (S32 columnID, bool increasing) , (true) , "@brief Perform <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> numerical sort on the values in the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">column.\n\n</a>" "Detailed <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">description\n\n</a>" "@param columnId Column ID <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> perform the sort <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">on.\n</a>" "@param increasing If false, sort will be performed in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">reverse.\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "//Define the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">columnId\n</a>" "% id)

getColumn(const char * text)

IMPLEMENT_CALLBACK(GuiTextListCtrl , onDeleteKey , void , (S32 id) , (id) , "@brief Called when the delete key has been <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pressed.\n\n</a>" "@param <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a> Id of the selected item in the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">list\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// The delete key was pressed <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a0e48c1f64b558d03d870367324920354">while</a> the <a href="/coding/class/classguitextlistctrl/">GuiTextListCtrl</a> was in focus, causing the callback <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">occur.\n</a>" "GuiTextListCtrl::onDeleteKey(%this,%<a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a>)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " {\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "//Code <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> run when the delete key is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pressed\n</a>" " }\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n\n</a>" " @see <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">GuiControl\n\n</a>" )

IMPLEMENT_CALLBACK(GuiTextListCtrl , onSelect , void , (S32 cellid, const char *text) , (cellid, text) , "@brief Called whenever an item in the list is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected.\n\n</a>" "@param cellid The ID of the cell that was <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected\n</a>" "@param text The text in the selected <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">cel\n\n</a>" "@<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample\n</a>" "// A cel in the <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> was selected, causing the callback <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">occur\n</a>" "<a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1adfb6d6e76af82063022d153c28e5f7a8">GuiTextListCtrl::onSelect</a>(%this,%callid,%text)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " {\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "//Code <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> run when <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> cel item is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">selected\n</a>" " }\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n\n</a>" " @see <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">GuiControl\n\n</a>" )

IMPLEMENT_CONOBJECT(GuiTextListCtrl )

numCompare(const void * a, const void * b)

textCompare(const void * a, const void * b)

  1
  2//-----------------------------------------------------------------------------
  3// Copyright (c) 2012 GarageGames, LLC
  4//
  5// Permission is hereby granted, free of charge, to any person obtaining a copy
  6// of this software and associated documentation files (the "Software"), to
  7// deal in the Software without restriction, including without limitation the
  8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  9// sell copies of the Software, and to permit persons to whom the Software is
 10// furnished to do so, subject to the following conditions:
 11//
 12// The above copyright notice and this permission notice shall be included in
 13// all copies or substantial portions of the Software.
 14//
 15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 21// IN THE SOFTWARE.
 22//-----------------------------------------------------------------------------
 23
 24#include "platform/platform.h"
 25#include "gui/controls/guiTextListCtrl.h"
 26
 27#include "console/consoleTypes.h"
 28#include "console/console.h"
 29#include "gui/containers/guiScrollCtrl.h"
 30#include "gui/core/guiDefaultControlRender.h"
 31#include "gfx/gfxDrawUtil.h"
 32#include "console/engineAPI.h"
 33
 34IMPLEMENT_CONOBJECT(GuiTextListCtrl);
 35
 36ConsoleDocClass( GuiTextListCtrl,
 37   "@brief GUI control that displays a list of text. Text items in the list can be individually selected.\n\n"
 38
 39   "@tsexample\n"
 40
 41   "      new GuiTextListCtrl(EndGameGuiList)\n"
 42   "     {\n"
 43   "        columns = \"0 256\";\n"
 44   "          fitParentWidth = \"1\";\n"
 45   "        clipColumnText = \"0\";\n"
 46   "         //Properties not specific to this control have been omitted from this example.\n"
 47   "     };\n"
 48   "@endtsexample\n\n"
 49
 50   "@see Reference\n\n"
 51
 52   "@ingroup GuiControls\n"
 53);
 54
 55
 56IMPLEMENT_CALLBACK( GuiTextListCtrl, onSelect, void, (S32 cellid, const char* text),( cellid , text ),
 57   "@brief Called whenever an item in the list is selected.\n\n"
 58   "@param cellid The ID of the cell that was selected\n"
 59   "@param text The text in the selected cel\n\n"
 60   "@tsexample\n"
 61   "// A cel in the control was selected, causing the callback to occur\n"
 62   "GuiTextListCtrl::onSelect(%this,%callid,%text)\n"
 63   "  {\n"
 64   "     // Code to run when a cel item is selected\n"
 65   "  }\n"
 66   "@endtsexample\n\n"
 67   "@see GuiControl\n\n"
 68);
 69
 70IMPLEMENT_CALLBACK( GuiTextListCtrl, onDeleteKey, void, ( S32 id ),( id ),
 71   "@brief Called when the delete key has been pressed.\n\n"
 72   "@param id Id of the selected item in the list\n"
 73   "@tsexample\n"
 74   "// The delete key was pressed while the GuiTextListCtrl was in focus, causing the callback to occur.\n"
 75   "GuiTextListCtrl::onDeleteKey(%this,%id)\n"
 76   "  {\n"
 77   "     // Code to run when the delete key is pressed\n"
 78   "  }\n"
 79   "@endtsexample\n\n"
 80   "@see GuiControl\n\n"
 81);
 82
 83static S32 sortColumn;
 84static bool sIncreasing;
 85
 86static const char *getColumn(const char *text)
 87{
 88   S32 ct = sortColumn;
 89   while(ct--)
 90   {
 91      text = dStrchr(text, '\t');
 92      if(!text)
 93         return "";
 94      text++;
 95   }
 96   return text;
 97}
 98
 99static S32 QSORT_CALLBACK textCompare( const void* a, const void* b )
100{
101   GuiTextListCtrl::Entry *ea = (GuiTextListCtrl::Entry *) (a);
102   GuiTextListCtrl::Entry *eb = (GuiTextListCtrl::Entry *) (b);
103   S32 result = dStrnatcasecmp( getColumn( ea->text ), getColumn( eb->text ) );
104   return ( sIncreasing ? result : -result );
105}
106
107static S32 QSORT_CALLBACK numCompare(const void *a,const void *b)
108{
109   GuiTextListCtrl::Entry *ea = (GuiTextListCtrl::Entry *) (a);
110   GuiTextListCtrl::Entry *eb = (GuiTextListCtrl::Entry *) (b);
111   const char* aCol = getColumn( ea->text );
112   const char* bCol = getColumn( eb->text );
113   F32 result = dAtof(aCol) - dAtof(bCol);
114   S32 res = result < 0 ? -1 : (result > 0 ? 1 : 0);
115
116   return ( sIncreasing ? res : -res );
117}
118
119GuiTextListCtrl::GuiTextListCtrl()
120{
121   VECTOR_SET_ASSOCIATION(mList);
122   VECTOR_SET_ASSOCIATION(mColumnOffsets);
123
124   mActive = true;
125   mSize.set(1, 0);
126   mColumnOffsets.push_back(0);
127   mFitParentWidth = true;
128   mClipColumnText = false;
129   mRowHeightPadding = 2;
130}
131
132void GuiTextListCtrl::initPersistFields()
133{
134   addField("columns",                 TypeS32Vector, Offset(mColumnOffsets, GuiTextListCtrl), "A vector of column offsets.  The number of values determines the number of columns in the table.\n" );
135   addField("fitParentWidth",          TypeBool, Offset(mFitParentWidth, GuiTextListCtrl), "If true, the width of this control will match the width of its parent.\n");
136   addField("clipColumnText",          TypeBool, Offset(mClipColumnText, GuiTextListCtrl), "If true, text exceeding a column's given width will get clipped.\n" );
137   addField("rowHeightPadding", TypeS32, Offset(mRowHeightPadding, GuiTextListCtrl), "Sets how much padding to add to the row heights on top of the font height");
138   Parent::initPersistFields();
139}
140
141bool GuiTextListCtrl::onWake()
142{
143   if(!Parent::onWake())
144      return false;
145
146   setSize(mSize);
147   return true;
148}
149
150U32 GuiTextListCtrl::getSelectedId()
151{
152   if (mSelectedCell.y == -1)
153      return InvalidId;
154
155   return mList[mSelectedCell.y].id;
156}
157
158U32 GuiTextListCtrl::getSelectedRow()
159{
160   return mSelectedCell.y;
161}
162
163bool GuiTextListCtrl::cellSelected(Point2I cell)
164{
165   // Is the selection being cleared?
166   if( cell.x == -1 && cell.y == -1)
167      return Parent::cellSelected(cell);
168
169   // Do not allow selection of inactive cells
170   if (cell.y >= 0 && cell.y < mSize.y && mList[cell.y].active)
171      return Parent::cellSelected(cell);
172   else
173      return false;
174}
175
176void GuiTextListCtrl::onCellSelected(Point2I cell)
177{
178   onSelect_callback(mList[cell.y].id, mList[cell.y].text);
179   execConsoleCallback();
180}
181
182void GuiTextListCtrl::onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver)
183{
184   if ( mList[cell.y].active )
185   {
186      if (selected || (mProfile->mMouseOverSelected && mouseOver))
187      {
188         RectI highlightRect = RectI(offset.x, offset.y, mCellSize.x, mCellSize.y);
189         highlightRect.inset( 0, -1 );
190         renderFilledBorder( highlightRect, mProfile->mBorderColorHL, mProfile->mFillColorHL);
191         GFX->getDrawUtil()->setBitmapModulation(mProfile->mFontColorHL);
192      }
193      else
194         GFX->getDrawUtil()->setBitmapModulation(mouseOver ? mProfile->mFontColorHL : mProfile->mFontColor);
195   }
196   else
197      GFX->getDrawUtil()->setBitmapModulation( mProfile->mFontColorNA );
198
199   const char *text = mList[cell.y].text;
200   for(U32 index = 0; index < mColumnOffsets.size(); index++)
201   {
202      const char *nextCol = dStrchr(text, '\t');
203      if(mColumnOffsets[index] >= 0)
204      {
205         dsize_t slen;
206         if(nextCol)
207            slen = nextCol - text;
208         else
209            slen = dStrlen(text);
210
211         Point2I pos(offset.x + 4 + mColumnOffsets[index], offset.y + mRowHeightPadding / 2);
212
213         RectI saveClipRect;
214         bool clipped = false;
215
216         if(mClipColumnText && (index != (mColumnOffsets.size() - 1)))
217         {
218            saveClipRect = GFX->getClipRect();
219
220            RectI clipRect(pos, Point2I(mColumnOffsets[index+1] - mColumnOffsets[index] - 4, mCellSize.y));
221            if(clipRect.intersect(saveClipRect))
222            {
223               clipped = true;
224               GFX->setClipRect( clipRect );
225            }
226         }
227
228         GFX->getDrawUtil()->drawTextN(mFont, pos, text, slen, mProfile->mFontColors);
229
230         if(clipped)
231            GFX->setClipRect( saveClipRect );
232      }
233      if(!nextCol)
234         break;
235      text = nextCol+1;
236   }
237}
238
239U32 GuiTextListCtrl::getRowWidth(Entry *row)
240{
241   U32 width = 1;
242   const char *text = row->text;
243   for(U32 index = 0; index < mColumnOffsets.size(); index++)
244   {
245      const char *nextCol = dStrchr(text, '\t');
246      U32 textWidth;
247      if(nextCol)
248         textWidth = mFont->getStrNWidth((const UTF8*)text, nextCol - text);
249      else
250         textWidth = mFont->getStrWidth((const UTF8*)text);
251      if(mColumnOffsets[index] >= 0)
252         width = getMax(width, mColumnOffsets[index] + textWidth);
253      if(!nextCol)
254         break;
255      text = nextCol+1;
256   }
257   return width;
258}
259
260void GuiTextListCtrl::insertEntry(U32 id, const char *text, S32 index)
261{
262   Entry e;
263   e.text = dStrdup(text);
264   e.id = id;
265   e.active = true;
266   if(!mList.size())
267      mList.push_back(e);
268   else
269   {
270      if(index > mList.size())
271         index = mList.size();
272      mList.insert(index);
273      mList[index] = e;
274   }
275   setSize(Point2I(1, mList.size()));
276}
277
278void GuiTextListCtrl::addEntry(U32 id, const char *text)
279{
280   Entry e;
281   e.text = dStrdup(text);
282   e.id = id;
283   e.active = true;
284   mList.push_back(e);
285   setSize(Point2I(1, mList.size()));
286}
287
288void GuiTextListCtrl::setEntry(U32 id, const char *text)
289{
290   S32 e = findEntryById(id);
291   if(e == -1)
292      addEntry(id, text);
293   else
294   {
295      dFree(mList[e].text);
296      mList[e].text = dStrdup(text);
297
298      // Still have to call this to make sure cells are wide enough for new values:
299      setSize( Point2I( 1, mList.size() ) );
300   }
301   setUpdate();
302}
303
304void GuiTextListCtrl::setEntryActive(U32 id, bool active)
305{
306   S32 index = findEntryById( id );
307   if ( index == -1 )
308      return;
309
310   if ( mList[index].active != active )
311   {
312      mList[index].active = active;
313
314      // You can't have an inactive entry selected...
315      if ( !active && mSelectedCell.y >= 0 && mSelectedCell.y < mList.size()
316           && mList[mSelectedCell.y].id == id )
317         setSelectedCell( Point2I( -1, -1 ) );
318
319      setUpdate();
320   }
321}
322
323S32 GuiTextListCtrl::findEntryById(U32 id)
324{
325   for(U32 i = 0; i < mList.size(); i++)
326      if(mList[i].id == id)
327         return i;
328   return -1;
329}
330
331S32 GuiTextListCtrl::findEntryByText(const char *text)
332{
333   for(U32 i = 0; i < mList.size(); i++)
334      if(!dStricmp(mList[i].text, text))
335         return i;
336   return -1;
337}
338
339bool GuiTextListCtrl::isEntryActive(U32 id)
340{
341   S32 index = findEntryById( id );
342   if ( index == -1 )
343      return( false );
344
345   return( mList[index].active );
346}
347
348void GuiTextListCtrl::setSize(Point2I newSize)
349{
350   mSize = newSize;
351
352   if ( bool( mFont ) )
353   {
354      if ( mSize.x == 1 && mFitParentWidth )
355      {
356         GuiScrollCtrl* parent = dynamic_cast<GuiScrollCtrl *>(getParent());
357         if ( parent )
358            mCellSize.x = parent->getContentExtent().x;
359      }
360      else
361      {
362         // Find the maximum width cell:
363         S32 maxWidth = 1;
364         for ( U32 i = 0; i < mList.size(); i++ )
365         {
366            U32 rWidth = getRowWidth( &mList[i] );
367            if ( rWidth > maxWidth )
368               maxWidth = rWidth;
369         }
370
371         mCellSize.x = maxWidth + 8;
372      }
373
374      mCellSize.y = mFont->getHeight() + mRowHeightPadding;
375   }
376
377   Point2I newExtent( newSize.x * mCellSize.x + mHeaderDim.x, newSize.y * mCellSize.y + mHeaderDim.y );
378   setExtent( newExtent );
379}
380
381void GuiTextListCtrl::clear()
382{
383   while (mList.size())
384      removeEntry(mList[0].id);
385
386   mMouseOverCell.set( -1, -1 );
387   setSelectedCell(Point2I(-1, -1));
388}
389
390void GuiTextListCtrl::sort(U32 column, bool increasing)
391{
392   if (getNumEntries() < 2)
393      return;
394   sortColumn = column;
395   sIncreasing = increasing;
396   dQsort((void *)&(mList[0]), mList.size(), sizeof(Entry), textCompare);
397}
398
399void GuiTextListCtrl::sortNumerical( U32 column, bool increasing )
400{
401   if ( getNumEntries() < 2 )
402      return;
403
404   sortColumn = column;
405   sIncreasing = increasing;
406   dQsort( (void*) &( mList[0] ), mList.size(), sizeof( Entry ), numCompare );
407}
408
409void GuiTextListCtrl::onRemove()
410{
411   clear();
412   Parent::onRemove();
413}
414
415U32 GuiTextListCtrl::getNumEntries()
416{
417   return mList.size();
418}
419
420void GuiTextListCtrl::removeEntryByIndex(S32 index)
421{
422   if(index < 0 || index >= mList.size())
423      return;
424   dFree(mList[index].text);
425   mList.erase(index);
426
427   setSize(Point2I( 1, mList.size()));
428   setSelectedCell(Point2I(-1, -1));
429}
430
431void GuiTextListCtrl::removeEntry(U32 id)
432{
433   S32 index = findEntryById(id);
434   removeEntryByIndex(index);
435}
436
437const char *GuiTextListCtrl::getSelectedText()
438{
439   if (mSelectedCell.y == -1)
440      return NULL;
441
442   return mList[mSelectedCell.y].text;
443}
444
445const char *GuiTextListCtrl::getScriptValue()
446{
447   return getSelectedText();
448}
449
450void GuiTextListCtrl::setScriptValue(const char *val)
451{
452   S32 e = findEntryByText(val);
453   if(e == -1)
454      setSelectedCell(Point2I(-1, -1));
455   else
456      setSelectedCell(Point2I(0, e));
457}
458
459bool GuiTextListCtrl::onKeyDown( const GuiEvent &event )
460{
461   //if this control is a dead end, make sure the event stops here
462   if ( !mVisible || !mActive || !mAwake )
463      return true;
464
465   S32 yDelta = 0;
466   switch( event.keyCode )
467   {
468   case KEY_RETURN:
469      execAltConsoleCallback();
470      break;
471   case KEY_LEFT:
472   case KEY_UP:
473      if ( mSelectedCell.y > 0 )
474      {
475         mSelectedCell.y--;
476         yDelta = -mCellSize.y;
477   }
478      break;
479   case KEY_DOWN:
480   case KEY_RIGHT:
481      if ( mSelectedCell.y < ( mList.size() - 1 ) )
482   {
483         mSelectedCell.y++;
484         yDelta = mCellSize.y;
485   }
486      break;
487   case KEY_HOME:
488      if ( mList.size() )
489      {
490         mSelectedCell.y = 0;
491         yDelta = -(mCellSize.y * mList.size() + 1 );
492      }
493      break;
494   case KEY_END:
495      if ( mList.size() )
496   {
497         mSelectedCell.y = mList.size() - 1;
498         yDelta = (mCellSize.y * mList.size() + 1 );
499      }
500      break;
501   case KEY_DELETE:
502      if ( mSelectedCell.y >= 0 && mSelectedCell.y < mList.size() )
503      onDeleteKey_callback( mList[mSelectedCell.y].id );
504      break;
505   default:
506   return( Parent::onKeyDown( event ) );
507      break;
508   };
509
510   GuiScrollCtrl* parent = dynamic_cast<GuiScrollCtrl *>(getParent());
511   if ( parent )
512      parent->scrollDelta( 0, yDelta );
513
514   return ( true );
515
516
517
518}
519
520bool GuiTextListCtrl::onGamepadAxisUp(const GuiEvent& event)
521{
522   if (mSelectedCell.y < (mList.size() - 1))
523   {
524      S32 yDelta = 0;
525
526      mSelectedCell.y++;
527      yDelta = mCellSize.y;
528
529      GuiScrollCtrl* parent = dynamic_cast<GuiScrollCtrl*>(getParent());
530      if (parent)
531         parent->scrollDelta(0, yDelta);
532   }
533   return true;
534}
535
536bool GuiTextListCtrl::onGamepadAxisDown(const GuiEvent& event)
537{
538   if (mSelectedCell.y > 0)
539   {
540      S32 yDelta = 0;
541
542      mSelectedCell.y--;
543      yDelta = -mCellSize.y;
544
545      GuiScrollCtrl* parent = dynamic_cast<GuiScrollCtrl*>(getParent());
546      if (parent)
547         parent->scrollDelta(0, yDelta);
548   }
549
550   return true;
551}
552
553//-----------------------------------------------------------------------------
554// Console Methods
555//-----------------------------------------------------------------------------
556
557DefineEngineMethod( GuiTextListCtrl, getSelectedId, S32, (),,
558   "@brief Get the ID of the currently selected item.\n\n"
559   "@tsexample\n"
560   "// Acquire the ID of the selected item in the list.\n"
561   "%id = %thisGuiTextListCtrl.getSelectedId();\n"
562   "@endtsexample\n\n"
563   "@return The id of the selected item in the list.\n\n"
564   "@see GuiControl")
565{
566   return object->getSelectedId();
567}
568
569DefineEngineMethod( GuiTextListCtrl, setSelectedById, void, (S32 id),,
570   "@brief Finds the specified entry by id, then marks its row as selected.\n\n"
571   "@param id Entry within the text list to make selected.\n"
572   "@tsexample\n"
573   "// Define the id\n"
574   "%id = \"5\";\n\n"
575   "// Inform the GuiTextListCtrl control to set the defined id entry as selected\n"
576   "%thisGuiTextListCtrl.setSelectedById(%id);\n"
577   "@endtsexample\n\n"
578   "@see GuiControl")
579{
580   S32 index = object->findEntryById(id);
581   if(index < 0)
582      return ;
583
584   object->setSelectedCell(Point2I(0, index));
585}
586
587DefineEngineMethod( GuiTextListCtrl, setSelectedRow, void, (S32 rowNum),,
588   "@briefSelects the specified row.\n\n"
589   "@param rowNum Row number to set selected.\n"
590   "@tsexample\n"
591   "// Define the row number to set selected\n"
592   "%rowNum = \"4\";\n\n"
593   "%guiTextListCtrl.setSelectedRow(%rowNum);\n"
594   "@endtsexample\n\n"
595   "@see GuiControl")
596{
597   object->setSelectedCell( Point2I( 0, rowNum ) );
598}
599
600DefineEngineMethod( GuiTextListCtrl, getSelectedRow, S32, (),,
601   "@brief Returns the selected row index (not the row ID).\n\n"
602   "@tsexample\n"
603   "// Acquire the selected row index\n"
604   "%rowIndex = %thisGuiTextListCtrl.getSelectedRow();\n"
605   "@endtsexample\n\n"
606   "@return Index of the selected row\n\n"
607   "@see GuiControl")
608{
609   return object->getSelectedRow();
610}
611
612DefineEngineMethod( GuiTextListCtrl, clearSelection, void, (),,
613   "@brief Set the selection to nothing.\n\n"
614   "@tsexample\n"
615   "// Deselect anything that is currently selected\n"
616   "%thisGuiTextListCtrl.clearSelection();\n"
617   "@endtsexample\n\n"
618   "@see GuiControl")
619{
620   object->setSelectedCell(Point2I(-1, -1));
621}
622
623DefineEngineMethod( GuiTextListCtrl, addRow, S32, (S32 id, const char* text, S32 index),(0,"",-1),
624   "@brief Adds a new row at end of the list with the defined id and text.\n"
625   "If index is used, then the new row is inserted at the row location of 'index'.\n\n"
626   "@param id Id of the new row.\n"
627   "@param text Text to display at the new row.\n"
628   "@param index Index to insert the new row at. If not used, new row will be placed at the end of the list.\n"
629   "@tsexample\n"
630   "// Define the id\n"
631   "%id = \"4\";\n\n"
632   "// Define the text to display\n"
633   "%text = \"Display Text\"\n\n"
634   "// Define the index (optional)\n"
635   "%index = \"2\"\n\n"
636   "// Inform the GuiTextListCtrl control to add the new row with the defined information.\n"
637   "%rowIndex = %thisGuiTextListCtrl.addRow(%id,%text,%index);\n"
638   "@endtsexample\n\n"
639   "@return Returns the row index of the new row. If 'index' was defined, then this just returns the number of rows in the list.\n\n"
640   "@see References")
641{
642   S32 ret = object->mList.size();
643   if(index == -1)
644      object->addEntry(id, text);
645   else
646      object->insertEntry(id, text, index);
647
648   return ret;
649}
650
651DefineEngineMethod( GuiTextListCtrl, setRowById, void, (S32 id, const char* text),,
652   "@brief Sets the text at the defined id.\n\n"
653   "@param id Id to change.\n"
654   "@param text Text to use at the Id.\n"
655   "@tsexample\n"
656   "// Define the id\n"
657   "%id = \"4\";\n\n"
658   "// Define the text\n"
659   "%text = \"Text To Display\";\n\n"
660   "// Inform the GuiTextListCtrl control to display the defined text at the defined id\n"
661   "%thisGuiTextListCtrl.setRowById(%id,%text);\n"
662   "@endtsexample\n\n"
663   "@see GuiControl")
664{
665   object->setEntry(id, text);
666}
667
668DefineEngineMethod( GuiTextListCtrl, sort, void, ( S32 columnId, bool increasing ), ( true ),
669   "@brief Performs a standard (alphabetical) sort on the values in the specified column.\n\n"
670   "@param columnId Column ID to perform the sort on.\n"
671   "@param increasing If false, sort will be performed in reverse.\n"
672   "@tsexample\n"
673   "// Define the columnId\n"
674   "%id = \"1\";\n\n"
675   "// Define if we are increasing or not\n"
676   "%increasing = \"false\";\n\n"
677   "// Inform the GuiTextListCtrl to perform the sort operation\n"
678   "%thisGuiTextListCtrl.sort(%id,%increasing);\n"
679   "@endtsexample\n\n"
680   "@see GuiControl")
681{
682     object->sort( columnId, increasing );
683}
684
685DefineEngineMethod( GuiTextListCtrl, sortNumerical, void, (S32 columnID, bool increasing), ( true ),
686   "@brief Perform a numerical sort on the values in the specified column.\n\n"
687   "Detailed description\n\n"
688   "@param columnId Column ID to perform the sort on.\n"
689   "@param increasing If false, sort will be performed in reverse.\n"
690   "@tsexample\n"
691   "// Define the columnId\n"
692   "%id = \"1\";\n\n"
693   "// Define if we are increasing or not\n"
694   "%increasing = \"false\";\n\n"
695   "// Inform the GuiTextListCtrl to perform the sort operation\n"
696   "%thisGuiTextListCtrl.sortNumerical(%id,%increasing);\n"
697   "@endtsexample\n\n"
698   "@see GuiControl")
699{
700     object->sortNumerical( columnID, increasing );
701}
702
703DefineEngineMethod( GuiTextListCtrl, clear, void, (),,
704   "@brief Clear the list.\n\n"
705   "@tsexample\n"
706   "// Inform the GuiTextListCtrl control to clear its contents\n"
707   "%thisGuiTextListCtrl.clear();\n"
708   "@endtsexample\n\n"
709   "@see GuiControl")
710{
711   object->clear();
712}
713
714DefineEngineMethod( GuiTextListCtrl, rowCount, S32, (),,
715   "@brief Get the number of rows.\n\n"
716   "@tsexample\n"
717   "// Get the number of rows in the list\n"
718   "%rowCount = %thisGuiTextListCtrl.rowCount();\n"
719   "@endtsexample\n\n"
720   "@return Number of rows in the list.\n\n"
721   "@see GuiControl")
722{
723   return object->getNumEntries();
724}
725
726DefineEngineMethod( GuiTextListCtrl, getRowId, S32, (S32 index),,
727   "@brief Get the row ID for an index.\n\n"
728   "@param index Index to get the RowID at\n"
729   "@tsexample\n"
730   "// Define the index\n"
731   "%index = \"3\";\n\n"
732   "// Request the row ID at the defined index\n"
733   "%rowId = %thisGuiTextListCtrl.getRowId(%index);\n"
734   "@endtsexample\n\n"
735   "@return RowId at the defined index.\n\n"
736   "@see GuiControl")
737{
738   if(index >= object->getNumEntries())
739      return -1;
740
741   return object->mList[index].id;
742}
743
744DefineEngineMethod( GuiTextListCtrl, getRowTextById, const char*, (S32 id),,
745   "@brief Get the text of a row with the specified id.\n\n"
746   "@tsexample\n"
747   "// Define the id\n"
748   "%id = \"4\";\n\n"
749   "// Inform the GuiTextListCtrl control to return the text at the defined row id\n"
750   "%rowText = %thisGuiTextListCtrl.getRowTextById(%id);\n"
751   "@endtsexample\n\n"
752   "@return Row text at the requested row id.\n\n"
753   "@see GuiControl")
754{
755   S32 index = object->findEntryById(id);
756   if(index < 0)
757      return "";
758   return object->mList[index].text;
759}
760
761DefineEngineMethod( GuiTextListCtrl, getRowNumById, S32, (S32 id),,
762   "@brief Get the row number for a specified id.\n\n"
763   "@param id Id to get the row number at\n"
764   "@tsexample\n"
765   "// Define the id\n"
766   "%id = \"4\";\n\n"
767   "// Request the row number from the GuiTextListCtrl control at the defined id.\n"
768   "%rowNumber = %thisGuiTextListCtrl.getRowNumById(%id);\n"
769   "@endtsexample\n\n"
770   "@see GuiControl")
771{
772   S32 index = object->findEntryById(id);
773   if(index < 0)
774      return -1;
775   return index;
776}
777
778DefineEngineMethod( GuiTextListCtrl, getRowText, const char*, (S32 index),,
779   "@brief Get the text of the row with the specified index.\n\n"
780   "@param index Row index to acquire the text at.\n"
781   "@tsexample\n"
782   "// Define the row index\n"
783   "%index = \"5\";\n\n"
784   "// Request the text from the row at the defined index\n"
785   "%rowText = %thisGuiTextListCtrl.getRowText(%index);\n"
786   "@endtsexample\n\n"
787   "@return Text at the defined row index.\n\n"
788   "@see GuiControl")
789{
790   if(index < 0 || index >= object->mList.size())
791      return "";
792   return object->mList[index].text;
793}
794
795DefineEngineMethod( GuiTextListCtrl, removeRowById, void, (S32 id),,
796   "@brief Remove row with the specified id.\n\n"
797   "@param id Id to remove the row entry at\n"
798   "@tsexample\n"
799   "// Define the id\n"
800   "%id = \"4\";\n\n"
801   "// Inform the GuiTextListCtrl control to remove the row at the defined id\n"
802   "%thisGuiTextListCtrl.removeRowById(%id);\n"
803   "@endtsexample\n\n"
804   "@see GuiControl")
805{
806   object->removeEntry(id);
807}
808
809DefineEngineMethod( GuiTextListCtrl, removeRow, void, (S32 index),,
810   "@brief Remove a row from the table, based on its index.\n\n"
811   "@param index Row index to remove from the list.\n"
812   "@tsexample\n"
813   "// Define the row index\n"
814   "%index = \"4\";\n\n"
815   "// Inform the GuiTextListCtrl control to remove the row at the defined row index\n"
816   "%thisGuiTextListCtrl.removeRow(%index);\n"
817   "@endtsexample\n\n"
818   "@see GuiControl")
819{
820   object->removeEntryByIndex(index);
821}
822
823DefineEngineMethod( GuiTextListCtrl, scrollVisible, void, (S32 rowNum),,
824   "@brief Scroll so the specified row is visible\n\n"
825   "@param rowNum Row number to make visible\n"
826   "@tsexample\n"
827   "// Define the row number to make visible\n"
828   "%rowNum = \"4\";\n\n"
829   "// Inform the GuiTextListCtrl control to scroll the list so the defined rowNum is visible.\n"
830   "%thisGuiTextListCtrl.scrollVisible(%rowNum);\n"
831   "@endtsexample\n\n"
832   "@see GuiControl")
833{
834   object->scrollCellVisible(Point2I(0, rowNum));
835}
836
837DefineEngineMethod( GuiTextListCtrl, findTextIndex, S32, (const char* needle),,
838   "@brief Find needle in the list, and return the row number it was found in.\n\n"
839   "@param needle Text to find in the list.\n"
840   "@tsexample\n"
841   "// Define the text to find in the list\n"
842   "%needle = \"Text To Find\";\n\n"
843   "// Request the row number that contains the defined text to find\n\n"
844   "%rowNumber = %thisGuiTextListCtrl.findTextIndex(%needle);\n\n"
845   "@endtsexample\n\n"
846   "@return Row number that the defined text was found in,\n\n"
847   "@see GuiControl")
848{
849   return( object->findEntryByText(needle) );
850}
851
852DefineEngineMethod( GuiTextListCtrl, setRowActive, void, (S32 rowNum, bool active),,
853   "@brief Mark a specified row as active/not.\n\n"
854   "@param rowNum Row number to change the active state.\n"
855   "@param active Boolean active state to set the row number.\n"
856   "@tsexample\n"
857   "// Define the row number\n"
858   "%rowNum = \"4\";\n\n"
859   "// Define the boolean active state\n"
860   "%active = \"true\";\n\n"
861   "// Informthe GuiTextListCtrl control to set the defined active state at the defined row number.\n"
862   "%thisGuiTextListCtrl.setRowActive(%rowNum,%active);\n"
863   "@endtsexample\n\n"
864   "@see GuiControl")
865{
866   object->setEntryActive( U32( rowNum ), active );
867}
868
869DefineEngineMethod( GuiTextListCtrl, isRowActive, bool, (S32 rowNum),,
870   "@brief Check if the specified row is currently active or not.\n\n"
871   "@param rowNum Row number to check the active state.\n"
872   "@tsexample\n"
873   "// Define the row number\n"
874   "%rowNum = \"5\";\n\n"
875   "// Request the active state of the defined row number from the GuiTextListCtrl control.\n"
876   "%rowActiveState = %thisGuiTextListCtrl.isRowActive(%rowNum);\n"
877   "@endtsexample\n\n"
878   "@return Active state of the defined row number.\n\n"
879   "@see GuiControl")
880{
881   return( object->isEntryActive( U32( rowNum ) ) );
882}
883