Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
programming:tge:controls:guimoderntextlistctrl [2011/09/20 17:12] – [Methods] updated for v1.01 release, still incomplete list. Nathan Martinprogramming:tge:controls:guimoderntextlistctrl [2011/09/20 23:13] (current) – [Properties] added profile property Nathan Martin
Line 71: Line 71:
 ==== Properties ==== ==== Properties ====
  
-|//GuiControlProfile//^headerProfile|The control profile that determines fill styles, font settings, etc. for column headers.||+|//GuiControlProfile//^profile|The control profile that determines fill styles, font settings, etc. for row items.||
 | ^  Syntax:|''//**%obj**//.headerProfile = "//**__Value__**//";''  || | ^  Syntax:|''//**%obj**//.headerProfile = "//**__Value__**//";''  ||
 | |^  //Value//|Profile name to be used.| | |^  //Value//|Profile name to be used.|
 +\\ 
  
 +
 +|//GuiControlProfile//^headerProfile|The control profile that determines fill styles, font settings, etc. for column headers.||
 +| ^  Syntax:|''//**%obj**//.headerProfile = "//**__Value__**//";''  ||
 +| |^  //Value//|Profile name to be used.|
 \\  \\ 
 +
  
 |//GuiControlProfile//^sortProfile|The control profile that determines the texture and color of the sort order indicator in sorted column headers.|| |//GuiControlProfile//^sortProfile|The control profile that determines the texture and color of the sort order indicator in sorted column headers.||
 | ^  Syntax:|''//**%obj**//.sortProfile = "//**__Value__**//";''  || | ^  Syntax:|''//**%obj**//.sortProfile = "//**__Value__**//";''  ||
 | |^  //Value//|Profile name to be used.| | |^  //Value//|Profile name to be used.|
- 
 \\  \\ 
 +
  
 |//Point2I//^headerGlowOffset|Number of pixels that will need to be offset when drawing a column header cell's texture|| |//Point2I//^headerGlowOffset|Number of pixels that will need to be offset when drawing a column header cell's texture||
Line 87: Line 93:
 | |^  //Horizontal//|Number of pixels to offset the left and right boundaries of the texture.| | |^  //Horizontal//|Number of pixels to offset the left and right boundaries of the texture.|
 |:::|^  //Vertical//|Number of pixels to offset the top and bottom boundaries of the texture.| |:::|^  //Vertical//|Number of pixels to offset the top and bottom boundaries of the texture.|
- 
 \\  \\ 
 +
  
 |//Point2I//^rowGlowOffset|Number of pixels that will need to be offset when drawing a row column's texture|| |//Point2I//^rowGlowOffset|Number of pixels that will need to be offset when drawing a row column's texture||
Line 94: Line 100:
 | |^  //Horizontal//|Number of pixels to offset the left and right boundaries of the texture.| | |^  //Horizontal//|Number of pixels to offset the left and right boundaries of the texture.|
 |:::|^  //Vertical//|Number of pixels to offset the top and bottom boundaries of the texture.| |:::|^  //Vertical//|Number of pixels to offset the top and bottom boundaries of the texture.|
- 
 \\  \\ 
 +
  
 |//Point2I//^headerTextPadding|Number of additional pixels for padding text when drawing column header cells.|| |//Point2I//^headerTextPadding|Number of additional pixels for padding text when drawing column header cells.||
Line 101: Line 107:
 | |^  //Horizontal//|Number of horizontal pixels added for text padding.| | |^  //Horizontal//|Number of horizontal pixels added for text padding.|
 |:::|^  //Vertical//|Number of vertical pixels added for text padding.| |:::|^  //Vertical//|Number of vertical pixels added for text padding.|
- 
 \\  \\ 
 +
  
 |//Point2I//^rowTextPadding|Number of additional pixels for padding text when drawing row column cells.|| |//Point2I//^rowTextPadding|Number of additional pixels for padding text when drawing row column cells.||
Line 108: Line 114:
 | |^  //Horizontal//|Number of horizontal pixels added for text padding.| | |^  //Horizontal//|Number of horizontal pixels added for text padding.|
 |:::|^  //Vertical//|Number of vertical pixels added for text padding.| |:::|^  //Vertical//|Number of vertical pixels added for text padding.|
