# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # PU_CONTAINS_CONTROLS = 1 # A special kind of top level window used for popup menus, combobox popups and such. # # ### Styles # # This class supports the following styles: # # - {Wx::PU_CONTAINS_CONTROLS}: By default in WXMSW, a popup window will not take focus from its parent window. However many standard controls, including common ones such as {Wx::TextCtrl}, need focus to function correctly and will not work when placed on a default popup. This flag can be used to make the popup take focus and let all controls work but at the price of not allowing the parent window to keep focus while the popup is shown, which can also be sometimes desirable. This style is currently only implemented in MSW and simply does nothing under the other platforms (it's new since wxWidgets 3.1.3). # # Category: Managed Windows # @see Wx::Dialog # @see Wx::Frame # # class PopupWindow < NonOwnedWindow # @overload initialize() # Default constructor. # @return [Wx::PopupWindow] # @overload initialize(parent, flags=Wx::Border::BORDER_NONE) # Constructor. # @param parent [Wx::Window] # @param flags [Integer] # @return [Wx::PopupWindow] def initialize(*args) end # Create method for two-step creation. # @param parent [Wx::Window] # @param flags [Integer] # @return [Boolean] def create(parent, flags=Wx::Border::BORDER_NONE) end # 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 [Array(Integer, Integer), Wx::Point] Must be given in screen coordinates! # @param sizePopup [Array(Integer, Integer), Wx::Size] The size of the popup window # @return [void] def position(ptOrigin, sizePopup) end end # PopupWindow # A {Wx::PopupWindow} 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. # # Category: Managed Windows # @see Wx::PopupWindow # # class PopupTransientWindow < PopupWindow # @overload initialize() # Default constructor. # @return [Wx::PopupTransientWindow] # @overload initialize(parent, flags=Wx::Border::BORDER_NONE) # Constructor. # @param parent [Wx::Window] # @param flags [Integer] # @return [Wx::PopupTransientWindow] def initialize(*args) end # Popup the window (this will show it too). # # If focus is non-NULL, it will be kept focused while this window is shown if supported by the current platform, otherwise the popup itself will receive focus. In any case, the popup will disappear automatically if it loses focus because of a user action. # @see Wx::PopupTransientWindow#dismiss # @param focus [Wx::Window] # @return [void] def popup(focus=nil) end # Hide the window. # @return [void] def dismiss; end # 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). # @param event [Wx::MouseEvent] # @return [Boolean] def process_left_down(event) end end # PopupTransientWindow end