moving forward
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -35,10 +35,12 @@
|
||||
In the case of the tip provider created by
|
||||
#wxCreateFileTipProvider, the tips are just
|
||||
the lines of the text file.
|
||||
|
||||
If you want to implement your own tip provider (for example, if you wish to
|
||||
hardcode the tips inside your program), you just have to derive another class
|
||||
from wxTipProvider and pass a pointer to the object of this class to wxShowTip
|
||||
- then you don't need wxCreateFileTipProvider at all.
|
||||
from wxTipProvider and pass a pointer to the object of this class to wxShowTip -
|
||||
then you don't need wxCreateFileTipProvider at all.
|
||||
|
||||
You will probably want to save somewhere the index of the tip last
|
||||
shown - so that the program doesn't always show the same tip on startup. As you
|
||||
also need to remember whether to show tips or not (you shouldn't do it if the
|
||||
@@ -47,9 +49,11 @@
|
||||
last shown tip (as returned by
|
||||
wxTipProvider::GetCurrentTip and the flag
|
||||
telling whether to show the tips at startup at all.
|
||||
|
||||
In a tips.txt file, lines that begin with a # character are considered comments
|
||||
and are automatically skipped. Blank lines and lines only having spaces are also
|
||||
skipped.
|
||||
|
||||
You can easily add runtime-translation capacity by placing each line of the
|
||||
tips.txt file inside the usual translation macro. For example, your tips.txt
|
||||
file would look like this:
|
||||
@@ -63,11 +67,14 @@
|
||||
for translatable strings. The tips will thus get included into your
|
||||
generated .po file catalog and be translated at runtime along with the rest of
|
||||
your application's translatable strings.
|
||||
|
||||
Note1: Each line in the tips.txt file needs to strictly begin with exactly the
|
||||
3 characters of underscore-parenthesis-doublequote, and end with
|
||||
doublequote-parenthesis, as shown above.
|
||||
|
||||
Note2: Remember to escape any doublequote characters within the tip string with
|
||||
a backslash-doublequote.
|
||||
|
||||
See the dialogs program in your samples folder for a working example inside a
|
||||
program.
|
||||
|
||||
|
@@ -11,33 +11,37 @@
|
||||
@page overview_toolbar Toolbar overview
|
||||
|
||||
Classes: #wxToolBar
|
||||
|
||||
The toolbar family of classes allows an application to use toolbars
|
||||
in a variety of configurations and styles.
|
||||
|
||||
The toolbar is a popular user interface component and contains a set of bitmap
|
||||
buttons or toggles. A toolbar gives faster access to an application's facilities than
|
||||
menus, which have to be popped up and selected rather laboriously.
|
||||
|
||||
Instead of supplying one toolbar class with a number
|
||||
of different implementations depending on platform, wxWidgets separates
|
||||
out the classes. This is because there are a number of different toolbar
|
||||
styles that you may wish to use simultaneously, and also, future
|
||||
toolbar implementations will emerge which
|
||||
cannot all be shoe-horned into the one class.
|
||||
|
||||
For each platform, the symbol @b wxToolBar is defined to be one of the
|
||||
specific toolbar classes.
|
||||
|
||||
The following is a summary of the toolbar classes and their differences.
|
||||
|
||||
|
||||
@b wxToolBarBase. This is a base class with pure virtual functions,
|
||||
- @b wxToolBarBase. This is a base class with pure virtual functions,
|
||||
and should not be used directly.
|
||||
@b wxToolBarSimple. A simple toolbar class written entirely with generic wxWidgets
|
||||
- @b wxToolBarSimple. A simple toolbar class written entirely with generic wxWidgets
|
||||
functionality. A simple 3D effect for buttons is possible, but it is not consistent
|
||||
with the Windows look and feel. This toolbar can scroll, and you can have arbitrary
|
||||
numbers of rows and columns.
|
||||
@b wxToolBarMSW. This class implements an old-style Windows toolbar, only on
|
||||
- @b wxToolBarMSW. This class implements an old-style Windows toolbar, only on
|
||||
Windows. There are small, three-dimensional buttons, which do not (currently) reflect
|
||||
the current Windows colour settings: the buttons are grey. This is the default wxToolBar
|
||||
on 16-bit windows.
|
||||
@b wxToolBar95. Uses the native Windows 95 toolbar class. It dynamically adjusts its
|
||||
- @b wxToolBar95. Uses the native Windows 95 toolbar class. It dynamically adjusts its
|
||||
background and button colours according to user colour settings.
|
||||
CreateTools must be called after the tools have been added.
|
||||
No absolute positioning is supported but you can specify the number
|
||||
@@ -46,11 +50,11 @@
|
||||
on Windows 95, Windows NT 4 and above. With the style wxTB_FLAT, the flat toolbar
|
||||
look is used, with a border that is highlighted when the cursor moves over the buttons.
|
||||
|
||||
|
||||
A toolbar might appear as a single row of images under
|
||||
the menubar, or it might be in a separate frame layout in several rows
|
||||
and columns. The class handles the layout of the images, unless explicit
|
||||
positioning is requested.
|
||||
|
||||
A tool is a bitmap which can either be a button (there is no 'state',
|
||||
it just generates an event when clicked) or it can be a toggle. If a
|
||||
toggle, a second bitmap can be provided to depict the 'on' state; if
|
||||
@@ -58,22 +62,23 @@
|
||||
will be used (for monochrome displays) or a thick border is drawn
|
||||
around the bitmap (for colour displays where inverting will not have
|
||||
the desired result).
|
||||
|
||||
The Windows-specific toolbar classes expect 16-colour bitmaps that are 16 pixels wide and 15 pixels
|
||||
high. If you want to use a different size, call @b SetToolBitmapSize
|
||||
as the demo shows, before adding tools to the button bar. Don't supply more than
|
||||
one bitmap for each tool, because the toolbar generates all three images (normal,
|
||||
depressed and checked) from the single bitmap you give it.
|
||||
@ref usingtoolbarlibrary_overview
|
||||
|
||||
@ref usingtoolbarlibrary
|
||||
|
||||
|
||||
@section usingtoolbarlibrary Using the toolbar library
|
||||
|
||||
Include @c "wx/toolbar.h", or if using a class directly, one of:
|
||||
|
||||
|
||||
@c "wx/msw/tbarmsw.h for wxToolBarMSW
|
||||
@c "wx/msw/tbar95.h for wxToolBar95
|
||||
@c "wx/tbarsmpl.h for wxToolBarSimple
|
||||
- @c "wx/msw/tbarmsw.h for wxToolBarMSW
|
||||
- @c "wx/msw/tbar95.h for wxToolBar95
|
||||
- @c "wx/tbarsmpl.h for wxToolBarSimple
|
||||
|
||||
|
||||
Example of toolbar use are given in the sample program "toolbar''. The
|
||||
|
Reference in New Issue
Block a user