- 
 \\  \\ 
 +
  
 |//Bool//^allowColumnResize|Whether or not user is allowed to resize columns using the mouse cursor.|| |//Bool//^allowColumnResize|Whether or not user is allowed to resize columns using the mouse cursor.||
 | ^  Syntax:|''//**%obj**//.allowColumnResize = //**__Value__**//;''|| | ^  Syntax:|''//**%obj**//.allowColumnResize = //**__Value__**//;''||
 | |^  //Value//|**true** -- User can resize columns using the mouse cursor\\ **false** -- Column resizers are locked and user cannot change them.| | |^  //Value//|**true** -- User can resize columns using the mouse cursor\\ **false** -- Column resizers are locked and user cannot change them.|
- 
 \\  \\ 
 +
  
 |//Bool//^allowColumnMove|Whether or not user is allowed to move columns via drag and drop.|| |//Bool//^allowColumnMove|Whether or not user is allowed to move columns via drag and drop.||
 | ^  Syntax:|''//**%obj**//.allowColumnMove = //**__Value__**//;''|| | ^  Syntax:|''//**%obj**//.allowColumnMove = //**__Value__**//;''||
 | |^  //Value//|**true** -- User can move columns using the mouse cursor via drag and drop\\ **false** -- Column positions are locked and user cannot move them.| | |^  //Value//|**true** -- User can move columns using the mouse cursor via drag and drop\\ **false** -- Column positions are locked and user cannot move them.|
- 
 \\  \\ 
 +
  
 |//Bool//^useMarkup|Whether the control should use or just ignore markup language within row contents.|| |//Bool//^useMarkup|Whether the control should use or just ignore markup language within row contents.||
 | ^  Syntax:|''//**%obj**//.useMarkup = //**__Value__**//;''|| | ^  Syntax:|''//**%obj**//.useMarkup = //**__Value__**//;''||
 | |^  //Value//|**true** -- Markup language tags will be parsed and processed for text draw manipulation.\\ **false** -- Markup language tags will be ignored as if the control didn't support them and control will behave like GuiTextListCtrl in this regard.| | |^  //Value//|**true** -- Markup language tags will be parsed and processed for text draw manipulation.\\ **false** -- Markup language tags will be ignored as if the control didn't support them and control will behave like GuiTextListCtrl in this regard.|
- 
 \\  \\ 
 +
  
 |//Bool//^resizeOnChange|Whether or not to update the control size for the scroller parent control upon content changes such as using the **Add**[**Row**%%|%%**Column**]**()** methods.|| |//Bool//^resizeOnChange|Whether or not to update the control size for the scroller parent control upon content changes such as using the **Add**[**Row**%%|%%**Column**]**()** methods.||
 | ^  Syntax:|''//**%obj**//.resizeOnChange = //**__Value__**//;''|| | ^  Syntax:|''//**%obj**//.resizeOnChange = //**__Value__**//;''||
 | |^  //Value//|**true** -- The control will update its size upon any relevant row or column changes.\\ **false** -- The control will not update its size upon any row or column changes.\\ \\ This property is useful for cases when the scripter is going to be inserting a massive amount of rows such as 5,000 and want to reduce the time it takes to insert the rows by not having the control perform unnecessary maintenance that isn't required until after the scripter is done populating the control with content. Afterwards the scripter can then call the **updateSize()** method to make it possible for the user to scroll through the just added rows. Be sure to change this property back to **true** once done populating the control as to prevent any awkward useability problems when rows are dynamically added or removed later on.| | |^  //Value//|**true** -- The control will update its size upon any relevant row or column changes.\\ **false** -- The control will not update its size upon any row or column changes.\\ \\ This property is useful for cases when the scripter is going to be inserting a massive amount of rows such as 5,000 and want to reduce the time it takes to insert the rows by not having the control perform unnecessary maintenance that isn't required until after the scripter is done populating the control with content. Afterwards the scripter can then call the **updateSize()** method to make it possible for the user to scroll through the just added rows. Be sure to change this property back to **true** once done populating the control as to prevent any awkward useability problems when rows are dynamically added or removed later on.|
- 
 \\  \\ 
 +
  
 ==== Methods ==== ==== Methods ====
Line 182: Line 188:
 ^  Method Arguments  ^^^ ^  Method Arguments  ^^^
 |//S32//^//%key//|Key associated with the row that is being inserted.| |//S32//^//%key//|Key associated with the row that is being inserted.|
