# Documentation morass

**URL:** <https://www.ruby-forum.com/t/documentation-morass/207360>\
**Category:** wxRuby\
**Created:** [May 24, 2011, 5:59pm UTC](https://www.ruby-forum.com/t/documentation-morass/207360 "2011-05-24T17:59:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [May 24, 2011, 5:59pm UTC](https://www.ruby-forum.com/t/documentation-morass/207360/1 "2011-05-24T17:59:39Z")

</div>

I am having a horrible time finding data that I need to learn ruby and  
wxruby. I even downloaded the source in order to try to use the  
Windows  
Search tools on it.

For Instance, the printing.rb sample starts with  
WXPRINT\_QUIT = WX::ID\_EXIT  
Using Windows to search the supposed source I do not find any string  
ID\_EXIT  
in any file.

Later in the printing.rb sample one finds the following code snippet

* * *

# GetTextExtent demo:

```
words = ["This ", "is ", "GetTextExtent ", "testing ", "string. ",

```

## "Enjoy ", “it!”] w, h = 0,0 x = 200 y= 250 fnt = Wx::Font.new(15, Wx::SWISS, Wx::NORMAL, Wx::NORMAL)

Once again a constant Wx::SWISS is not found by the windows search  
engine.

I may have the wrong source. Where do I get the right source?

Looking at the documentation on line is very frustrating. Can this  
documentation by downloaded and read with some tool?

Later

---

<div class="post-metadata">

**Author:** ![ann\_m](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e8cbc/32.png) [@ann\_m](https://www.ruby-forum.com/u/ann_m)\
**Post date:** [May 25, 2011, 11:22am UTC](https://www.ruby-forum.com/t/documentation-morass/207360/2 "2011-05-25T11:22:48Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Am 24.05.2011 17:31, schrieb Ann M.:

> I may have the wrong source. Where do I get the right source?
> 
> Looking at the documentation on line is very frustrating. Can this  
> documentation by downloaded and read with some tool?
> 
> Later

At least the documentation for the Font constants can be found in the  
online docs: [http://wxruby.rubyforge.org/doc/font.html](http://wxruby.rubyforge.org/doc/font.html) (right at the  
top).  
Regarding the various ID\_\* constants you can do this (assuming Ruby  
1.9):

ruby -rwx -e ‘puts Wx.constants.map(&:to\_s).grep(/^ID\_/).sort’

This will get you a complete and alphabetically ordered list of all ID\_\*  
constants defined. Usually their meaning is guessable from the name.

Vale,  
Marvin  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.11 (GNU/Linux)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org/](http://enigmail.mozdev.org/)

iQEcBAEBAgAGBQJN3LzKAAoJELh1XLHFkqhaShoH/2nBo52LBE+aQdqTiaLyMkgB  
Hmg0dlB0J4qm5fLs8T0+PhNFHWDnMgPBxJ9+EpiT+s6QfDYRA9zldnsCMUmWmAzy  
QcGGJ3QfXiQk7K8nMMqoaj/gwrholKW4p2HWNBtbbrf6Eixt13rAWDoANxSD9BXb  
QzKn9Mf3VqO6b2I/xuYvWbIXTflvLw/Zd9R0xSoio+1+X6pjZTtxkstsClzFfF55  
usjttGdAk0Kd2axjHrpdtXwf/SEETj8F5diOD9yPSdt/LpOE4bG7pzIolIg8ryBR  
hQM/e59UXa8Pk6iBFUJAnJY1IG9SAchN9gucBM0y7Cis1zOWuHw8Udh/Ot1fyhs=  
=LVYY  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![ann\_m](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e8cbc/32.png) [@ann\_m](https://www.ruby-forum.com/u/ann_m)\
**Post date:** [May 25, 2011, 9:19pm UTC](https://www.ruby-forum.com/t/documentation-morass/207360/3 "2011-05-25T21:19:45Z")

</div>

Hi,

2011/5/24 Ann M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I am having a horrible time finding data that I need to learn ruby and  
> wxruby. I even downloaded the source in order to try to use the Windows  
> Search tools on it.
> 
> For Instance, the printing.rb sample starts with  
> WXPRINT\_QUIT = WX::ID\_EXIT  
> Using Windows to search the supposed source I do not find any string ID\_EXIT  
> in any file.

Most wxRuby definitions (classes, constants) come from wxWidgets C++  
source code.  
So you will not see them as Ruby definitions in .rb files.  
SWIG is the glue that makes C++ definitions appears as Ruby definitions.  
So you need to look for C++ header files included in SWIG interface  
files (.i).

> Looking at the documentation on line is very frustrating. Can this  
> documentation by downloaded and read with some tool?

The HTML documentation can be downloaded from the rubyforge site :  
[http://rubyforge.org/frs/?group\_id=35](http://rubyforge.org/frs/?group_id=35)

Cheers,  
Chauk-Mean
