Instead of having wxComboCtrl mimic wxTextEntry interface, make it actually inherit...
[wxWidgets.git] / interface / wx / combo.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: combo.h
3 // Purpose: interface of wxComboCtrl and wxComboPopup
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxComboPopup
11
12 In order to use a custom popup with wxComboCtrl, an interface class must be
13 derived from wxComboPopup.
14
15 For more information on how to use it, see @ref comboctrl_custompopup.
16
17 @library{wxcore}
18 @category{ctrl}
19
20 @see wxComboCtrl
21 */
22 class wxComboPopup
23 {
24 public:
25 /**
26 Default constructor. It is recommended that internal variables are
27 prepared in Init() instead (because m_combo is not valid in
28 constructor).
29 */
30 wxComboPopup();
31
32 /**
33 The derived class must implement this to create the popup control.
34
35 @return @true if the call succeeded, @false otherwise.
36 */
37 virtual bool Create(wxWindow* parent) = 0;
38
39 /**
40 Utility function that hides the popup.
41 */
42 void Dismiss();
43
44 /**
45 The derived class may implement this to return adjusted size for the
46 popup control, according to the variables given.
47
48 @param minWidth
49 Preferred minimum width.
50 @param prefHeight
51 Preferred height. May be -1 to indicate no preference.
52 @param maxHeight
53 Max height for window, as limited by screen size.
54
55 @remarks This function is called each time popup is about to be shown.
56 */
57 virtual wxSize GetAdjustedSize(int minWidth, int prefHeight, int maxHeight);
58
59 /**
60 Returns pointer to the associated parent wxComboCtrl.
61 */
62 wxComboCtrl* GetComboCtrl() const;
63
64 /**
65 The derived class must implement this to return pointer to the
66 associated control created in Create().
67 */
68 virtual wxWindow* GetControl() = 0;
69
70 /**
71 The derived class must implement this to return string representation
72 of the value.
73 */
74 virtual wxString GetStringValue() const = 0;
75
76 /**
77 The derived class must implement this to initialize its internal
78 variables. This method is called immediately after construction
79 finishes. m_combo member variable has been initialized before the call.
80 */
81 virtual void Init();
82
83 /**
84 Utility method that returns @true if Create has been called.
85
86 Useful in conjunction with LazyCreate().
87 */
88 bool IsCreated() const;
89
90 /**
91 The derived class may implement this to return @true if it wants to
92 delay call to Create() until the popup is shown for the first time. It
93 is more efficient, but on the other hand it is often more convenient to
94 have the control created immediately.
95
96 @remarks Base implementation returns @false.
97 */
98 virtual bool LazyCreate();
99
100 /**
101 The derived class may implement this to do something when the parent
102 wxComboCtrl gets double-clicked.
103 */
104 virtual void OnComboDoubleClick();
105
106 /**
107 The derived class may implement this to receive key events from the
108 parent wxComboCtrl.
109
110 Events not handled should be skipped, as usual.
111 */
112 virtual void OnComboKeyEvent(wxKeyEvent& event);
113
114 /**
115 The derived class may implement this to do special processing when
116 popup is hidden.
117 */
118 virtual void OnDismiss();
119
120 /**
121 The derived class may implement this to do special processing when
122 popup is shown.
123 */
124 virtual void OnPopup();
125
126 /**
127 The derived class may implement this to paint the parent wxComboCtrl.
128
129 Default implementation draws value as string.
130 */
131 virtual void PaintComboControl(wxDC& dc, const wxRect& rect);
132
133 /**
134 The derived class must implement this to receive string value changes
135 from wxComboCtrl.
136 */
137 virtual void SetStringValue(const wxString& value);
138
139 protected:
140 /**
141 Parent wxComboCtrl. This member variable is prepared automatically
142 before Init() is called.
143 */
144 wxComboCtrl* m_combo;
145 };
146
147
148
149 /**
150 Features enabled for wxComboCtrl.
151
152 @see wxComboCtrl::GetFeatures()
153 */
154 struct wxComboCtrlFeatures
155 {
156 enum
157 {
158 MovableButton = 0x0001, ///< Button can be on either side of control.
159 BitmapButton = 0x0002, ///< Button may be replaced with bitmap.
160 ButtonSpacing = 0x0004, ///< Button can have spacing from the edge
161 ///< of the control.
162 TextIndent = 0x0008, ///< wxComboCtrl::SetMargins() can be used.
163 PaintControl = 0x0010, ///< Combo control itself can be custom painted.
164 PaintWritable = 0x0020, ///< A variable-width area in front of writable
165 ///< combo control's textctrl can be custom
166 ///< painted.
167 Borderless = 0x0040, ///< wxNO_BORDER window style works.
168
169 All = MovableButton | BitmapButton | ButtonSpacing |
170 TextIndent | PaintControl | PaintWritable |
171 Borderless ///< All features.
172 };
173 };
174
175
176 /**
177 @class wxComboCtrl
178
179 A combo control is a generic combobox that allows totally custom popup. In
180 addition it has other customization features. For instance, position and
181 size of the dropdown button can be changed.
182
183 @section comboctrl_custompopup Setting Custom Popup for wxComboCtrl
184
185 wxComboCtrl needs to be told somehow which control to use and this is done
186 by SetPopupControl(). However, we need something more than just a wxControl
187 in this method as, for example, we need to call
188 SetStringValue("initial text value") and wxControl doesn't have such
189 method. So we also need a wxComboPopup which is an interface which must be
190 implemented by a control to be usable as a popup.
191
192 We couldn't derive wxComboPopup from wxControl as this would make it
193 impossible to have a class deriving from a wxWidgets control and from it,
194 so instead it is just a mix-in.
195
196 Here's a minimal sample of wxListView popup:
197
198 @code
199 #include <wx/combo.h>
200 #include <wx/listctrl.h>
201
202 class wxListViewComboPopup : public wxListView, public wxComboPopup
203 {
204 public:
205 // Initialize member variables
206 virtual void Init()
207 {
208 m_value = -1;
209 }
210
211 // Create popup control
212 virtual bool Create(wxWindow* parent)
213 {
214 return wxListView::Create(parent,1,wxPoint(0,0),wxDefaultSize);
215 }
216
217 // Return pointer to the created control
218 virtual wxWindow *GetControl() { return this; }
219
220 // Translate string into a list selection
221 virtual void SetStringValue(const wxString& s)
222 {
223 int n = wxListView::FindItem(-1,s);
224 if ( n >= 0 && n < wxListView::GetItemCount() )
225 wxListView::Select(n);
226 }
227
228 // Get list selection as a string
229 virtual wxString GetStringValue() const
230 {
231 if ( m_value >= 0 )
232 return wxListView::GetItemText(m_value);
233 return wxEmptyString;
234 }
235
236 // Do mouse hot-tracking (which is typical in list popups)
237 void OnMouseMove(wxMouseEvent& event)
238 {
239 // TODO: Move selection to cursor
240 }
241
242 // On mouse left up, set the value and close the popup
243 void OnMouseClick(wxMouseEvent& WXUNUSED(event))
244 {
245 m_value = wxListView::GetFirstSelected();
246
247 // TODO: Send event as well
248
249 Dismiss();
250 }
251
252 protected:
253
254 int m_value; // current item index
255
256 private:
257 wxDECLARE_EVENT_TABLE();
258 };
259
260 wxBEGIN_EVENT_TABLE(wxListViewComboPopup, wxListView)
261 EVT_MOTION(wxListViewComboPopup::OnMouseMove)
262 EVT_LEFT_UP(wxListViewComboPopup::OnMouseClick)
263 wxEND_EVENT_TABLE()
264 @endcode
265
266 Here's how you would create and populate it in a dialog constructor:
267
268 @code
269 wxComboCtrl* comboCtrl = new wxComboCtrl(this, wxID_ANY, wxEmptyString);
270
271 wxListViewComboPopup* popupCtrl = new wxListViewComboPopup();
272
273 // It is important to call SetPopupControl() as soon as possible
274 comboCtrl->SetPopupControl(popupCtrl);
275
276 // Populate using wxListView methods
277 popupCtrl->InsertItem(popupCtrl->GetItemCount(), "First Item");
278 popupCtrl->InsertItem(popupCtrl->GetItemCount(), "Second Item");
279 popupCtrl->InsertItem(popupCtrl->GetItemCount(), "Third Item");
280 @endcode
281
282 @beginStyleTable
283 @style{wxCB_READONLY}
284 Text will not be editable.
285 @style{wxCB_SORT}
286 Sorts the entries in the list alphabetically.
287 @style{wxTE_PROCESS_ENTER}
288 The control will generate the event wxEVT_COMMAND_TEXT_ENTER
289 (otherwise pressing Enter key is either processed internally by the
290 control or used for navigation between dialog controls). Windows
291 only.
292 @style{wxCC_SPECIAL_DCLICK}
293 Double-clicking triggers a call to popup's OnComboDoubleClick.
294 Actual behaviour is defined by a derived class. For instance,
295 wxOwnerDrawnComboBox will cycle an item. This style only applies if
296 wxCB_READONLY is used as well.
297 @style{wxCC_STD_BUTTON}
298 Drop button will behave more like a standard push button.
299 @endStyleTable
300
301 @beginEventEmissionTable{wxCommandEvent}
302 @event{EVT_TEXT(id, func)}
303 Process a wxEVT_COMMAND_TEXT_UPDATED event, when the text changes.
304 @event{EVT_TEXT_ENTER(id, func)}
305 Process a wxEVT_COMMAND_TEXT_ENTER event, when RETURN is pressed in
306 the combo control.
307 @event{EVT_COMBOBOX_DROPDOWN(id, func)}
308 Process a wxEVT_COMMAND_COMBOBOX_DROPDOWN event, which is generated
309 when the popup window is shown (drops down).
310 @event{EVT_COMBOBOX_CLOSEUP(id, func)}
311 Process a wxEVT_COMMAND_COMBOBOX_CLOSEUP event, which is generated
312 when the popup window of the combo control disappears (closes up).
313 You should avoid adding or deleting items in this event.
314 @endEventTable
315
316 @library{wxbase}
317 @category{ctrl}
318 @appearance{comboctrl.png}
319
320 @see wxComboBox, wxChoice, wxOwnerDrawnComboBox, wxComboPopup,
321 wxCommandEvent
322 */
323 class wxComboCtrl : public wxControl,
324 public wxTextEntry
325 {
326 public:
327 /**
328 Default constructor.
329 */
330 wxComboCtrl();
331
332 /**
333 Constructor, creating and showing a combo control.
334
335 @param parent
336 Parent window. Must not be @NULL.
337 @param id
338 Window identifier. The value wxID_ANY indicates a default value.
339 @param value
340 Initial selection string. An empty string indicates no selection.
341 @param pos
342 Window position.
343 If ::wxDefaultPosition is specified then a default position is chosen.
344 @param size
345 Window size.
346 If ::wxDefaultSize is specified then the window is sized appropriately.
347 @param style
348 Window style. See wxComboCtrl.
349 @param validator
350 Window validator.
351 @param name
352 Window name.
353
354 @see Create(), wxValidator
355 */
356 wxComboCtrl(wxWindow* parent, wxWindowID id = wxID_ANY,
357 const wxString& value = wxEmptyString,
358 const wxPoint& pos = wxDefaultPosition,
359 const wxSize& size = wxDefaultSize,
360 long style = 0,
361 const wxValidator& validator = wxDefaultValidator,
362 const wxString& name = wxComboBoxNameStr);
363
364 /**
365 Destructor, destroying the combo control.
366 */
367 virtual ~wxComboCtrl();
368
369 /**
370 Copies the selected text to the clipboard.
371 */
372 virtual void Copy();
373
374 /**
375 Creates the combo control for two-step construction. Derived classes
376 should call or replace this function. See wxComboCtrl() for further
377 details.
378 */
379 bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
380 const wxString& value = wxEmptyString,
381 const wxPoint& pos = wxDefaultPosition,
382 const wxSize& size = wxDefaultSize,
383 long style = 0,
384 const wxValidator& validator = wxDefaultValidator,
385 const wxString& name = wxComboBoxNameStr);
386
387 /**
388 Copies the selected text to the clipboard and removes the selection.
389 */
390 virtual void Cut();
391
392 /**
393 Enables or disables popup animation, if any, depending on the value of
394 the argument.
395 */
396 void EnablePopupAnimation(bool enable = true);
397
398 /**
399 Returns disabled button bitmap that has been set with
400 SetButtonBitmaps().
401
402 @return A reference to the disabled state bitmap.
403 */
404 const wxBitmap& GetBitmapDisabled() const;
405
406 /**
407 Returns button mouse hover bitmap that has been set with
408 SetButtonBitmaps().
409
410 @return A reference to the mouse hover state bitmap.
411 */
412 const wxBitmap& GetBitmapHover() const;
413
414 /**
415 Returns default button bitmap that has been set with
416 SetButtonBitmaps().
417
418 @return A reference to the normal state bitmap.
419 */
420 const wxBitmap& GetBitmapNormal() const;
421
422 /**
423 Returns depressed button bitmap that has been set with
424 SetButtonBitmaps().
425
426 @return A reference to the depressed state bitmap.
427 */
428 const wxBitmap& GetBitmapPressed() const;
429
430 /**
431 Returns current size of the dropdown button.
432 */
433 wxSize GetButtonSize();
434
435 /**
436 Returns custom painted area in control.
437
438 @see SetCustomPaintWidth().
439 */
440 int GetCustomPaintWidth() const;
441
442 /**
443 Returns features supported by wxComboCtrl. If needed feature is
444 missing, you need to instead use wxGenericComboCtrl, which however may
445 lack a native look and feel (but otherwise sports identical API).
446
447 @return Value returned is a combination of the flags defined in
448 wxComboCtrlFeatures.
449 */
450 static int GetFeatures();
451
452 /**
453 Returns the current hint string.
454
455 See SetHint() for more information about hints.
456
457 @since 2.9.1
458 */
459 virtual wxString GetHint() const;
460
461 /**
462 Returns the insertion point for the combo control's text field.
463
464 @note Under Windows, this function always returns 0 if the combo
465 control doesn't have the focus.
466 */
467 virtual long GetInsertionPoint() const;
468
469 /**
470 Returns the last position in the combo control text field.
471 */
472 virtual long GetLastPosition() const;
473
474 /**
475 Returns the margins used by the control. The @c x field of the returned
476 point is the horizontal margin and the @c y field is the vertical one.
477
478 @remarks If given margin cannot be accurately determined, its value
479 will be set to -1.
480
481 @see SetMargins()
482
483 @since 2.9.1
484 */
485 wxPoint GetMargins() const;
486
487 /**
488 Returns current popup interface that has been set with
489 SetPopupControl().
490 */
491 wxComboPopup* GetPopupControl();
492
493 /**
494 Returns popup window containing the popup control.
495 */
496 wxWindow* GetPopupWindow() const;
497
498 /**
499 Get the text control which is part of the combo control.
500 */
501 wxTextCtrl* GetTextCtrl() const;
502
503 /**
504 Returns actual indentation in pixels.
505
506 @deprecated Use GetMargins() instead.
507 */
508 wxCoord GetTextIndent() const;
509
510 /**
511 Returns area covered by the text field (includes everything except
512 borders and the dropdown button).
513 */
514 const wxRect& GetTextRect() const;
515
516 /**
517 Returns text representation of the current value. For writable combo
518 control it always returns the value in the text field.
519 */
520 virtual wxString GetValue() const;
521
522 /**
523 Dismisses the popup window.
524
525 @param generateEvent
526 Set this to @true in order to generate
527 wxEVT_COMMAND_COMBOBOX_CLOSEUP event.
528 */
529 virtual void HidePopup(bool generateEvent=false);
530
531 /**
532 Returns @true if the popup is currently shown
533 */
534 bool IsPopupShown() const;
535
536 /**
537 Returns @true if the popup window is in the given state. Possible
538 values are:
539
540 @beginTable
541 @row2col{wxComboCtrl::Hidden, Popup window is hidden.}
542 @row2col{wxComboCtrl::Animating, Popup window is being shown, but the
543 popup animation has not yet finished.}
544 @row2col{wxComboCtrl::Visible, Popup window is fully visible.}
545 @endTable
546 */
547 bool IsPopupWindowState(int state) const;
548
549 /**
550 Implement in a derived class to define what happens on dropdown button
551 click. Default action is to show the popup.
552
553 @note If you implement this to do something else than show the popup,
554 you must then also implement DoSetPopupControl() to always return
555 @NULL.
556 */
557 virtual void OnButtonClick();
558
559 /**
560 Pastes text from the clipboard to the text field.
561 */
562 virtual void Paste();
563
564 /**
565 Removes the text between the two positions in the combo control text
566 field.
567
568 @param from
569 The first position.
570 @param to
571 The last position.
572 */
573 virtual void Remove(long from, long to);
574
575 /**
576 Replaces the text between two positions with the given text, in the
577 combo control text field.
578
579 @param from
580 The first position.
581 @param to
582 The second position.
583 @param text
584 The text to insert.
585 */
586 virtual void Replace(long from, long to, const wxString& text);
587
588 /**
589 Sets custom dropdown button graphics.
590
591 @param bmpNormal
592 Default button image.
593 @param pushButtonBg
594 If @true, blank push button background is painted below the image.
595 @param bmpPressed
596 Depressed button image.
597 @param bmpHover
598 Button image when mouse hovers above it. This should be ignored on
599 platforms and themes that do not generally draw different kind of
600 button on mouse hover.
601 @param bmpDisabled
602 Disabled button image.
603 */
604 void SetButtonBitmaps(const wxBitmap& bmpNormal,
605 bool pushButtonBg = false,
606 const wxBitmap& bmpPressed = wxNullBitmap,
607 const wxBitmap& bmpHover = wxNullBitmap,
608 const wxBitmap& bmpDisabled = wxNullBitmap);
609
610 /**
611 Sets size and position of dropdown button.
612
613 @param width
614 Button width. Value = 0 specifies default.
615 @param height
616 Button height. Value = 0 specifies default.
617 @param side
618 Indicates which side the button will be placed. Value can be wxLEFT
619 or wxRIGHT.
620 @param spacingX
621 Horizontal spacing around the button. Default is 0.
622 */
623 void SetButtonPosition(int width = -1, int height = -1,
624 int side = wxRIGHT, int spacingX = 0);
625
626 /**
627 Set width, in pixels, of custom painted area in control without
628 @c wxCB_READONLY style. In read-only wxOwnerDrawnComboBox, this is used
629 to indicate area that is not covered by the focus rectangle.
630 */
631 void SetCustomPaintWidth(int width);
632
633 /**
634 Sets a hint shown in an empty unfocused combo control.
635
636 Notice that hints are known as <em>cue banners</em> under MSW or
637 <em>placeholder strings</em> under OS X.
638
639 @see wxTextEntry::SetHint()
640
641 @since 2.9.1
642 */
643 virtual void SetHint(const wxString& hint);
644
645 /**
646 Sets the insertion point in the text field.
647
648 @param pos
649 The new insertion point.
650 */
651 virtual void SetInsertionPoint(long pos);
652
653 /**
654 Sets the insertion point at the end of the combo control text field.
655 */
656 virtual void SetInsertionPointEnd();
657
658 //@{
659 /**
660 Attempts to set the control margins. When margins are given as wxPoint,
661 x indicates the left and y the top margin. Use -1 to indicate that
662 an existing value should be used.
663
664 @return
665 @true if setting of all requested margins was successful.
666
667 @since 2.9.1
668 */
669 bool SetMargins(const wxPoint& pt);
670 bool SetMargins(wxCoord left, wxCoord top = -1);
671 //@}
672
673 /**
674 Set side of the control to which the popup will align itself. Valid
675 values are @c wxLEFT, @c wxRIGHT and 0. The default value 0 means that
676 the most appropriate side is used (which, currently, is always
677 @c wxLEFT).
678 */
679 void SetPopupAnchor(int anchorSide);
680
681 /**
682 Set popup interface class derived from wxComboPopup. This method should
683 be called as soon as possible after the control has been created,
684 unless OnButtonClick() has been overridden.
685 */
686 void SetPopupControl(wxComboPopup* popup);
687
688 /**
689 Extends popup size horizontally, relative to the edges of the combo
690 control.
691
692 @param extLeft
693 How many pixel to extend beyond the left edge of the control.
694 Default is 0.
695 @param extRight
696 How many pixel to extend beyond the right edge of the control.
697 Default is 0.
698
699 @remarks Popup minimum width may override arguments. It is up to the
700 popup to fully take this into account.
701 */
702 void SetPopupExtents(int extLeft, int extRight);
703
704 /**
705 Sets preferred maximum height of the popup.
706
707 @remarks Value -1 indicates the default.
708 */
709 void SetPopupMaxHeight(int height);
710
711 /**
712 Sets minimum width of the popup. If wider than combo control, it will
713 extend to the left.
714
715 @remarks Value -1 indicates the default. Also, popup implementation may
716 choose to ignore this.
717 */
718 void SetPopupMinWidth(int width);
719
720 /**
721 Selects the text between the two positions, in the combo control text
722 field.
723
724 @param from
725 The first position.
726 @param to
727 The second position.
728 */
729 virtual void SetSelection(long from, long to);
730
731 /**
732 Sets the text for the text field without affecting the popup. Thus,
733 unlike SetValue(), it works equally well with combo control using
734 @c wxCB_READONLY style.
735 */
736 void SetText(const wxString& value);
737
738 /**
739 Set a custom window style for the embedded wxTextCtrl. Usually you
740 will need to use this during two-step creation, just before Create().
741 For example:
742
743 @code
744 wxComboCtrl* comboCtrl = new wxComboCtrl();
745
746 // Let's make the text right-aligned
747 comboCtrl->SetTextCtrlStyle(wxTE_RIGHT);
748
749 comboCtrl->Create(parent, wxID_ANY, wxEmptyString);
750 @endcode
751 */
752 void SetTextCtrlStyle( int style );
753
754 /**
755 This will set the space in pixels between left edge of the control and
756 the text, regardless whether control is read-only or not. Value -1 can
757 be given to indicate platform default.
758
759 @deprecated Use SetMargins() instead.
760 */
761 void SetTextIndent(int indent);
762
763 /**
764 Sets the text for the combo control text field.
765
766 @note For a combo control with @c wxCB_READONLY style the string must
767 be accepted by the popup (for instance, exist in the dropdown
768 list), otherwise the call to SetValue() is ignored.
769 */
770 virtual void SetValue(const wxString& value);
771
772 /**
773 Same as SetValue(), but also sends wxCommandEvent of type
774 wxEVT_COMMAND_TEXT_UPDATED if @a withEvent is @true.
775 */
776 void SetValueWithEvent(const wxString& value, bool withEvent = true);
777
778 /**
779 Show the popup.
780 */
781 virtual void ShowPopup();
782
783 /**
784 Undoes the last edit in the text field. Windows only.
785 */
786 virtual void Undo();
787
788 /**
789 Enable or disable usage of an alternative popup window, which
790 guarantees ability to focus the popup control, and allows common native
791 controls to function normally. This alternative popup window is usually
792 a wxDialog, and as such, when it is shown, its parent top-level window
793 will appear as if the focus has been lost from it.
794 */
795 void UseAltPopupWindow(bool enable = true);
796
797 protected:
798
799 /**
800 This member function is not normally called in application code.
801 Instead, it can be implemented in a derived class to create a custom
802 popup animation.
803
804 The parameters are the same as those for DoShowPopup().
805
806 @return @true if animation finishes before the function returns,
807 @false otherwise. In the latter case you need to manually call
808 DoShowPopup() after the animation ends.
809 */
810 virtual bool AnimateShow(const wxRect& rect, int flags);
811
812 /**
813 This member function is not normally called in application code.
814 Instead, it can be implemented in a derived class to return default
815 wxComboPopup, incase @a popup is @NULL.
816
817 @note If you have implemented OnButtonClick() to do something else than
818 show the popup, then DoSetPopupControl() must always set @a popup
819 to @NULL.
820 */
821 virtual void DoSetPopupControl(wxComboPopup* popup);
822
823 /**
824 This member function is not normally called in application code.
825 Instead, it must be called in a derived class to make sure popup is
826 properly shown after a popup animation has finished (but only if
827 AnimateShow() did not finish the animation within its function scope).
828
829 @param rect
830 Position to show the popup window at, in screen coordinates.
831 @param flags
832 Combination of any of the following:
833 @beginTable
834 @row2col{wxComboCtrl::ShowAbove,
835 Popup is shown above the control instead of below.}
836 @row2col{wxComboCtrl::CanDeferShow,
837 Showing the popup can be deferred to happen sometime after
838 ShowPopup() has finished. In this case, AnimateShow() must
839 return false.}
840 @endTable
841 */
842 virtual void DoShowPopup(const wxRect& rect, int flags);
843 };
844