-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from mcorino/develop
various type mapping and doc example fixes
- Loading branch information
Showing
9 changed files
with
175 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
:wxGridCellAttr.GetNonDefaultAlignment: | ||
:detail: | ||
:pre: | ||
:programlisting: | ||
- :pattern: !ruby/regexp /.*/ | ||
:replace: | | ||
```ruby | ||
h_align, v_align = attr.get_non_default_alignment | ||
h_align = Wx::ALIGN_RIGHT if h_align == Wx::ALIGN_INVALID | ||
``` | ||
:post: | ||
- :pattern: !ruby/regexp /Unlike\s.*\{Wx::Alignment::ALIGN_INVALID\}\./ | ||
:subst: 'Unlike {Wx::GRID::GridCellAttr#get_alignment} this function only returns hAlign and vAlign if this attribute does define a non-default alignment. Otherwise the returned value will be {Wx::ALIGN_INVALID}.' | ||
:wxGridCellAttr.GetAlignment: | ||
:detail: | ||
:post: | ||
- :pattern: !ruby/regexp /Notice\s.*desirable\./ | ||
:subst: 'Notice that valid hAlign and vAlign values (default or non-default) are always returned by this function, use {Wx::GRID::GridCellAttr#get_non_default_alignment} if this is not desirable.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
:wxGrid.GetRowGridLinePen: | ||
:detail: | ||
:pre: | ||
:programlisting: | ||
- :pattern: !ruby/regexp /.*/ | ||
:replace: | | ||
```ruby | ||
class MidiGrid < Wx::GRID::Grid | ||
# ... | ||
# in a grid displaying music notation, use a solid black pen between | ||
# octaves (C0=row 127, C1=row 115 etc.) | ||
def get_row_grid_line_pen(row) | ||
if row % 12 == 7 | ||
Wx::Pen.new(Wx::BLACK, 1, Wx::PENSTYLE_SOLID) | ||
else | ||
get_default_grid_line_pen | ||
end | ||
end | ||
end | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
:wxHtmlContainerCell.SetWidthFloat.w: | ||
:brief: | ||
:pre: | ||
:programlisting: | ||
- :pattern: !ruby/regexp /.*/ | ||
:replace: | | ||
```ruby | ||
set_width_float(-50, Wx::HTML::HTML_UNITS_PIXELS) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
:wxHtmlHelpController.AddBook: | ||
:detail: | ||
:pre: | ||
:programlisting: | ||
- :pattern: !ruby/regexp /.*/ | ||
:replace: | | ||
```ruby | ||
add_book('help.zip') | ||
``` | ||
:wxHtmlHelpController.SetViewer: | ||
:detail: | ||
:pre: | ||
:programlisting: | ||
- :pattern: !ruby/regexp /.*/ | ||
:replace: | | ||
```ruby | ||
@help.set_viewer('kdehelp') | ||
@help.set_viewer('gnome-help-browser') | ||
@help.set_viewer('netscape', Wx::HELP_NETSCAPE) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
:wxHtmlHelpWindow: | ||
:detail: | ||
:pre: | ||
:programlisting: | ||
- :pattern: !ruby/regexp /.*/ | ||
:replace: | | ||
```ruby | ||
# @embeddedHelpWindow is a wxHtmlHelpWindow | ||
# @embeddedHtmlHelp is a wxHtmlHelpController | ||
# | ||
# Create embedded HTML Help window | ||
@embeddedHelpWindow = Wx::HTML::HtmlHelpWindow.new | ||
@embeddedHtmlHelp.use_config(config, rootPath) # Set your own config object here | ||
@embeddedHtmlHelp.set_help_window(@embeddedHelpWindow) | ||
@embeddedHelpWindow.create(self, Wx::ID_ANY, | ||
size: get_client_size, | ||
style: Wx::TAB_TRAVERSAL|Wx::BORDER_NONE) | ||
@embeddedHtmlHelp.add_book('doc.zip') | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
:wxHtmlFilter.CanRead: | ||
:detail: | ||
:pre: | ||
:programlisting: | ||
- :pattern: !ruby/regexp /.*/ | ||
:replace: | | ||
```ruby | ||
class MyFilter < Wx::HTML::HtmlFilter | ||
# ... | ||
def can_read(file) | ||
file.get_mime_type == 'application/x-ugh' | ||
end | ||
# ... | ||
end | ||
``` | ||
:wxHtmlFilter.ReadFile: | ||
:detail: | ||
:pre: | ||
:programlisting: | ||
- :pattern: !ruby/regexp /.*/ | ||
:replace: | | ||
```ruby | ||
class MyFilter < Wx::HTML::HtmlFilter | ||
# ... | ||
def read_file(file) | ||
'<html><body><img src="' + file.get_location + '"></body></html>' | ||
end | ||
# ... | ||
end | ||
``` | ||
:wxHtmlWindow.SetPage: | ||
:detail: | ||
:pre: | ||
:programlisting: | ||
- :pattern: !ruby/regexp /.*/ | ||
:replace: | | ||
```ruby | ||
htmlwin.set_page('<html><body>Hello, world!</body></html>') | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters