nobody at rubyforge.org
2007-Apr-13 19:14 UTC
[Wxruby-development] [951] branches/wxruby2/wxwidgets_282: Additions to Grid API 2.6->2.8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><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;} --></style> <title>[951] branches/wxruby2/wxwidgets_282: Additions to Grid API 2.6->2.8</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>951</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2007-04-13 15:14:02 -0400 (Fri, 13 Apr 2007)</dd> </dl> <h3>Log Message</h3> <pre>Additions to Grid API 2.6->2.8</pre> <h3>Modified Paths</h3> <ul> <li><a href="#brancheswxruby2wxwidgets_282doctextilegridtxtl">branches/wxruby2/wxwidgets_282/doc/textile/grid.txtl</a></li> <li><a href="#brancheswxruby2wxwidgets_282swigclassesincludewxGridh">branches/wxruby2/wxwidgets_282/swig/classes/include/wxGrid.h</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="brancheswxruby2wxwidgets_282doctextilegridtxtl"></a> <div class="modfile"><h4>Modified: branches/wxruby2/wxwidgets_282/doc/textile/grid.txtl (950 => 951)</h4> <pre class="diff"><span> <span class="info">--- branches/wxruby2/wxwidgets_282/doc/textile/grid.txtl        2007-04-13 19:13:30 UTC (rev 950) +++ branches/wxruby2/wxwidgets_282/doc/textile/grid.txtl        2007-04-13 19:14:02 UTC (rev 951) </span><span class="lines">@@ -395,6 +395,15 @@ </span><span class="cx"> </span><span class="cx"> </span><span class="cx"> </span><ins>+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. + + + </ins><span class="cx"> h3(#Grid_candragcolsize). Grid#can_drag_col_size </span><span class="cx"> </span><span class="cx"> Boolean *can_drag_col_size*() </span><span class="lines">@@ -524,6 +533,15 @@ </span><span class="cx"> </span><span class="cx"> </span><span class="cx"> </span><ins>+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. + + + </ins><span class="cx"> h3(#Grid_disabledragcolsize). Grid#disable_drag_col_size </span><span class="cx"> </span><span class="cx"> *disable_drag_col_size*() </span><span class="lines">@@ -568,6 +586,14 @@ </span><span class="cx"> </span><span class="cx"> </span><span class="cx"> </span><ins>+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. + + + </ins><span class="cx"> h3(#Grid_enabledraggridsize). Grid#enable_drag_grid_size </span><span class="cx"> </span><span class="cx"> *enable_drag_grid_size*(%(arg-type)Boolean% enable = true) </span><span class="lines">@@ -732,6 +758,13 @@ </span><span class="cx"> </span><span class="cx"> </span><span class="cx"> </span><ins>+h3(#Grid_getcolat). Grid#get_col_at + + Integer *get_col_at*(%(arg-type)Integer% colPos) + +Returns the column ID of the specified column position. + + </ins><span class="cx"> h3(#Grid_getcolleft). Grid#get_col_left </span><span class="cx"> </span><span class="cx"> Integer *get_col_left*(%(arg-type)Integer% col) </span><span class="lines">@@ -788,6 +821,14 @@ </span><span class="cx"> </span><span class="cx"> </span><span class="cx"> </span><ins>+h3(#Grid_getcolpos). Grid#get_col_pos + + Integer *get_col_pos*(%(arg-type)Integer% colID) + +Returns the position of the specified column. + + + </ins><span class="cx"> h3(#Grid_getcolright). Grid#get_col_right </span><span class="cx"> </span><span class="cx"> Integer *get_col_right*(%(arg-type)Integer% col) </span><span class="lines">@@ -943,8 +984,65 @@ </span><span class="cx"> </span><span class="cx"> Returns the colour used for grid lines. </span><span class="cx"> </span><ins>+h4. See also </ins><span class="cx"> </span><ins>+"get_default_grid_line_pen()":#Grid_getdefaultgridlinepen() </ins><span class="cx"> </span><ins>+ +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. + + + + </ins><span class="cx"> h3(#Grid_gridlinesenabled). Grid#grid_lines_enabled </span><span class="cx"> </span><span class="cx"> Boolean *grid_lines_enabled*() </span><span class="lines">@@ -1703,6 +1801,14 @@ </span><span class="cx"> </span><span class="cx"> </span><span class="cx"> </span><ins>+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. + + + </ins><span class="cx"> h3(#Grid_setcolsize). Grid#set_col_size </span><span class="cx"> </span><span class="cx"> *set_col_size*(%(arg-type)Integer% col, %(arg-type)Integer% width) </span><span class="lines">@@ -2035,9 +2141,14 @@ </span><span class="cx"> </span><span class="cx"> h3(#Grid_xtocol). Grid#xto_col </span><span class="cx"> </span><del>- Integer *xto_col*(%(arg-type)Integer% x) </del><ins>+ Integer *xto_col*(%(arg-type)Integer% x, %(arg-type)Boolean% clipToMinMax = false) </ins><span class="cx"> </span><del>-Returns the grid column that corresponds to the logical x coordinate. Returns </del><ins>+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 </ins><span class="cx"> @NOT_FOUND@ if there is no column at the x position. </span><span class="cx"> </span><span class="cx"> </span><span class="lines">@@ -2064,6 +2175,6 @@ </span><span class="cx"> </span><span class="cx"> Integer *yto_row*(%(arg-type)Integer% y) </span><span class="cx"> </span><del>-Returns the grid row that corresponds to the logical y coordinate. Returns </del><ins>+Returns the grid row that corresponds to the logical y coordinate. Returns </ins><span class="cx"> @NOT_FOUND@ if there is no row at the y position. </span><span class="cx"> </span></span></pre></div> <a id="brancheswxruby2wxwidgets_282swigclassesincludewxGridh"></a> <div class="modfile"><h4>Modified: branches/wxruby2/wxwidgets_282/swig/classes/include/wxGrid.h (950 => 951)</h4> <pre class="diff"><span> <span class="info">--- branches/wxruby2/wxwidgets_282/swig/classes/include/wxGrid.h        2007-04-13 19:13:30 UTC (rev 950) +++ branches/wxruby2/wxwidgets_282/swig/classes/include/wxGrid.h        2007-04-13 19:14:02 UTC (rev 951) </span><span class="lines">@@ -215,6 +215,9 @@ </span><span class="cx"> wxString GetRowLabelValue( int row ); </span><span class="cx"> wxString GetColLabelValue( int col ); </span><span class="cx"> wxColour GetGridLineColour(); </span><ins>+ virtual wxPen GetDefaultGridLinePen(); + virtual wxPen GetRowGridLinePen(int row); + virtual wxPen GetColGridLinePen(int col); </ins><span class="cx"> wxColour GetCellHighlightColour(); </span><span class="cx"> int GetCellHighlightPenWidth(); </span><span class="cx"> int GetCellHighlightROPenWidth(); </span><span class="lines">@@ -240,10 +243,14 @@ </span><span class="cx"> void EnableDragColSize( bool enable = true ); </span><span class="cx"> void DisableDragColSize(); </span><span class="cx"> bool CanDragColSize(); </span><ins>+ void EnableDragColMove(); + void DisableDragColMove(); + bool CanDragColMove(); </ins><span class="cx"> void EnableDragGridSize(bool enable = true); </span><span class="cx"> void DisableDragGridSize(); </span><span class="cx"> bool CanDragGridSize(); </span><span class="cx"> </span><ins>+ </ins><span class="cx"> void EnableDragCell( bool enable = true ); </span><span class="cx"> void DisableDragCell(); </span><span class="cx"> bool CanDragCell(); </span><span class="lines">@@ -295,6 +302,9 @@ </span><span class="cx"> </span><span class="cx"> void SetColSize( int col, int width ); </span><span class="cx"> </span><ins>+        int GetColAt( int colPos ); + int GetColPos( int colID ) const; + </ins><span class="cx"> // automatically size the column or row to fit to its contents, if </span><span class="cx"> // setAsMin is true, this optimal width will also be set as minimal width </span><span class="cx"> // for this column </span></span></pre> </div> </div> </body> </html>
Maybe Matching Threads
- [903] branches/wxruby2/wxwidgets_282/samples: Added #!/usr/bin/env ruby to the grid sample.
- [976] branches/wxruby2/wxwidgets_282/samples/bigdemo/wxScrolledWindow.rbw: Remove deprecated begin_drawing and end_drawing calls
- [978] branches/wxruby2/wxwidgets_282/samples/bigdemo/wxScrolledWindow.rbw: Fix crazy crashers on MSW; fix scrolling/drawing position; safe path to bitmap
- [1000] branches/wxruby2/wxwidgets_282/swig/classes/include/wxPen.h: Default arguments for Wx::Pen constructors
- [883] branches/wxruby2/wxwidgets_282/swig: API changes for move to WxWidgets 2.8