Doc tweaks
Added back mouse sensitivity to wxStaticText Added code to widgets sample to test for sensitive wxStaticTexts git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
644231539d
commit
a9d171bd00
@ -650,7 +650,8 @@ Same as \helpref{Set}{wxdatetimewxdatetimetime}
|
||||
|
||||
\membersection{wxDateTime::wxDateTime}\label{wxdatetimewxdatetimedate}
|
||||
|
||||
\func{wxDateTime\&}{wxDateTime}{\param{wxDateTime\_t }{day}, \param{Month }{month = Inv\_Month}, \param{wxDateTime\_t }{hour = 0}, \param{wxDateTime\_t }{minute = 0}, \param{wxDateTime\_t }{second = 0}, \param{wxDateTime\_t }{millisec = 0}}
|
||||
\func{wxDateTime\&}{wxDateTime}{\param{wxDateTime\_t }{day}, \param{Month }{month = Inv\_Month}, \param{int}{ Inv_Year},
|
||||
\param{wxDateTime\_t }{hour = 0}, \param{wxDateTime\_t }{minute = 0}, \param{wxDateTime\_t }{second = 0}, \param{wxDateTime\_t }{millisec = 0}}
|
||||
|
||||
Same as \helpref{Set}{wxdatetimesetdate}
|
||||
|
||||
|
@ -3275,14 +3275,14 @@ Returns the number of seconds since local time 00:00:00 Jan 1st 1970.
|
||||
|
||||
\membersection{::wxGetLocalTimeMillis}\label{wxgetlocaltimemillis}
|
||||
|
||||
\func{wxLongLone}{wxGetLocalTimeMillis}{\void}
|
||||
\func{wxLongLong}{wxGetLocalTimeMillis}{\void}
|
||||
|
||||
Returns the number of milliseconds since local time 00:00:00 Jan 1st 1970.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDateTime::Now}{wxdatetimenow},\\
|
||||
\helpref{wxLongLone}{wxlonglong}
|
||||
\helpref{wxLongLong}{wxlonglong}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
|
@ -205,6 +205,37 @@ parameters and returns a tuple of values for xUnit and yUnit.}
|
||||
\perlnote{In wxPerl this method takes no parameters and returns a
|
||||
2-element list {\tt ( xUnit, yUnit )}.}
|
||||
|
||||
\membersection{wxScrolledWindow::GetViewStart}\label{wxscrolledwindowgetviewstart}
|
||||
|
||||
\constfunc{void}{GetViewStart}{\param{int* }{x}, \param{int* }{ y}}
|
||||
|
||||
Get the position at which the visible portion of the window starts.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{x}{Receives the first visible x position in scroll units.}
|
||||
|
||||
\docparam{y}{Receives the first visible y position in scroll units.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
If either of the scrollbars is not at the home position, {\it x} and/or
|
||||
\rtfsp{\it y} will be greater than zero. Combined with \helpref{wxWindow::GetClientSize}{wxwindowgetclientsize},
|
||||
the application can use this function to efficiently redraw only the
|
||||
visible portion of the window. The positions are in logical scroll
|
||||
units, not pixels, so to convert to pixels you will have to multiply
|
||||
by the number of pixels per scroll increment.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars}
|
||||
|
||||
\pythonnote{The wxPython version of this methods accepts no
|
||||
parameters and returns a tuple of values for x and y.}
|
||||
|
||||
\perlnote{In wxPerl this method takes no parameters and returns a
|
||||
2-element list {\tt ( x, y )}.}
|
||||
|
||||
\membersection{wxScrolledWindow::GetVirtualSize}\label{wxscrolledwindowgetvirtualsize}
|
||||
|
||||
\constfunc{void}{GetVirtualSize}{\param{int* }{x}, \param{int* }{y}}
|
||||
@ -376,34 +407,3 @@ parameter in SetScrollbars.
|
||||
Call this function to tell wxScrolledWindow to perform the actual scrolling on
|
||||
a different window (not on itself).
|
||||
|
||||
\membersection{wxScrolledWindow::GetViewStart}\label{wxscrolledwindowgetviewstart}
|
||||
|
||||
\constfunc{void}{GetViewStart}{\param{int* }{x}, \param{int* }{ y}}
|
||||
|
||||
Get the position at which the visible portion of the window starts.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{x}{Receives the first visible x position in scroll units.}
|
||||
|
||||
\docparam{y}{Receives the first visible y position in scroll units.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
If either of the scrollbars is not at the home position, {\it x} and/or
|
||||
\rtfsp{\it y} will be greater than zero. Combined with \helpref{wxWindow::GetClientSize}{wxwindowgetclientsize},
|
||||
the application can use this function to efficiently redraw only the
|
||||
visible portion of the window. The positions are in logical scroll
|
||||
units, not pixels, so to convert to pixels you will have to multiply
|
||||
by the number of pixels per scroll increment.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars}
|
||||
|
||||
\pythonnote{The wxPython version of this methods accepts no
|
||||
parameters and returns a tuple of values for x and y.}
|
||||
|
||||
\perlnote{In wxPerl this method takes no parameters and returns a
|
||||
2-element list {\tt ( x, y )}.}
|
||||
|
||||
|
@ -48,6 +48,7 @@ protected:
|
||||
virtual void DoSetSize(int x, int y, int w, int h,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticText)
|
||||
};
|
||||
|
@ -73,6 +73,27 @@ enum
|
||||
StaticVAlign_Max
|
||||
};
|
||||
|
||||
class DerivedStaticText: public wxStaticText
|
||||
{
|
||||
public:
|
||||
DerivedStaticText(wxWindow* parent, wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = 0):
|
||||
wxStaticText(parent, id, label, pos, size, style)
|
||||
{
|
||||
}
|
||||
void OnMouseEvent(wxMouseEvent& event)
|
||||
{
|
||||
if (event.LeftDown())
|
||||
wxMessageBox(wxT("Clicked on static text"));
|
||||
}
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
BEGIN_EVENT_TABLE(DerivedStaticText, wxStaticText)
|
||||
EVT_MOUSE_EVENTS(DerivedStaticText::OnMouseEvent)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// StaticWidgetsPage
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -324,7 +345,7 @@ void StaticWidgetsPage::CreateStatic()
|
||||
m_sizerStatBox = new wxStaticBoxSizer(box, isVert ? wxHORIZONTAL
|
||||
: wxVERTICAL);
|
||||
|
||||
m_statText = new wxStaticText(this, -1, m_textLabel->GetValue(),
|
||||
m_statText = new DerivedStaticText(this, -1, m_textLabel->GetValue(),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
flagsText);
|
||||
|
||||
|
@ -170,4 +170,13 @@ bool wxStaticText::SetFont(const wxFont& font)
|
||||
return ret;
|
||||
}
|
||||
|
||||
long wxStaticText::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
{
|
||||
// Ensure that static items get messages. Some controls don't like this
|
||||
// message to be intercepted (e.g. RichEdit), hence the tests.
|
||||
if (nMsg == WM_NCHITTEST)
|
||||
return (long)HTCLIENT;
|
||||
|
||||
return wxWindow::MSWWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
#endif // wxUSE_STATTEXT
|
||||
|
Loading…
Reference in New Issue
Block a user