-|//string//^//%text//|Text content of the row that is tab delimited into columns. This content supports markup language as described in the [[#Markup Language]] section|+|//string//^//%text//|Text content of the row that is tab delimited into columns. This content supports markup language as described in the [[#Markup Language]] section.|
 |//U32//^//%index//|Index position of where the row should be inserted into. Default is -1 which causes the row to be appended at the end of the list.\\ An invalid index position (//**index** >= **[[#getRowCount()]]**//) will just append the row to end of the list instead of the requested insertion position.| |//U32//^//%index//|Index position of where the row should be inserted into. Default is -1 which causes the row to be appended at the end of the list.\\ An invalid index position (//**index** >= **[[#getRowCount()]]**//) will just append the row to end of the list instead of the requested insertion position.|
 |//string//^//%flags//|Row flag attributes in textual keyword and space delimited format that will be applied to the row.\\ See the **Row Flag Attributes** table below for an explanation of the recognized keywords that are available for use.\\ \\ Rows are automatically applied the following keyword string equivalent attributes before processing provided flags:  ''"**active selectable**"''| |//string//^//%flags//|Row flag attributes in textual keyword and space delimited format that will be applied to the row.\\ See the **Row Flag Attributes** table below for an explanation of the recognized keywords that are available for use.\\ \\ Rows are automatically applied the following keyword string equivalent attributes before processing provided flags:  ''"**active selectable**"''|
Line 456: Line 462:
 %control.setSelectedRow(%index); %control.setSelectedRow(%index);
  
-// this will not generate a [[#OnRowSelect]]() callback event.+// this will not generate a OnRowSelect() callback event.
 </code> </code>
 ^  Method Arguments  ^^^ ^  Method Arguments  ^^^
Line 476: Line 482:
  
 ^  Sort Orders  ^^ ^  Sort Orders  ^^
