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
Last revisionBoth sides next revision
programming:tge:controls:guimoderntextlistctrl [2011/09/19 20:42] – [Download] fixed v1.01 download link Nathan Martinprogramming:tge:controls:guimoderntextlistctrl [2011/09/20 23:11] – [Methods] all methods are finally documented Nathan Martin
Line 155: Line 155:
 |//U32//^//%minWidth//|Minimum width in pixels that the column is constrained to. Default is 10 pixels.| |//U32//^//%minWidth//|Minimum width in pixels that the column is constrained to. Default is 10 pixels.|
 |//U32//^//%maxWidth//|Maximum width in pixels that the column is constrained to. Default is 250 pixels.| |//U32//^//%maxWidth//|Maximum width in pixels that the column is constrained to. Default is 250 pixels.|
-|//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 below for an explanation of the recognized keywords that are available for use.\\ \\ Columns are automatically applied the following keyword string equivalent attributes before processing provided flags:  ''"**left active show**"''|+|//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 below for an explanation of the recognized keywords that are available for use.\\ \\ Columns are automatically applied the following keyword string equivalent attributes before processing provided flags:  ''"**left active show**"''|
 | ||| | |||
 |//U32//^Returns|Index position of the just installed column.| |//U32//^Returns|Index position of the just installed column.|
Line 176: Line 176:
 <code php> <code php>
 // insert a row into the list // insert a row into the list
-%rowPos = %control.addRow(%key, %text, %index);+%rowPos = %control.addRow(%key, %text, %index, %flags);
  
 // %rowPos now holds the index position of the just inserted row // %rowPos now holds the index position of the just inserted row
Line 182: Line 182:
 ^  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**"''|
 | ||| | |||
 |//U32//^Returns|Index position of just inserted or appended row.| |//U32//^Returns|Index position of just inserted or appended row.|
 +
 +^  Row Flag Attributes  ^^
 +^//active//|Whether the row will be in an active/enabled state or not. Default is active.\\ Overall this just determines which colors to use for drawing the row text cells from the control's profile:\\ Active state -- ''fillColor'', ''borderColor'', and ''fontColor''.\\ Inactive state -- ''fillColorNA'', ''borderColorNA'', and ''fontColorNA''.\\ Use the //**!**// prefix to invert the meaning of the keyword as an opposite result.|
 +^//selectable//|Whether the row is user selectable in the list or not. Default is selectable.\\ Use the //**!**// prefix to invert the meaning of the keyword as an opposite result.|
 \\  \\ 
  
Line 195: Line 200:
 </code> </code>
 ^  Method Arguments  ^^^ ^  Method Arguments  ^^^
-|//U32//^//%index//|Index position of the row to be removed.\\ An invalid index position (//**index** >= **getRowCount()**//) will not cause any rows to be removed, but instead the procedure will be aborted.|+|//U32//^//%index//|Index position of the row to be removed.\\ An invalid index position (//**index** >= **[[#getRowCount()]]**//) will not cause any rows to be removed, but instead the procedure will be aborted.|
 | ||| | |||
 |//void//^Returns|Nothing.| |//void//^Returns|Nothing.|
Line 234: Line 239:
 | ||| | |||
 |//void//^Returns|Nothing.| |//void//^Returns|Nothing.|
 +\\ 
 +
 +
 +=== getColumnFlags() ===
 +<code php>
 +// get the column's textual flags
 +%colFlags = %control.getColumnFlags(%index);
 +
 +// %colFlags now holds the requested column's textual flags
 +</code>
 +^  Method Arguments  ^^^
 +|//U32//^//%index//|Index position of the column.|
 +| |||
 +|//string//^Returns|Column's textual flags on success. See **Column Flag Attributes** table in [[#addColumn()]] method section for details.\\ Empty (''""'') string on invalid column index.|
 \\  \\ 
  
Line 360: Line 379:
 | ||| | |||
 |//U32//^Returns|Number of rows| |//U32//^Returns|Number of rows|
 +\\ 
 +
 +
 +=== getRowFlags() ===
 +<code php>
 +// get the row's textual flags
 +%rowFlags = %control.getRowFlags(%index);
 +
 +// %rowFlags now holds the requested row's textual flags
 +</code>
 +^  Method Arguments  ^^^
 +|//U32//^//%index//|Index position of the row.|
 +| |||
 +|//string//^Returns|Row's textual flags on success. See **Row Flag Attributes** table in [[#addRow()]] method section for details.\\ Empty (''""'') string on invalid row index.|
 \\  \\ 
  
Line 423: Line 456:
 %control.setSelectedRow(%index); %control.setSelectedRow(%index);
  
-// this won't cause a OnRowSelect() callback event.+// this will not generate a OnRowSelect() callback event. 
 +</code> 
 +^  Method Arguments  ^^^ 
 +|//U32//^//%index//|Index position of the row.\\ Valid range is ''-1'', for selecting none of the rows, to **''< [[#getRowCount()]]''**| 
 +| ||| 
 +|//void//^Returns|Nothing.| 
 +\\  
 + 
 + 
 +=== setSortOrder() === 
 +<code php> 
 +// add or update an existing column sort order 
 +%control.setSortOrder(%sortOrder); 
 +</code> 
 +^  Method Arguments  ^^^ 
 +|//string//^//%sortOrder//|Sort order string in the format of ''"//**key order** [**makeFirst**]//"''. See the **Sort Orders** table below for details about the space delimited fields.\\ **Note**: The square brackets **//[]//** in the format string above means an optional field and those brackets are not supposed actually exist in the string.| 
 +| ||| 
 +|//void//^Returns|Nothing.| 
 + 
 +^  Sort Orders  ^^ 
 +^//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.| 
 +^//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> </code>
 ^  Method Arguments  ^^^ ^  Method Arguments  ^^^
 |//U32//^//%index//|Index position of the row.| |//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.| |//void//^Returns|Nothing.|
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