[Wxruby-development] [951] branches/wxruby2/wxwidgets_282: Additions to Grid API 2.6->2.8

nobody at rubyforge.org
Fri, 13 Apr 2007 19:14:02 -0000

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<meta http-equiv="content-type"
content="text/html; charset=utf-8" /><style
type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:'':'';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family:
verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;
font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding:
6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid;
padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family:
verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch
.binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
-->
[951] branches/wxruby2/wxwidgets_282: Additions to Grid API
2.6->2.8





Revision 951
Author brokentoy
Date 2007-04-13 15:14:02 -0400 (Fri, 13 Apr
2007)


Log Message
Additions to Grid API 2.6->2.8

Modified Paths

<a
href="#brancheswxruby2wxwidgets_282doctextilegridtxtl">branches/wxruby2/wxwidgets_282/doc/textile/grid.txtl
<a
href="#brancheswxruby2wxwidgets_282swigclassesincludewxGridh">branches/wxruby2/wxwidgets_282/swig/classes/include/wxGrid.h




Diff
<a
id="brancheswxruby2wxwidgets_282doctextilegridtxtl">
Modified:
branches/wxruby2/wxwidgets_282/doc/textile/grid.txtl (950 => 951)

---
branches/wxruby2/wxwidgets_282/doc/textile/grid.txtl&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp2007-04-13
19:13:30 UTC (rev 950)
+++
branches/wxruby2/wxwidgets_282/doc/textile/grid.txtl&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp2007-04-13
19:14:02 UTC (rev 951)
@@ -395,6 +395,15 @@