-||| 
 ^//key//|Key associated with the column that this sort order will be tied to.| ^//key//|Key associated with the column that this sort order will be tied to.|
 ^//order//|''0'' -- Column is to be sorted by Ascending order.\\ ''1'' -- Column is to be sorted by Descending order.\\ Any other values are undefined behavior.| ^//order//|''0'' -- Column is to be sorted by Ascending order.\\ ''1'' -- Column is to be sorted by Descending order.\\ Any other values are undefined behavior.|
 ^//makeFirst//|Optional field that when it is a numerical value of other than zero (''0'') to indicate that the sort order will become the highest priority or most significant column sort order.| ^//makeFirst//|Optional field that when it is a numerical value of other than zero (''0'') to indicate that the sort order will become the highest priority or most significant column sort order.|
 \\  \\ 
 +
 +
 +=== setColumnFlags() ===
 +<code php>
 +// set the column's textual flags
 +%control.setColumnFlags(%index, %flags);
 +</code>
 +^  Method Arguments  ^^^
 +|//U32//^//%index//|Index position of the column.|
 +|//string//^//%flags//|Column flag attributes in textual keyword and space delimited format that will be applied to the column.\\ See the **Column Flag Attributes** table in [[#addColumn()]] method section for an explanation of the recognized keywords that are available for use.|
 +| |||
 +|//void//^Returns|Nothing.|
 +\\ 
 +
 +
 +=== setColumnSortOrder() ===
 +<code php>
 +// add or update an existing column sort order
 +%control.setColumnSortOrder(%key, %order, %makeFirst);
 +</code>
 +^  Method Arguments  ^^^
 +|//S32//^//%key//|Key associated with the column that this sort order will be tied to.|
 +|//S32//^//%order//|''0'' -- Column is to be sorted by Ascending order.\\ ''1'' -- Column is to be sorted by Descending order.\\ Any other values are undefined behavior.|
 +|//bool//^//%makeFirst//|Optional field when **''true''** this sort order will become the highest priority or most significant column sort order, else the sort order is just appended or updated if it already exists.\\ Default is **''false''**|
 +| |||
 +|//void//^Returns|Nothing.|
 +\\ 
 +
 +
 +=== setColumnWidth() ===
 +<code php>
 +// set the column's width
 +%control.setColumnWidth(%index, %width);
 +</code>
 +^  Method Arguments  ^^^
 +|//U32//^//%index//|Index position of the column.|
 +|//U32//^//%width//|Width in pixels of the column and its header.\\ This value is validated against the column's minimum and maximum width size constraints as set in the [[#addColumn()]] method.|
 +| |||
 +|//void//^Returns|Nothing.|
 +\\ 
 +
 +
 +=== setRowFlags() ===
 +<code php>
 +// set the row's textual flags
 +%control.setRowFlags(%index, %flags);
 +</code>
 +^  Method Arguments  ^^^
 +|//U32//^//%index//|Index position of the row.|
 +|//string//^//%flags//|Row flag attributes in textual keyword and space delimited format that will be applied to the row.\\ See the **Row Flag Attributes** table in [[#addRow()]] method section for an explanation of the recognized keywords that are available for use.|
 +| |||
 +|//void//^Returns|Nothing.|
 +\\ 
 +
 +
 +=== setRowText() ===
 +<code php>
 +// set a row's text content
 +%control.setRowText(%index, %text);
 +</code>
 +^  Method Arguments  ^^^
 +|//U32//^//%index//|Index position of the row.|
 +|//string//^//%text//|Text content to be set as the entire row's content that is tab delimited into columns. This content supports markup language as described in the [[#Markup Language]] section.|
 +| |||
 +|//void//^Returns|Nothing.|
 +\\ 
 +
 +
 +=== setProfile() ===
 +<code php>
 +// set the GUI control profile for the row items
 +%control.setProfile(%profile);
 +</code>
 +^  Method Arguments  ^^^
 +|//GuiControlProfile//^//%profile//|Profile to be used for row items.\\ This is an alternative method to just setting the [[#Properties|profile]] property to the profile.|
 +| |||
 +|//void//^Returns|Nothing.|
 +\\ 
 +
 +
 +=== setHeaderProfile() ===
 +<code php>
 +// set the GUI control profile for the column headers
 +%control.setHeaderProfile(%profile);
 +</code>
 +^  Method Arguments  ^^^
 +|//GuiControlProfile//^//%profile//|Profile to be used for column headers.\\ This is an alternative method to just setting the [[#Properties|headerProfile]] property to the profile.|
 +| |||
 +|//void//^Returns|Nothing.|
 +\\ 
 +
 +
 +=== setSortProfile() ===
 +<code php>
 +// set the GUI control profile for the column header sort indicator
 +%control.setSortProfile(%profile);
 +</code>
 +^  Method Arguments  ^^^
 +|//GuiControlProfile//^//%profile//|Profile to be used for the column header sort indicator.\\ This is an alternative method to just setting the [[#Properties|sortProfile]] property to the profile.|
 +| |||
 +|//void//^Returns|Nothing.|
 +\\ 
 +
 +
 +=== sortColumns() ===
 +<code php>
 +// sort all columns governed by the sort order rules declared by
 +// using the setColumnSortOrder() and setSortOrder() methods.
 +%control.sortColumns();
 +</code>
 +^  Method Arguments  ^^^
 +|This method does not take any arguments.|||
 +| |||
 +|//void//^Returns|Nothing.|
 +\\ 
 +
 +
 +=== moveColumn() ===
 +<code php>
 +// move a column to another index position
 +%control.moveColumn(%key, %index);
 +</code>
 +^  Method Arguments  ^^^
 +|//S32//^//%key//|Key associated with the column.|
 +|//U32//^//%index//|Index position to move the column to.\\ Valid range is **''< [[#getColumnCount()]]''** else the column will be moved to the end as the last column header in the list.|
 +| |||
 +|//void//^Returns|Nothing.|
 +\\ 
 +
 +
 +=== moveRow() ===
 +<code php>
 +// move a row to another index position
 +%control.moveRow(%key, %index);
 +</code>
 +^  Method Arguments  ^^^
 +|//S32//^//%key//|Key associated with the row.|
 +|//U32//^//%index//|Index position to move the row to.\\ Valid range is **''< [[#getRowCount()]]''** else the row will be moved to the end as the last list item in the list.|
 +| |||
 +|//void//^Returns|Nothing.|
 +\\ 
 +
 +
 +=== stripMarkup() ===
 +<code php>
 +// strip the markup tags off of the provided text
 +%cleaned = %control.stripMarkup(%text);
 +
 +// %cleaned now contains the text stripped of markup tags
 +</code>
 +^  Method Arguments  ^^^
 +|//string//^//%text//|Text string to be removed of all markup tags.|
 +| |||
 +|//string//^Returns|Text passed to the method stripped of markup tags.|
 +\\ 
 +
 +
 +=== updateSize() ===
 +<code php>
 +// update the control's dimensions as defined by the acculumative
 +// widths of all columns and heights of all rows.
 +%control.updateSize();
 +</code>
 +^  Method Arguments  ^^^
 +|This method does not take any arguments.|||
 +| |||
 +|//void//^Returns|Nothing.|
 +\\ 
 +
  
 ==== Callbacks ==== ==== Callbacks ====
programming/tge/controls/guimoderntextlistctrl.txt · Last modified: 2011/09/20 23:13 by Nathan Martin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki