]> git.saurik.com Git - wxWidgets.git/blame - samples/dialogs/tips.txt
Dtor for wxHtmlCell
[wxWidgets.git] / samples / dialogs / tips.txt
CommitLineData
70373b5a
JS
1Startup tips are documented in the "Startup tips overview" section of wxWindows documentation.
2These tips are being read from the tips.txt text file in this directory. Each line of the file contains a single tip.
3If you close and open this tips dialog, you will notice that the tip numbers start at the point you were at when you closed the dialog last time. This allows easy cycling through the entire list of tips, instead of always showing the initial tips over and over.
4Often you will want to save to the application's wxConfig, the last tip that the user saw, as well as whether they want to see tips on startup.
5Comments in the tips file have a # as the first character. Comments are automatically skipped over. See the tips.txt file in this directory for the example.
6# This line is a comment since it started with a #, and is skipped.
7Blank lines in the tip file are also automatically skipped over. Lines with only spaces are also considered empty.
8The next line in this tip file is empty, so it will be automatically skipped.
9
10The next line in this tip file is just empty spaces, so it is considered empty too, and is also automatically skipped.
11
12You can easily add translations to your startup tips via the usual gettext methods by wrapping a string in a gettext macro, which is _(""). See next tip for example.
13_("This tip is marked as a translatable string by wrapping it inside the usual gettext macro, so it can be collected by gettext and added to a translation catalog. Your application can then use this catalog and serve out a translated version of the tip.")
14Translatable strings must strictly begin with _(", not _( " or wxGetTranslation(" or something else.
15If you are using gettext translatable strings, don't forget to escape to replace any " characters within the tip with a \" instead
16_("This is a translatable tip with the quoted words \"Escape me\" properly escaped.")
17If you have very specialized needs, you can derive your own wxTipProvider and use that instead.
18If you want to modify the tip content at runtime for purposes other than translation (for example, variable expansion), one easy option is to use a custom tip provider derived from wxFileTipProvider. Your custom tip provider would contain a single virtual function to override: PreprocessTip().