Doc corrections,

Made colour dialog look slightly nicer,
  Removed generic file dialog from wxMotif


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-08-21 13:54:32 +00:00
parent ed58dbeab6
commit 4130b487dc
11 changed files with 106 additions and 68 deletions

View File

@@ -1,5 +1,5 @@
#
# This file was automatically generated by tmake at 20:22, 1999/08/20
# This file was automatically generated by tmake at 13:41, 1999/08/21
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T!
#
@@ -1782,18 +1782,18 @@ HEADERS = $(@GUIHEADERS@) $(HTML_HEADERS) $(UNIX_HEADERS) $(PROTOCOL_HEADERS) \
all: $(OBJECTS) @WX_TARGET_LIBRARY@ @WX_CREATE_LINKS@
@WX_LIBRARY_NAME_STATIC@: $(OBJECTS)
$(INSTALL) -d ./lib
@$(INSTALL) -d ./lib
$(AR) $(AROPTIONS) ./lib/$@ $(OBJECTS)
$(RANLIB) ./lib/$@
@WX_LIBRARY_NAME_SHARED@: $(OBJECTS)
$(INSTALL) -d ./lib
@$(INSTALL) -d ./lib
$(SHARED_LD) ./lib/$@ $(OBJECTS) $(EXTRALIBS)
CREATE_LINKS: ./lib/@WX_TARGET_LIBRARY@
$(RM) ./lib/@WX_LIBRARY_LINK1@
$(RM) ./lib/@WX_LIBRARY_LINK2@
$(RM) ./lib/@WX_LIBRARY_LINK3@
@$(RM) ./lib/@WX_LIBRARY_LINK1@
@$(RM) ./lib/@WX_LIBRARY_LINK2@
@$(RM) ./lib/@WX_LIBRARY_LINK3@
$(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK1@
$(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK2@
$(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK3@

View File

@@ -58,7 +58,7 @@ colrdlgg.cpp G G
dcpsg.cpp G U
dirdlgg.cpp G 16
fontdlgg.cpp G G
filedlgg.cpp G U
filedlgg.cpp G U,X
gridg.cpp G
helphtml.cpp G G
helpwxht.cpp G G

View File

@@ -483,18 +483,18 @@ HEADERS = $(@GUIHEADERS@) $(HTML_HEADERS) $(UNIX_HEADERS) $(PROTOCOL_HEADERS) \
all: $(OBJECTS) @WX_TARGET_LIBRARY@ @WX_CREATE_LINKS@
@WX_LIBRARY_NAME_STATIC@: $(OBJECTS)
$(INSTALL) -d ./lib
@$(INSTALL) -d ./lib
$(AR) $(AROPTIONS) ./lib/$@ $(OBJECTS)
$(RANLIB) ./lib/$@
@WX_LIBRARY_NAME_SHARED@: $(OBJECTS)
$(INSTALL) -d ./lib
@$(INSTALL) -d ./lib
$(SHARED_LD) ./lib/$@ $(OBJECTS) $(EXTRALIBS)
CREATE_LINKS: ./lib/@WX_TARGET_LIBRARY@
$(RM) ./lib/@WX_LIBRARY_LINK1@
$(RM) ./lib/@WX_LIBRARY_LINK2@
$(RM) ./lib/@WX_LIBRARY_LINK3@
@$(RM) ./lib/@WX_LIBRARY_LINK1@
@$(RM) ./lib/@WX_LIBRARY_LINK2@
@$(RM) ./lib/@WX_LIBRARY_LINK3@
$(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK1@
$(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK2@
$(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK3@

View File

@@ -85,9 +85,7 @@ MyDialog::MyDialog(wxFrame *parent, wxWindowID id, const wxString &title ) :
\wxheading{Derived from}
\helpref{wxSizer}{wxsizer}
\latexignore{\rtfignore{\wxheading{Members}}}
\helpref{wxObject}{wxobject}
\membersection{wxBoxSizer::wxBoxSizer}\label{wxboxsizerwxboxsizer}

View File

@@ -30,7 +30,7 @@
%\winhelponly{\\$$\image{1cm;0cm}{wxwin.wmf}$$}
}}
\winhelpignore{\author{Julian Smart, Robert Roebling, Vadim Zeitlin et al}
\date{August 6th 1999}
\date{August 25th 1999}
}
\makeindex
\begin{document}

View File

@@ -1,7 +1,8 @@
\section{\class{wxStaticBoxSizer}}\label{wxstaticboxsizer}
wxStaticBoxSizer is a sizer derived from wxBoxSizer. It is useful for
layouts which make use of static boxes in connection with sizers.
wxStaticBoxSizer is a sizer derived from wxBoxSizer but adds a static
box around the sizer. Note that this static box has to be created
separately.
See also \helpref{wxSizer}{wxsizer}, \helpref{wxStaticBox}{wxstaticbox} and
\helpref{wxBoxSizer}{wxboxsizer}.

View File

@@ -54,6 +54,21 @@ have no meaning in the wxSizer class itself, but as there currently is only one
deriving directly from wxSizer and this class does not override these methods, the meaning
of the paramters is described here:
\docparam{window}{The window to be added to the sizer. Its initial size (either set explicitly by the
user or calculated internally when using wxDefaultSize) is interpreted as the minimal and in many
cases also the initial size. This is particularly useful in connection with \helpref{SetSizeHint}{wxsizersetsizehints}. }
\docparam{sizer}{The (child-)sizer to be added to the sizer. This allows placing a child sizer in a
sizer and thus to create hierarchies of sizers (typically a vertical box as the top sizer and several
horizontal boxes on the level beneath).}
\docparam{width and height}{The dimension of a spacer to be added to the sizer. Adding spacers to sizers
gives more flexilibilty in the design of dialogs; imagine for example a vertical box with two buttons at the
bottom of a dialog: you might want to insert a space between the two buttons and make that space stretchable
using the {\it option} flag and the result will be that the left button will be aligned with the left
side of the dialog and the right button with the right side - the space in between will shrink and grow with
the dialog.}
\membersection{wxSizer::Prepend}\label{wxsizerprepend}
\func{void}{Prepend}{\param{wxWindow* }{window}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border = 0}}
@@ -63,7 +78,7 @@ of the paramters is described here:
\func{void}{Prepend}{\param{int }{width}, \param{int }{height}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border = 0}}
Same as \helpref{wxSizer::Add}{wxsizeradd}, but prepends the items to the beginning of the
list of items (windows, subsizers or spaces) own by this sizer.
list of items (windows, subsizers or spaces) owned by this sizer.
\membersection{wxSizer::Remove}\label{wxsizerremove}

View File

@@ -8,12 +8,14 @@ Classes: \helpref{wxStreamBase}{wxstreambase},
\wxheading{Purpose of wxStream}
We went into troubles with c++ std streams on some platform:
We went into troubles with C++ std streams on several platforms:
they react quite well in most cases, but in multi-threaded case, for example,
they have a LOT of problems.
they have many problems. Some Borland Compilers refuse to work at all
with them and using iostreams on Linux makes writing programs, that are
binary compatible across different Linux distributions, impossible.
Then, wxStreams have been built in wxWindows because an application should compile
and run on all supported platforms and we don't want users depend on release
Therefore, wxStreams have been added to wxWindows because an application should
compile and run on all supported platforms and we don't want users depend on release
X.XX of libg++ or some other compiler to run the program.
wxStreams is divided in two main parts:
@@ -55,29 +57,29 @@ code:
...
// The constructor initializes the stream buffer and open the file descriptor
// associated to the name of the file.
wxFileInputStream in\_stream("the\_file\_to\_be\_read");
wxFileInputStream in_stream("the_file_to_be_read");
// Ok, read some bytes ... nb\_datas is expressed in bytes.
in\_stream.Read(data, nb\_datas);
if (in\_stream.LastError() != wxStream\_NOERROR) {
// Ok, read some bytes ... nb_datas is expressed in bytes.
in_stream.Read(data, nb_datas);
if (in_stream.LastError() != wxStream_NOERROR) {
// Oh oh, something bad happens.
// For a complete list, look into the documentation at wxStreamBase.
}
// You can also inline all like this.
if (in\_stream.Read(data, nb\_datas).LastError() != wxStream\_NOERROR) {
if (in_stream.Read(data, nb_datas).LastError() != wxStream_NOERROR) {
// Do something.
}
// You can also get the last number of bytes REALLY put into the buffer.
size\_t really\_read = in\_stream.LastRead();
size_t really_read = in_stream.LastRead();
// Ok, moves to the beginning of the stream. SeekI returns the last position
// in the stream counted from the beginning.
off\_t old_position = in\_stream.SeekI(0, wxFromBeginning);
off_t old_position = in_stream.SeekI(0, wxFromBeginning);
// What is my current position ?
off\_t position = in\_stream.TellI();
off_t position = in_stream.TellI();
// wxFileInputStream will close the file descriptor on the destruction.
\end{verbatim}

View File

@@ -96,7 +96,7 @@ For example:
wxFileOutputStream output( "mytext.txt" );
wxTextOutputStream text( output );
output << "This is a text line\n";
output << "This is a text line" << endl;
output << 1234;
output << 1.23456;
\end{verbatim}

View File

@@ -1,8 +1,15 @@
\section{\class{wxWindow}}\label{wxwindow}
wxWindow is the base class for all windows. Any
children of the window will be deleted automatically by the destructor
before the window itself is deleted.
wxWindow is the base class for all windows. Any children of the window will be deleted
automatically by the destructor before the window itself is deleted.
Please note that we documented a number of handler functions (OnChar(), OnMouse() etc.) in this
help text. These must not be called by a user program and are documented only for illustration.
On several platforms, only a few of these handlers are actually written (they are not always
needed) and if you are uncertain on how to add a certain behaviour to a window class, intercept
the respective event as usual and call \helpref{wxEvent::Skip}{wxeventskip} so that the native
platform can implement its native behaviour or just ignore the event if nothing needs to be
done.
\wxheading{Derived from}
@@ -16,7 +23,7 @@ before the window itself is deleted.
\wxheading{Window styles}
The following styles can apply to all windows, although they will not always make sense for a particular
window class.
window class or on all platforms.
\twocolwidtha{5cm}%
\begin{twocollist}\itemsep=0pt
@@ -38,7 +45,7 @@ this style}
\twocolitem{\windowstyle{wxNO\_FULLREPAINT\_ON\_RESIZE}}{Disables repainting
the window completely when its size is changed - you will have to repaint the
new window area manually if you use style. Currently only has effect for
wxMSW.}
Windows.}
\twocolitem{\windowstyle{wxVSCROLL}}{Use this style to enable a vertical scrollbar. (Still used?) }
\twocolitem{\windowstyle{wxHSCROLL}}{Use this style to enable a horizontal scrollbar. (Still used?) }
\twocolitem{\windowstyle{wxCLIP\_CHILDREN}}{Use this style to eliminate flicker caused by the background being
@@ -792,7 +799,7 @@ Returns TRUE if the window is enabled for input, FALSE otherwise.
Returns TRUE if the given point or rectange area has been exposed since the
last repaint. Call this in an paint event handler to optimize redrawing by
only redrawing those area, which have been exposed.
only redrawing those areas, which have been exposed.
\membersection{wxWindow::IsRetained}\label{wxwindowisretained}

View File

@@ -32,6 +32,11 @@
#include "wx/layout.h"
#include "wx/dcclient.h"
#include "wx/slider.h"
#include "wx/sizer.h"
#endif
#if wxUSE_STATLINE
#include "wx/statline.h"
#endif
#include "wx/generic/colrdlgg.h"
@@ -111,7 +116,7 @@ static wxString wxColourDialogNames[NUM_COLS]={_T("ORANGE"),
_T("WHITE")
};
wxGenericColourDialog::wxGenericColourDialog(void)
wxGenericColourDialog::wxGenericColourDialog()
{
dialogParent = NULL;
whichKind = 1;
@@ -126,7 +131,7 @@ wxGenericColourDialog::wxGenericColourDialog(wxWindow *parent, wxColourData *dat
Create(parent, data);
}
wxGenericColourDialog::~wxGenericColourDialog(void)
wxGenericColourDialog::~wxGenericColourDialog()
{
}
@@ -149,7 +154,7 @@ bool wxGenericColourDialog::Create(wxWindow *parent, wxColourData *data)
return TRUE;
}
int wxGenericColourDialog::ShowModal(void)
int wxGenericColourDialog::ShowModal()
{
return wxDialog::ShowModal();
}
@@ -196,7 +201,7 @@ void wxGenericColourDialog::OnPaint(wxPaintEvent& event)
PaintHighlight(dc, TRUE);
}
void wxGenericColourDialog::CalculateMeasurements(void)
void wxGenericColourDialog::CalculateMeasurements()
{
smallRectangleSize.x = 18;
smallRectangleSize.y = 14;
@@ -226,40 +231,50 @@ void wxGenericColourDialog::CalculateMeasurements(void)
buttonY = customColoursRect.y + customColoursRect.height + 10;
}
void wxGenericColourDialog::CreateWidgets(void)
void wxGenericColourDialog::CreateWidgets()
{
wxBeginBusyCursor();
wxBeginBusyCursor();
wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(okButtonX, buttonY), wxSize(75,-1) );
int bw, bh;
okButton->GetSize(&bw, &bh);
(void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(okButtonX + bw + 20, buttonY), wxSize(75,-1));
(void) new wxButton(this, wxID_ADD_CUSTOM, _("Add to custom colours"),
wxPoint(customButtonX, buttonY));
int sliderX = singleCustomColourRect.x + singleCustomColourRect.width + sectionSpacing;
#ifdef __X__
int sliderSpacing = 75;
int sliderHeight = 160;
int sliderX = singleCustomColourRect.x + singleCustomColourRect.width + sectionSpacing;
#if defined(__WXMOTIF__)
int sliderSpacing = 65;
int sliderHeight = 160;
#else
int sliderSpacing = 45;
int sliderHeight = 160;
int sliderSpacing = 45;
int sliderHeight = 160;
#endif
redSlider = new wxSlider(this, wxID_RED_SLIDER, 0, 0, 255,
wxPoint(sliderX, 10), wxSize(-1, sliderHeight), wxVERTICAL|wxSL_LABELS);
greenSlider = new wxSlider(this, wxID_GREEN_SLIDER, 0, 0, 255,
wxPoint(sliderX + sliderSpacing, 10), wxSize(-1, sliderHeight), wxVERTICAL|wxSL_LABELS);
blueSlider = new wxSlider(this, wxID_BLUE_SLIDER, 0, 0, 255,
wxPoint(sliderX + 2*sliderSpacing, 10), wxSize(-1, sliderHeight), wxVERTICAL|wxSL_LABELS);
redSlider = new wxSlider(this, wxID_RED_SLIDER, 0, 0, 255,
wxPoint(sliderX, 10), wxSize(-1, sliderHeight), wxVERTICAL|wxSL_LABELS);
greenSlider = new wxSlider(this, wxID_GREEN_SLIDER, 0, 0, 255,
wxPoint(sliderX + sliderSpacing, 10), wxSize(-1, sliderHeight), wxVERTICAL|wxSL_LABELS);
blueSlider = new wxSlider(this, wxID_BLUE_SLIDER, 0, 0, 255,
wxPoint(sliderX + 2*sliderSpacing, 10), wxSize(-1, sliderHeight), wxVERTICAL|wxSL_LABELS);
SetClientSize(sliderX + 3*sliderSpacing, buttonY + bh + 20);
okButton->SetDefault();
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
Centre(wxBOTH);
// 1) space for explicitly layouted controls
topsizer->Add( sliderX + 3*sliderSpacing, sliderHeight+25 );
#if wxUSE_STATLINE
// 2) static line
topsizer->Add( new wxStaticLine( this, -1 ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
#endif
wxEndBusyCursor();
// 3) buttons
wxSizer *buttonsizer = CreateButtonSizer( wxOK|wxCANCEL );
buttonsizer->Add( new wxButton(this, wxID_ADD_CUSTOM, _("Add to custom colours") ), 0, wxLEFT|wxRIGHT, 10 );
topsizer->Add( buttonsizer, 0, wxCENTRE | wxALL, 10 );
SetAutoLayout( TRUE );
SetSizer( topsizer );
topsizer->SetSizeHints( this );
topsizer->Fit( this );
Centre( wxBOTH );
wxEndBusyCursor();
}
void wxGenericColourDialog::InitializeColours(void)