Integrate GTK documentation into doxygen

This commit is contained in:
Tobias Taschner
2018-10-03 18:55:02 +02:00
parent 1b5e3649e5
commit f8460059cd
4 changed files with 77 additions and 74 deletions

View File

@@ -292,6 +292,7 @@ WARN_LOGFILE = doxygen.log
INPUT = mainpages \ INPUT = mainpages \
groups \ groups \
overviews \ overviews \
../gtk \
../ios \ ../ios \
../msw \ ../msw \
../osx \ ../osx \

View File

@@ -52,8 +52,9 @@ GTK+ 1.2 can still be used, albeit discouraged. For that you can pass
Support for GTK+ 3 is available starting with wxWidgets 2.9.4, use @c configure Support for GTK+ 3 is available starting with wxWidgets 2.9.4, use @c configure
option @c \--with-gtk=3 to enable it. option @c \--with-gtk=3 to enable it.
For further information, please see the files in @c docs/gtk in the @subpage plat_gtk_install "Build and Install Instructions"
distribution.
@subpage plat_gtk_overview "wxWidgets on the GNOME Desktop"

View File

@@ -1,6 +1,8 @@
wxWidgets for GTK+ installation wxWidgets for GTK+ installation {#plat_gtk_install}
------------------------------- -------------------------------
[TOC]
IMPORTANT NOTE: IMPORTANT NOTE:
If you experience problems installing, please re-read these If you experience problems installing, please re-read these
@@ -13,19 +15,24 @@ IMPORTANT NOTE:
using (including the beta) and what compiler on what system. One using (including the beta) and what compiler on what system. One
example: wxGTK 3.0.0, GCC 4.8.1, Fedora 19 example: wxGTK 3.0.0, GCC 4.8.1, Fedora 19
* The simplest case Installation {#gtk_install}
============
The simplest case {#gtk_simple}
------------------- -------------------
If you compile wxWidgets on Linux for the first time and don't like to read If you compile wxWidgets on Linux for the first time and don't like to read
install instructions just do (in the base dir): install instructions just do (in the base dir):
> mkdir buildgtk > mkdir buildgtk
> cd buildgtk > cd buildgtk
> ../configure --with-gtk > ../configure --with-gtk
> make > make
> su <type root password> > su <type root password>
> make install > make install
> ldconfig > ldconfig
[if you get "ldconfig: command not found", try using "/sbin/ldconfig"] [if you get "ldconfig: command not found", try using "/sbin/ldconfig"]
If you don't do the 'make install' part, you can still use the libraries from If you don't do the 'make install' part, you can still use the libraries from
@@ -33,14 +40,14 @@ the buildgtk directory, but they may not be available to other users.
If you want to remove wxWidgets on Unix you can do this: If you want to remove wxWidgets on Unix you can do this:
> su <type root password> > su <type root password>
> make uninstall > make uninstall
> ldconfig > ldconfig
Note that by default, GTK+ 2.x is used. GTK+ 3 can be specified Note that by default, GTK+ 2.x is used. GTK+ 3 can be specified
with --with-gtk=3. with --with-gtk=3.
* The expert case The expert case {#gtk_expert}
----------------- -----------------
If you want to do some more serious cross-platform programming with wxWidgets, If you want to do some more serious cross-platform programming with wxWidgets,
@@ -53,28 +60,28 @@ with --enable-debug and one without.
For building three versions (one GTK+, one Motif and a debug version of the GTK For building three versions (one GTK+, one Motif and a debug version of the GTK
source) you'd do this: source) you'd do this:
mkdir buildmotif mkdir buildmotif
cd buildmotif cd buildmotif
../configure --with-motif ../configure --with-motif
make make
cd .. cd ..
mkdir buildgtk mkdir buildgtk
cd buildgtk cd buildgtk
../configure --with-gtk ../configure --with-gtk
make make
cd .. cd ..
mkdir buildgtkd mkdir buildgtkd
cd buildgtkd cd buildgtkd
../configure --with-gtk --enable-debug ../configure --with-gtk --enable-debug
make make
cd .. cd ..
Note that you can install all those libraries concurrently, you just need to Note that you can install all those libraries concurrently, you just need to
pass the appropriate flags when using them. pass the appropriate flags when using them.
* The simplest errors The simplest errors {#gtk_errors_simple}
--------------------- ---------------------
For any configure errors: please look at config.log file which was generated For any configure errors: please look at config.log file which was generated
@@ -101,18 +108,18 @@ GCC 2.95 or later.
You get immediate segfault when starting any sample or application: This is You get immediate segfault when starting any sample or application: This is
either due to having compiled the library with different flags or options than either due to having compiled the library with different flags or options than
your program - typically you might have the __WXDEBUG__ option set for the your program - typically you might have the `__WXDEBUG__` option set for the
library but not for your program - or due to using a compiler with optimisation library but not for your program - or due to using a compiler with optimisation
bugs. bugs.
* The simplest program The simplest program {#gtk_simple_app}
---------------------- ----------------------
Now create your super-application myfoo.cpp and compile anywhere with Now create your super-application myfoo.cpp and compile anywhere with
g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo
* GUI libraries GUI libraries {#gtk_libs_gui}
--------------- ---------------
wxWidgets/GTK+ requires the GTK+ library to be installed on your system. It has wxWidgets/GTK+ requires the GTK+ library to be installed on your system. It has
@@ -127,7 +134,7 @@ You can get the newest version of the GTK+ from the GTK+ homepage at:
We also mirror GTK+ at my ftp site. You'll find information about downloading We also mirror GTK+ at my ftp site. You'll find information about downloading
at my homepage. at my homepage.
* Additional libraries Additional libraries {#gtk_libs_misc}
---------------------- ----------------------
wxWidgets/Gtk requires a thread library and X libraries known to work with wxWidgets/Gtk requires a thread library and X libraries known to work with
@@ -138,14 +145,14 @@ correct glibc 2 support.
You can disable thread support by running You can disable thread support by running
./configure --disable-threads ./configure --disable-threads
make make
su <type root password> su <type root password>
make install make install
ldconfig ldconfig
exit exit
* Building wxGTK on Cygwin Building wxGTK on Cygwin {#gtk_cygwin}
-------------------------- --------------------------
The normal build instructions should work fine on Cygwin. The one difference The normal build instructions should work fine on Cygwin. The one difference
@@ -159,10 +166,11 @@ will see linking errors. If this happens then you can work around the
problem by setting LDFLAGS=-Wl,--export-all-symbols. Please also let us know problem by setting LDFLAGS=-Wl,--export-all-symbols. Please also let us know
about it on the wx-dev mailing list. about it on the wx-dev mailing list.
* Create your configuration Create your configuration {#gtk_config}
--------------------------- ---------------------------
Usage: Usage:
./configure options ./configure options
If you want to use system's C and C++ compiler, If you want to use system's C and C++ compiler,
@@ -182,7 +190,7 @@ have multiple configurations (for example, debug and release or GTK
and Motif) simultaneously. and Motif) simultaneously.
* General options General options {#gtk_options}
----------------- -----------------
Given below are the commands to change the default behaviour, Given below are the commands to change the default behaviour,
@@ -259,7 +267,7 @@ The following options handle the kind of library you want to build.
option instead of --enable-debug_info/flag ones option instead of --enable-debug_info/flag ones
separately. separately.
* Feature Options Feature Options {#gtk_feature_options}
----------------- -----------------
When producing an executable that is linked statically with wxGTK When producing an executable that is linked statically with wxGTK
@@ -316,7 +324,7 @@ Please see the output of "./configure --help" for comprehensive list
of all configurable options. of all configurable options.
* Compiling Compiling {#gtk_compling}
----------- -----------
The following must be done in the base directory (e.g. ~/wxGTK The following must be done in the base directory (e.g. ~/wxGTK
@@ -352,43 +360,36 @@ make clean
in the various directories will do the work for you. in the various directories will do the work for you.
* Creating a new Project Creating a new Project {#gtk_new_project}
-------------------------- --------------------------
1) The first way uses the installed libraries and header files 1. The first way uses the installed libraries and header files
automatically using wx-config automatically using wx-config
g++ myfoo.cpp `wx-config --cxxflags --libs` -o myfoo g++ myfoo.cpp `wx-config --cxxflags --libs` -o myfoo
Using this way, a make file for the minimal sample would look Using this way, a make file for the minimal sample would look
like this like this
CXX = g++ CXX = g++
minimal: minimal.o minimal: minimal.o
$(CXX) -o minimal minimal.o `wx-config --libs` $(CXX) -o minimal minimal.o `wx-config --libs`
minimal.o: minimal.cpp minimal.o: minimal.cpp
$(CXX) `wx-config --cxxflags` -c minimal.cpp -o minimal.o $(CXX) `wx-config --cxxflags` -c minimal.cpp -o minimal.o
clean: clean:
rm -f *.o minimal rm -f *.o minimal
If your application uses only some of wxWidgets libraries, you can If your application uses only some of wxWidgets libraries, you can
specify required libraries when running wx-config. For example, specify required libraries when running wx-config. For example,
`wx-config --libs=html,core` will only output link command to link `wx-config --libs=html,core` will only output link command to link
with libraries required by core GUI classes and wxHTML classes. See with libraries required by core GUI classes and wxHTML classes. See
the manual for more information on the libraries. the manual for more information on the libraries.
2) The other way creates a project within the source code 2. The other way creates a project within the source code
directories of wxWidgets. For this endeavour, you'll need directories of wxWidgets. For this endeavour, you'll need
GNU autoconf version 2.14 and add an entry to your Makefile.in GNU autoconf version 2.14 and add an entry to your Makefile.in
to the bottom of the configure.in script and run autoconf to the bottom of the configure.in script and run autoconf
and configure before you can type make. and configure before you can type make.
----------------------
In the hope that it will be useful,
Robert Roebling

View File

@@ -1,4 +1,4 @@
# wxWidgets on the GNOME Desktop # wxWidgets on the GNOME Desktop {#plat_gtk_overview}
wxWidgets is a C++ cross-platform GUI library, whose distintive feature is the wxWidgets is a C++ cross-platform GUI library, whose distintive feature is the
use of native calls and native widgets on the respective platform, i.e. an use of native calls and native widgets on the respective platform, i.e. an