+h3(#Grid_candragcolmove). Grid#can_drag_col_move
+
+ Boolean *can_drag_col_move*()
+
+Returns true if columns can be moved by dragging with the mouse. Columns can be
moved
+by dragging on their labels.
+
+
+
h3(#Grid_candragcolsize).
Grid#can_drag_col_size

Boolean *can_drag_col_size*()
@@ -524,6 +533,15 @@



+h3(#Grid_disabledragcolmove).
Grid#disable_drag_col_move
+
+  *disable_drag_col_move*()
+
+Disables column moving by dragging with the mouse. Equivalent to passing false
to
+"Grid#enable_drag_col_move":grid.html#Grid_enabledragcolmove.
+
+
+
h3(#Grid_disabledragcolsize).
Grid#disable_drag_col_size

*disable_drag_col_size*()
@@ -568,6 +586,14 @@



+h3(#Grid_enabledragcolmove). Grid#enable_drag_col_move
+
+  *enable_drag_col_move*(%(arg-type)Boolean% enable = true)
+
+Enables or disables column moving by dragging with the mouse.
+
+
+
h3(#Grid_enabledraggridsize).
Grid#enable_drag_grid_size


*enable_drag_grid_size*(%(arg-type)Boolean% enable = true)
@@ -732,6 +758,13 @@



+h3(#Grid_getcolat). Grid#get_col_at
+
+ Integer *get_col_at*(%(arg-type)Integer% colPos)
+
+Returns the column ID of the specified column position.
+
+
h3(#Grid_getcolleft).
Grid#get_col_left

Integer
*get_col_left*(%(arg-type)Integer% col)
@@ -788,6 +821,14 @@



+h3(#Grid_getcolpos). Grid#get_col_pos
+
+ Integer *get_col_pos*(%(arg-type)Integer% colID)
+
+Returns the position of the specified column.
+
+
+
h3(#Grid_getcolright).
Grid#get_col_right

Integer
*get_col_right*(%(arg-type)Integer% col)
@@ -943,8 +984,65 @@

Returns the colour used for grid
lines.

+h4. See also

+"get_default_grid_line_pen()":#Grid_getdefaultgridlinepen()

+
+h3(#Grid_getdefaultgridlinepen). Grid#get_default_grid_line_pen
+
+ "Pen":pen.html *get_default_grid_line_pen*()
+
+Returns the pen used for grid lines. This virtual function may be overridden in
+derived classes in order to change the appearance of grid lines. Note that
+currently the pen width must be $1$.
+
+h4. See also
+
+"get_col_grid_line_pen()":#Grid_getcolgridlinepen(),
+
+"get_row_grid_line_pen()":#Grid_getrowgridlinepen()
+
+
+
+
+h3(#Grid_getrowgridlinepen). Grid#get_row_grid_line_pen
+
+ "Pen":pen.html *get_row_grid_line_pen*(%(arg-type)Integer% row)
+
+Returns the pen used for horizontal grid lines. This virtual function may be
+overridden in derived classes in order to change the appearance of individual
+grid line for the given row row.
+
+Example:
+
+\\
+
+    // in a grid displaying music notation, use a solid black pen between
+    // octaves (C0=row 127, C1=row 115 etc.)
+    Pen MidiGrid::GetRowGridLinePen(int row)
+    {
+        if ( row          return Pen(*BLACK, 1, SOLID);
+        else
+           return GetDefaultGridLinePen();
+    }
+
+
+
+
+h3(#Grid_getcolgridlinepen). Grid#get_col_grid_line_pen
+
+ "Pen":pen.html *get_col_grid_line_pen*(%(arg-type)Integer% col)
+
+Returns the pen used for vertical grid lines. This virtual function may be
+overridden in derived classes in order to change the appearance of individual
+grid lines for the given column col.
+
+See "get_row_grid_line_pen()":#Grid_getrowgridlinepen() for an
example.
+
+
+
+
h3(#Grid_gridlinesenabled).
Grid#grid_lines_enabled

Boolean *grid_lines_enabled*()
@@ -1703,6 +1801,14 @@



+h3(#Grid_setcolpos). Grid#set_col_pos
+
+  *set_col_pos*(%(arg-type)Integer% colID,  %(arg-type)Integer% newPos)
+
+Sets the position of the specified column.
+
+
+
h3(#Grid_setcolsize).
Grid#set_col_size


*set_col_size*(%(arg-type)Integer% col,  %(arg-type)Integer% width)
@@ -2035,9 +2141,14 @@

h3(#Grid_xtocol). Grid#xto_col

- Integer *xto_col*(%(arg-type)Integer% x)
+ Integer *xto_col*(%(arg-type)Integer% x,
%(arg-type)Boolean% clipToMinMax = false)

-Returns the grid column that corresponds to the logical
x coordinate. Returns
+h4. Parameters
+* _x_ The x position to evaluate.
+* _clipToMinMax_ If true, rather than returning NOT_FOUND, it returns either
the first or last column depending on whether x is too far to the left or right
respectively.
+
+h4. Return value
+The grid column that corresponds to the logical x coordinate. Returns
@NOT_FOUND@ if there is no column
at the x position.


@@ -2064,6 +2175,6 @@

Integer
*yto_row*(%(arg-type)Integer% y)

-Returns the grid row that corresponds to the logical y
coordinate. Returns
+Returns the grid row that corresponds to the logical y
coordinate. Returns
@NOT_FOUND@ if there is no row at
the y position.


<a
id="brancheswxruby2wxwidgets_282swigclassesincludewxGridh">
Modified:
branches/wxruby2/wxwidgets_282/swig/classes/include/wxGrid.h (950 =>
951)

---
branches/wxruby2/wxwidgets_282/swig/classes/include/wxGrid.h&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp2007-04-13
19:13:30 UTC (rev 950)
+++
branches/wxruby2/wxwidgets_282/swig/classes/include/wxGrid.h&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp2007-04-13
19:14:02 UTC (rev 951)
@@ -215,6 +215,9 @@
wxString GetRowLabelValue(
int row );
wxString GetColLabelValue(
int col );
wxColour GetGridLineColour();
+ virtual wxPen GetDefaultGridLinePen();
+    virtual wxPen GetRowGridLinePen(int row);
+    virtual wxPen GetColGridLinePen(int col);
wxColour
GetCellHighlightColour();
int
GetCellHighlightPenWidth();
int
GetCellHighlightROPenWidth();
@@ -240,10 +243,14 @@
void EnableDragColSize(
bool enable = true );
void
DisableDragColSize();
bool CanDragColSize();
+ void EnableDragColMove();
+    void     DisableDragColMove();
+    bool     CanDragColMove();
void
EnableDragGridSize(bool enable = true);
void
DisableDragGridSize();
bool CanDragGridSize();

+
void EnableDragCell( bool
enable = true );
void DisableDragCell();
bool CanDragCell();
@@ -295,6 +302,9 @@

void SetColSize( int col,
int width );

+&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspint
GetColAt( int colPos );
+    int      GetColPos( int colID ) const;
+
// automatically size the
column or row to fit to its contents, if
// setAsMin is true, this
optimal width will also be set as minimal width
// for this column