Commit Graph

44 Commits

Author SHA1 Message Date
Robin Dunn
4a9d531345 Documentation tweaks for wxFontInfo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-30 20:07:58 +00:00
Vadim Zeitlin
b960795ea8 Add wxFontInfo class to allow using named parameters for wxFont creation.
This helper class allows to create wxFonts using shorter and more readable
code, e.g.

	wxFont font(12, wxFONTFLAG_DEFAULT,
		    wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, true,
		    "DejaVu Sans");

can now be written simply as

	wxFont font(wxFontInfo(12).FaceName("DejaVu Sans").Underlined());

Remove the ctor from font flags added in r70445 as it's not needed any longer
now that we have this one and adding it resulted in compilation errors in the
existing code which compiled with 2.8 because of ambiguities between that ctor
and wxFont(int size, int family, int style, int weight. bool underlined, ...)
one, e.g.

	wxFont(12, wxFONTFAMILY_SWISS, wxNORMAL, wxNORMAL)

didn't compile any more but it does compile again now.

See #9907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-30 10:27:38 +00:00
Robin Dunn
d4cb624111 wxBrushList and wxFontList do not derive from wxList.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-09 05:02:52 +00:00
Vadim Zeitlin
a349dc1085 Handle underlined and strikethrough attributes in wxGTK native font info.
These attributes were not handled by wxFont::GetNativeFontInfoDesc() as it
only serialized the Pango font description which doesn't support them.

Fix this by handling these attributes explicitly and prepending them to the
Pango font string if necessary.

Closes #14559.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-15 23:17:12 +00:00
Vadim Zeitlin
2253f18176 Add support for CP1258 (Vietnamese) and CP1361 (Korean Johab) encodings.
Recognize these encodings names and translate them to/from the corresponding
charset constants in wxMSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:46 +00:00
Vadim Zeitlin
e2e19a29ac Fix the type of global font constants in the documentation.
wxNORMAL_FONT, wxSMALL_FONT &c were documented as wxFont objects but they are
really wxFont pointers.

Closes #13917.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-03 00:24:09 +00:00
Vadim Zeitlin
c7a49742ec Add support for stricken-through fonts.
Support stricken-through fonts in wxMSW and wxGTK (including special support
in wxStaticText and wxTextCtrl).

Closes #9907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-23 11:28:28 +00:00
Vadim Zeitlin
0634700a96 Add wxFont ctor taking a single flags argument instead of style/weight/...
Currently this ctor just does the same thing as the existing ctors in a
different way but it will be extended to support wxFONTFLAG_STRIKETHROUGH in
the next commits.

See #9907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-23 11:28:21 +00:00
Robin Dunn
d775ec48a7 Interface updates for Phoenix. Add wxNativeFontInfo.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 01:28:20 +00:00
Robin Dunn
e932127792 fixes for missing or broken interface items for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-16 17:03:01 +00:00
Vadim Zeitlin
19da7aaa9b Add wxFont::SetSymbolicSize() and SetSymbolicSizeRelativeTo().
These methods allow to set the font size using CSS-like absolute size
specifications.

Notice that the factors used here are incompatible with (but better than) the
ones used in wxBuildFontSizes() in src/html/winpars.cpp. In the future it
would be nice to reuse the new wxFont functions in wxHTML code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:47:05 +00:00
Vadim Zeitlin
801423ee34 Add wxFont::Underlined() and MakeUnderlined() methods.
Add two more helpers for consistency with the existing methods such as Bold()
and MakeBold().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:46:59 +00:00
Vadim Zeitlin
59b7da02ff Return wxFONTFAMILY_DEFAULT, not UNKNOWN, from wxFont::GetFamily().
Although returning wxFONTFAMILY_UNKNOWN when the font family is not recognized
makes more sense, it breaks a lot of existing code including all the
font-related code generated by DialogBlocks, so prefer to return
wxFONTFAMILY_DEFAULT instead -- which can't be confused for a valid font
family neither but can be passed to wxFont ctor or SetFamily() without
problems.

To ensure that this behaviour is correctly implemented by all ports, rename
the existing wxFont::GetFamily() to DoGetFamily() and call the new method from
wxFontBase::GetFamily() which adjusts the return value if needed.

Closes #12330.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:46:09 +00:00
Vadim Zeitlin
3d4e20dd0b Added wxFONTENCODING_EUC_KR alias for wxFONTENCODING_CP949.
Although CP949 might not be exactly the same as EUC-KR it appears to be
similar enough and having a more familiar name for it is helpful for people
unfamiliar with Windows nomenclature.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-23 23:32:40 +00:00
Vadim Zeitlin
526954c596 Globally use "wxWindows licence" consistently.
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.

