wxWidgets/interface/wx/popupwin.h
Vadim Zeitlin 3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00

117 lines
2.8 KiB
Objective-C

/////////////////////////////////////////////////////////////////////////////
// Name: popupwin.h
// Purpose: interface of wxPopupWindow
// Author: wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
@class wxPopupWindow
A special kind of top level window used for popup menus,
combobox popups and such.
@library{wxcore}
@category{managedwnd}
@see wxDialog, wxFrame
*/
class wxPopupWindow: public wxNonOwnedWindow
{
public:
/**
Default constructor
*/
wxPopupWindow();
/**
Constructor
*/
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE);
/**
Create method for two-step creation
*/
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
/**
Move the popup window to the right position, i.e.\ such that it is
entirely visible.
The popup is positioned at ptOrigin + size if it opens below and to the
right (default), at ptOrigin - sizePopup if it opens above and to the
left etc.
@param ptOrigin
Must be given in screen coordinates!
@param sizePopup
The size of the popup window
*/
virtual void Position(const wxPoint& ptOrigin,
const wxSize& sizePopup);
};
/**
@class wxPopupTransientWindow
A wxPopupWindow which disappears automatically when the user clicks mouse
outside it or if it loses focus in any other way.
This window can be useful for implementing custom combobox-like controls
for example.
@library{wxcore}
@category{managedwnd}
@see wxPopupWindow
*/
class wxPopupTransientWindow : public wxPopupWindow
{
public:
/**
Default constructor.
*/
wxPopupTransientWindow();
/**
Constructor.
*/
wxPopupTransientWindow(wxWindow *parent, int flags = wxBORDER_NONE);
/**
Popup the window (this will show it too).
If @a winFocus is non-@NULL, it will be kept focused while this window
is shown, otherwise this window itself will receive focus. In any case,
the popup will disappear automatically if it loses focus because of a
user action.
@see Dismiss()
*/
virtual void Popup(wxWindow *focus = NULL);
/**
Hide the window.
*/
virtual void Dismiss();
/**
Called when a mouse is pressed while the popup is shown.
Return @true from here to prevent its normal processing by the popup
(which consists in dismissing it if the mouse is clicked outside it).
*/
virtual bool ProcessLeftDown(wxMouseEvent& event);
protected:
/**
This is called when the popup is disappeared because of anything
else but direct call to Dismiss().
*/
virtual void OnDismiss();
};