nobody at rubyforge.org
2007-Mar-30 07:59 UTC
[Wxruby-development] [933] branches/wxruby2/wxwidgets_282: Font API 2.6 -> 2.8, corrections to Event doc
<!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>[933] branches/wxruby2/wxwidgets_282: Font API 2.6 -> 2.8,
corrections to Event doc</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>933</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2007-03-30 03:59:37 -0400 (Fri, 30 Mar
2007)</dd>
</dl>
<h3>Log Message</h3>
<pre>Font API 2.6 -> 2.8, corrections to Event doc</pre>
<h3>Modified Paths</h3>
<ul>
<li><a
href="#brancheswxruby2wxwidgets_282doctextilefonttxtl">branches/wxruby2/wxwidgets_282/doc/textile/font.txtl</a></li>
<li><a
href="#brancheswxruby2wxwidgets_282swigclassesincludewxFonth">branches/wxruby2/wxwidgets_282/swig/classes/include/wxFont.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a
id="brancheswxruby2wxwidgets_282doctextilefonttxtl"></a>
<div class="modfile"><h4>Modified:
branches/wxruby2/wxwidgets_282/doc/textile/font.txtl (932 => 933)</h4>
<pre class="diff"><span>
<span class="info">---
branches/wxruby2/wxwidgets_282/doc/textile/font.txtl        2007-03-30
07:53:06 UTC (rev 932)
+++
branches/wxruby2/wxwidgets_282/doc/textile/font.txtl        2007-03-30
07:59:37 UTC (rev 933)
</span><span class="lines">@@ -2,10 +2,8 @@
</span><span class="cx">
</span><span class="cx"> A font is an object which
determines the appearance of text. Fonts are
</span><span class="cx"> used for drawing text to a device
context, and setting the appearance of
</span><del>-a window''s text.
</del><ins>+a window''s text. You can retrieve the current
system font settings with "SystemSettings":systemsettings.html.
</ins><span class="cx">
</span><del>-You can retrieve the current system font settings with
"SystemSettings":systemsettings.html.
-
</del><span class="cx">
"SystemSettings":systemsettings.html
</span><span class="cx">
</span><span class="cx"> h2. Derived from
</span><span class="lines">@@ -115,9 +113,13 @@
</span><span class="cx">
</span><span class="cx"> FONTENCODING_MAX
</span><span class="cx">
</span><del>-h2. Predefined constants objects
</del><ins>+h2. Predefined font constants
</ins><span class="cx">
</span><del>-* @Wx::NORMAL_FONT@ *NullFont*
</del><ins>+Note that with the exception of @WX::NULL_FONT@, these
are not defined
+until the App''s main loop has begun.
+
+* @Wx::NULL_FONT@
+* @Wx::NORMAL_FONT@
</ins><span class="cx"> * @Wx::SMALL_FONT@
</span><span class="cx"> * @Wx::ITALIC_FONT@
</span><span class="cx"> * @Wx::SWISS_FONT@
</span><span class="lines">@@ -146,16 +148,18 @@
</span><span class="cx"> *
"Font#get_face_name":#Font_getfacename
</span><span class="cx"> *
"Font#get_family":#Font_getfamily
</span><span class="cx"> *
"Font#get_native_font_info_desc":#Font_getnativefontinfodesc
</span><ins>+*
"Font#get_native_font_info_user_desc":#Font_getnativefontinfouserdesc
</ins><span class="cx"> *
"Font#get_point_size":#Font_getpointsize
</span><span class="cx"> *
"Font#get_style":#Font_getstyle
</span><span class="cx"> *
"Font#get_underlined":#Font_getunderlined
</span><span class="cx"> *
"Font#get_weight":#Font_getweight
</span><span class="cx"> * "Font#new":#Font_new
</span><del>-* "Font#ok":#Font_ok
</del><ins>+* "Font#is_ok":#Font_isok
</ins><span class="cx"> *
"Font#set_default_encoding":#Font_setdefaultencoding
</span><span class="cx"> *
"Font#set_face_name":#Font_setfacename
</span><span class="cx"> *
"Font#set_family":#Font_setfamily
</span><span class="cx"> *
"Font#set_native_font_info":#Font_setnativefontinfo
</span><ins>+*
"Font#set_native_font_info_user_desc":#Font_setnativefontinfouserdesc
</ins><span class="cx"> *
"Font#set_point_size":#Font_setpointsize
</span><span class="cx"> *
"Font#set_style":#Font_setstyle
</span><span class="cx"> *
"Font#set_underlined":#Font_setunderlined
</span><span class="lines">@@ -191,6 +195,10 @@
</span><span class="cx">
</span><span class="cx"> h3(#Font_new). Font.new
</span><span class="cx">
</span><ins>+ *Font.new*(%(arg-type)Font% font)
+
+Copy constructor, uses "reference counting":trefcount.html.
+
</ins><span class="cx"> *Font.new*(%(arg-type)Integer%
pointSize, %(arg-type)FontFamily% family,
</span><span class="cx"> %(arg-type)Integer%
style,
</span><span class="cx"> %(arg-type)FontWeight%
weight,
</span><span class="lines">@@ -320,14 +328,28 @@
</span><span class="cx">
</span><span class="cx"> String
*get_native_font_info_desc*()
</span><span class="cx">
</span><del>-Returns the platform-dependent string completely
describing this font or an
-empty string if the font wasn''t constructed using the native font
description.
</del><ins>+Returns the platform-dependent string completely
describing this font.
+Returned string is always non-empty.
+Note that the returned string is not meant to be shown or edited by the user: a
typical
+use of this function is for serializing in string-form a Font object.
</ins><span class="cx">
</span><span class="cx"> h4. See also
</span><span class="cx">
</span><del>-"Font#set_native_font_info":font.html#Font_setnativefontinfo
</del><ins>+"Font#set_native_font_info":font.html#Font_setnativefontinfo,"Font#get_native_font_info_user_desc":font.html#Font_getnativefontinfouserdesc
</ins><span class="cx">
</span><span class="cx">
</span><ins>+h3(#Font_getnativefontinfouserdesc).
Font#get_native_font_info_user_desc
+
+ String *get_native_font_info_user_desc*()
+
+Returns a user-friendly string for this font object. Returned string is always
non-empty.
+Some examples of the formats of returned strings (which are platform-dependent)
are in
"set_native_font_info_user_desc":#Font_setnativefontinfouserdesc.
+
+h4. See also
+
+"Font#get_native_font_info_desc":font.html#Font_getnativefontinfodesc
+
+
</ins><span class="cx"> h3(#Font_getpointsize).
Font#get_point_size
</span><span class="cx">
</span><span class="cx"> Integer *get_point_size*()
</span><span class="lines">@@ -407,18 +429,19 @@
</span><span class="cx"> the given size in pixels on
platforms other than MSW.
</span><span class="cx">
</span><span class="cx">
</span><del>-h3(#Font_ok). Font#ok
</del><ins>+h3(#Font_isok). Font#is_ok
</ins><span class="cx">
</span><del>- Boolean *ok*()
</del><ins>+ Boolean *is_ok*()
</ins><span class="cx">
</span><span class="cx"> Returns @true@ if this object is
a valid font, @false@ otherwise.
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> h3(#Font_setfacename).
Font#set_face_name
</span><span class="cx">
</span><del>- *set_face_name*(%(arg-type)String% faceName)
</del><ins>+ Boolean *set_face_name*(%(arg-type)String% faceName)
</ins><span class="cx">
</span><span class="cx"> Sets the facename for the font.
</span><ins>+Returns if the given face name exists; otherwise.
</ins><span class="cx">
</span><span class="cx"> h4. Parameters
</span><span class="cx">
</span><span class="lines">@@ -464,14 +487,46 @@
</span><span class="cx">
</span><span class="cx"> h3(#Font_setnativefontinfo).
Font#set_native_font_info
</span><span class="cx">
</span><del>- *set_native_font_info*(%(arg-type)String% info)
</del><ins>+ Boolean *set_native_font_info*(%(arg-type)String% info)
</ins><span class="cx">
</span><del>-Creates the font corresponding to the given native font
description string
</del><ins>+Creates the font corresponding to the given native font
description string and returns if
+the creation was successful.
</ins><span class="cx"> which must have been previously
returned by
</span><span class="cx">
"get_native_font_info_desc":#Font_getnativefontinfodesc. If the string
is
</span><del>-invalid, font is unchanged.
</del><ins>+invalid, font is unchanged. This function is typically
used for de-serializing a Font
+object previously saved in a string-form.
</ins><span class="cx">
</span><ins>+h4. See also
</ins><span class="cx">
</span><ins>+"Font#set_native_font_info_user_desc":font.html#Font_setnativefontinfouserdesc
+
+
+h3(#Font_setnativefontinfouserdesc). Font#set_native_font_info_user_desc
+
+ Boolean *set_native_font_info_user_desc*(%(arg-type)String% info)
+
+Creates the font corresponding to the given native font description string and
returns if
+the creation was successful.
+Unlike "set_native_font_info":#Font_setnativefontinfo, this function
accepts
+strings which are user-friendly.
+Examples of accepted string formats are:
+
+
+
+|Generic syntax|Example|
+|on |*GTK2*: @$[FACE-NAME]$ $[bold]$ $[oblique|italic]$ $[POINTSIZE]$@Monospace
bold 10|
+|on |*MSW*: @$[light|bold]$ $[italic]$ $[FACE-NAME]$ $[POINTSIZE]$
$[ENCODING]$@Tahoma 10 WINDOWS-1252|
+|on |*Mac*: FIXMEFIXME|
+
+
+For more detailed information about the allowed syntaxes you can look at the
documentation of the native API used for font-rendering (e.g.
pango_font_description_from_stringhttp://developer.gnome.org/doc/API/2.0/pango/pango-Fonts.html\#pango-font-description-from-string).
+
+h4. See also
+
+"Font#set_native_font_info":font.html#Font_setnativefontinfo
+
+
+
</ins><span class="cx"> h3(#Font_setpointsize).
Font#set_point_size
</span><span class="cx">
</span><span class="cx">
*set_point_size*(%(arg-type)Integer% pointSize)
</span><span class="lines">@@ -537,30 +592,3 @@
</span><span class="cx"> h4. See also
</span><span class="cx">
</span><span class="cx">
"Font#get_weight":font.html#Font_getweight
</span><del>-
-
-h3(#Font_assignment). Font#-
- "Font":font.html *operator $=$*(%(arg-type)Font% font)
-
-Assignment operator, using reference counting. Returns a reference
-to `this''.
-
-
-h3(#Font_equals). Font#=-
- Boolean *operator $==$*(%(arg-type)Font% font)
-
-Equality operator. Two fonts are equal if they contain pointers
-to the same underlying font data. It does not compare each attribute,
-so two independently-created fonts using the same parameters will
-fail the test.
-
-
-h3(#Font_notequals). Font#!-
- Boolean *operator $!=$*(%(arg-type)Font% font)
-
-Inequality operator. Two fonts are not equal if they contain pointers
-to different underlying font data. It does not compare each attribute.
-
</del></span></pre></div>
<a
id="brancheswxruby2wxwidgets_282swigclassesincludewxFonth"></a>
<div class="modfile"><h4>Modified:
branches/wxruby2/wxwidgets_282/swig/classes/include/wxFont.h (932 =>
933)</h4>
<pre class="diff"><span>
<span class="info">---
branches/wxruby2/wxwidgets_282/swig/classes/include/wxFont.h        2007-03-30
07:53:06 UTC (rev 932)
+++
branches/wxruby2/wxwidgets_282/swig/classes/include/wxFont.h        2007-03-30
07:59:37 UTC (rev 933)
</span><span class="lines">@@ -16,15 +16,17 @@
</span><span class="cx"> wxString GetFaceName() const;
</span><span class="cx"> int GetFamily() const;
</span><span class="cx"> wxString
GetNativeFontInfoDesc() const;
</span><ins>+ wxString GetNativeFontInfoUserDesc();
</ins><span class="cx"> int GetPointSize() const;
</span><span class="cx"> int GetStyle() const;
</span><span class="cx"> bool GetUnderlined() const;
</span><span class="cx"> int GetWeight() const;
</span><del>- bool Ok() const;
</del><ins>+ bool IsOk() const;
</ins><span class="cx"> static void
SetDefaultEncoding(wxFontEncoding encoding ) ;
</span><span class="cx"> void SetFaceName(const
wxString& faceName ) ;
</span><span class="cx"> void SetFamily(int family ) ;
</span><span class="cx"> void SetNativeFontInfo(const
wxString& info ) ;
</span><ins>+ bool SetNativeFontInfoUserDesc(const wxString&
info);
</ins><span class="cx"> void SetPointSize(int pointSize
) ;
</span><span class="cx"> void SetStyle(int style ) ;
</span><span class="cx"> void SetUnderlined(const bool
underlined ) ;
</span></span></pre>
</div>
</div>
</body>
</html>
Reasonably Related Threads
- [1084] trunk/wxruby2/swig/classes/SystemSettings.i: Fix missing punctuation in SystemSettings typemaps
- Wx::SystemSettings
- [758] trunk/wxruby2: i18n support: added Locale class, methods for get/set languages & encodings
- [1080] trunk/wxruby2/swig: Moved typemaps specific to SystemSetting out of general typemap file
- [808] trunk/wxruby2: Make Wx::Colour#== work correctly as documented, tidy docs for that class