See #12165.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-13 13:29:13 +00:00
Vadim Zeitlin
efb0918296 Minor corrections to wxFont size-changing methods.
Closes #11959.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-21 13:17:36 +00:00
Vadim Zeitlin
64932e4105 No changes, just avoid overriding GetNativeFontInfoDesc() in wxMSW wxFont.
wxFont::GetNativeFontInfoDesc() and GetNativeFontInfoUserDesc() were
overridden just to ensure that the font is realized but it makes sense to do
it in wxFontRefData::GetNativeFontInfo() itself as detecting the face name
won't work if the font is not realized anyhow. And then we don't need these
functions at all as the only thing they do is checking that the font is valid
when they are called but this can be done in the base class itself as this
should happen in all ports (document that this is the case).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 02:34:01 +00:00
Vadim Zeitlin
6e7d2550ce wxFont::MakeXXX() and Scale() methods now modify the font in place; XXX() and Scaled() create new font
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-17 21:27:37 +00:00
Vadim Zeitlin
f76c075805 added convenient wxFont::Make{Bold,Italic,Smaller,Larger} and Scale() methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-12 20:11:21 +00:00
Francesco Montorsi
f7008bad87 mention that calling SetFaceName() with an invalid facename will invalidate the font object (see #10475)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-26 15:01:28 +00:00
Francesco Montorsi
060c4f9093 make clear that wxFont::SetFamily() does change the font face name, too (not only on wxGTK, also in wxMSW); reorganize docs for wxFont using doxygen groups; mention that GetFamily() is not very useful and returns a lot of times wxFONTFAMILY_UNKNOWN
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-26 14:55:07 +00:00
Francesco Montorsi
7ce58684a4 don't return whatever encoding was set in SetEncoding(); always return wxFONTENCODING_UTF8 instead since that's the real encoding always used by wxFont under wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-14 23:18:50 +00:00
Francesco Montorsi
6aea1e4a70 implement wxNativeFontInfo::SetFamily for wxGTK with the same logic used by wxMSW; remove the now useless m_family from wxGTK's wxFont implementation; better docs for many wxFont functions (don't use typeface term; use the 'face name' one instead) and wxFontFamily
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-12 22:53:26 +00:00
Vadim Zeitlin
20cc4e199e document wxFont(wxString) ctor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-07 10:41:30 +00:00
Francesco Montorsi
a912ea269e add a few comments about the fact that Get/SetNativeFontInfoUserDesc are not meant for 100%-precise serialization/deserialization of wxFont objects, at least under wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 12:44:15 +00:00
Francesco Montorsi
071de7a097 document that under wxMSW slant == italic
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 12:30:27 +00:00
Francesco Montorsi
8f1337ed68 use doxygen autolinking feature; use @ref command for the overview
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-18 15:30:06 +00:00
Francesco Montorsi
5449f13b12 fix leftover of previous commits about pixelSize ctor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-18 15:12:28 +00:00
Francesco Montorsi
b5791cc7af add the wxFont(const wxSize& pixelSize, ...) ctor to all ports; add some wxCHECK_MSGs to ensure that the wxSize objects contains non-negative arguments; document that passing zero for the width parameter is allowed; other minor doc fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-15 16:28:33 +00:00
Francesco Montorsi
9a6fda2288 do not use preprocessor macros in interface headers; doxygen doesn't know about preprocessor symbols used in the real headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-07 15:09:48 +00:00
Francesco Montorsi
882678ebb4 other ifacecheck fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-10 23:44:44 +00:00
Francesco Montorsi
e9c3992c39 s/""/wxEmptyString
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-10 18:31:45 +00:00
Bryan Petty
b21126db7a Replaced @ingroup with @addtogroup for all global func/macros for use with Doxygen 1.5.7+.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-05 20:48:06 +00:00
Francesco Montorsi
11e3af6e7e further ifacecheck fixes (now only 3.3% of documented methods have a wrong signature\!)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-13 21:32:53 +00:00
Francesco Montorsi
a44f3b5a89 ifacecheck manual fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-09 16:46:52 +00:00
Francesco Montorsi
2681874846 ifacecheck fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-08 15:25:07 +00:00
Francesco Montorsi
fadc2df682 automated ifacecheck fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-27 21:26:54 +00:00
Francesco Montorsi
0004982c83 virtual/static attributes automated fixes by ifacecheck
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-13 11:09:56 +00:00
Francesco Montorsi
adaaa68635 HUGE commit of ifacecheck-automated fixes to virtualness/constness/staticness of wxWidgets documented functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-27 11:21:10 +00:00
Francesco Montorsi
674d80a76f final f*h interface header reviews
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-25 20:00:31 +00:00
Francesco Montorsi
0b70c946a3 more f*h interface file revisions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-25 19:15:28 +00:00
Vadim Zeitlin
45a591faba more Doxygen warnings corrections and fixes from Tim S
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-30 23:58:45 +00:00
Bryan Petty
12f5e1e78f Commit 3 of 3 for Doxygen path fixes, this one finally removes all 600+ unnecessary uses of @wxheader and @headerfile.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-27 18:00:03 +00:00
Bryan Petty
ae3c17b401 Moved all interface headers into a 'wx' subdirectory for proper use of Doxygen path settings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-27 16:22:58 +00:00