]> git.saurik.com Git - wxWidgets.git/blob - samples/dialogs/tips.txt
Remove wxRTTI macro for wxComboBox from Motif port.
[wxWidgets.git] / samples / dialogs / tips.txt
1 Startup tips are documented in the "Startup tips overview" section of wxWindows documentation.
2 These tips are being read from the tips.txt text file in this directory. Each line of the file contains a single tip.
3 If 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.
4 Often 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.
5 Comments 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.
7 Blank lines in the tip file are also automatically skipped over. Lines with only spaces are also considered empty.
8 The next line in this tip file is empty, so it will be automatically skipped.
9
10 The next line in this tip file is just empty spaces, so it is considered empty too, and is also automatically skipped.
11
12 You 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.")
14 Translatable strings must strictly begin with _(", not _( " or wxGetTranslation(" or something else.
15 If 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.")
17 If you have very specialized needs, you can derive your own wxTipProvider and use that instead.
18 If 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().