Skip to content

Commit

Permalink
Merge pull request #274 from mcorino/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mcorino committed May 2, 2024
2 parents 179d681 + af06d60 commit 8dbb010
Show file tree
Hide file tree
Showing 45 changed files with 506 additions and 76 deletions.
4 changes: 2 additions & 2 deletions lib/wx/doc/client_dc.rb
Expand Up @@ -13,7 +13,7 @@ class ClientDC < Wx::DC
# it's single argument.
# @param [Wx::Window] win window to draw on
# @yieldparam [Wx::ClientDC] dc the ClientDC instance to paint on
# @return [Object] result of the block
# @return [::Object] result of the block
def self.draw_on(win) end

end
Expand All @@ -26,7 +26,7 @@ class PaintDC < Wx::ClientDC
# @note In wxRuby this method mostly exists to be consistent with the other DC classes. It is however recommended to use Wx::Window#paint instead.
# @param [Wx::Window] win window to draw on
# @yieldparam [Wx::PaintDC] dc the PaintDC instance to paint on
# @return [Object] result of the block
# @return [::Object] result of the block
def self.draw_on(win) end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/wx/doc/clipboard.rb
Expand Up @@ -14,7 +14,7 @@ class Clipboard

# Opens the global clipboard and passes the clipboard object to the block.
# @yieldparam [Wx::Clipboard] clip the global clipboard object
# @return [Object] block result
# @return [::Object] block result
def self.open; end

end
Expand Down
4 changes: 2 additions & 2 deletions lib/wx/doc/dc_overlay.rb
Expand Up @@ -18,7 +18,7 @@ class DCOverlay < Wx::DC
# @param [Wx::Overlay] overlay Overlay to connect
# @param [Wx::DC] dc Drawing DC
# @yieldparam [Wx::DCOverlay] ovl_dc DCOverlay instance to use
# @return [Object] result from block
# @return [::Object] result from block
# @overload draw_on(overlay, dc, x, y, width, height)
# @param [Wx::Overlay] overlay Overlay to connect
# @param [Wx::DC] dc Drawing DC
Expand All @@ -27,7 +27,7 @@ class DCOverlay < Wx::DC
# @param [Integer] width width of area to use
# @param [Integer] height height of area to use
# @yieldparam [Wx::DCOverlay] ovl_dc DCOverlay instance to use
# @return [Object] result from block
# @return [::Object] result from block
def self.draw_on(*arg) end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/wx/doc/enum.rb
Expand Up @@ -37,7 +37,7 @@ def real?; end
def method_missing(sym, *args) end

# Checks type and value equality.
# @param [Object] o the object to compare
# @param [::Object] o the object to compare
# @return [true,false] true if o is instance of same enum class as self **and** integer values are equal; false otherwise
def eql?(o) end

Expand Down
2 changes: 1 addition & 1 deletion lib/wx/doc/event_blocker.rb
Expand Up @@ -22,7 +22,7 @@ class << self
# @param [Wx::Window] win the window to block events for
# @param [Integer] evt_type the event type to block
# @yieldparam [Wx::EventBlocker] blkr the blocker object
# @return [Object] the value returned by the block
# @return [::Object] the value returned by the block
def blocked_for(win, evt_type=Wx::EVT_ANY) end
alias :block_for :blocked_for

Expand Down
2 changes: 1 addition & 1 deletion lib/wx/doc/functions.rb
Expand Up @@ -109,7 +109,7 @@ def self.get_app; end

# Returns the pointer address of the underlying C++ object as a hex
# string - useful for debugging
# @param obj [Object] wrapped object
# @param obj [::Object] wrapped object
# @return [String] string with address in hex format
def self.ptr_addr(obj) end

Expand Down
8 changes: 4 additions & 4 deletions lib/wx/doc/gc_dc.rb
Expand Up @@ -15,15 +15,15 @@ class GCDC < Wx::DC
# passes the instance to the given block to draw on.
# @overload draw_on()
# @yieldparam [Wx::GCDC] dc GCDC instance to draw on
# @return [Object] result from block
# @return [::Object] result from block
# @overload draw_on(dc)
# @param [Wx::WindowDC,Wx::MemoryDC] target DC to draw on
# @yieldparam [Wx::GCDC] dc GCDC instance to draw on
# @return [Object] result from block
# @return [::Object] result from block
# @overload draw_on(dc)
# @param [Wx::PrinterDC] target DC to draw on
# @yieldparam [Wx::GCDC] dc GCDC instance to draw on
# @return [Object] result from block
# @return [::Object] result from block
# @wxrb_require USE_PRINTING_ARCHITECTURE,WXMSW|WXOSX|USE_GTKPRINT
# @overload draw_on(gc)
# Note that the context will continue using the same font, pen and brush as before until #set_font, #set_pen
Expand All @@ -34,7 +34,7 @@ class GCDC < Wx::DC
# you need to call the setter methods to bring Wx::DC and Wx::GraphicsContext font, pen and brush in sync with each other.
# @param [Wx::GraphicsContext] gc GraphicsContext to draw on
# @yieldparam [Wx::GCDC] dc GCDC instance to draw on
# @return [Object] result from block
# @return [::Object] result from block
def self.draw_on(*arg) end
end

Expand Down
18 changes: 12 additions & 6 deletions lib/wx/doc/graphics_context.rb
Expand Up @@ -14,38 +14,44 @@ class GraphicsContext
# Deletes the gc object after the block returns.
# @see Wx::GraphicsRenderer#create_context
# @param window [Wx::Window]
# @return [Wx::GraphicsContext]
# @yieldparam [Wx::GraphicsContext]
# @return [::Object] last result of the given block
# @overload self.draw_on(windowDC)
# Creates a {Wx::GraphicsContext} from a {Wx::WindowDC} and passes that object to the given block.
# Deletes the gc object after the block returns.
# @see Wx::GraphicsRenderer#create_context
# @param windowDC [Wx::WindowDC]
# @return [Wx::GraphicsContext]
# @yieldparam [Wx::GraphicsContext]
# @return [::Object] last result of the given block
# @overload self.draw_on(memoryDC)
# Creates a {Wx::GraphicsContext} from a {Wx::MemoryDC} and passes that object to the given block.
# Deletes the gc object after the block returns.
# @see Wx::GraphicsRenderer#create_context
# @param memoryDC [Wx::MemoryDC]
# @return [Wx::GraphicsContext]
# @yieldparam [Wx::GraphicsContext]
# @return [::Object] last result of the given block
# @overload self.draw_on(printerDC)
# Creates a {Wx::GraphicsContext} from a {Wx::PrinterDC} and passes that object to the given block.
# Deletes the gc object after the block returns.
# Under GTK+, this will only work when using the GtkPrint printing backend which is available since GTK+ 2.10.
# @see Wx::GraphicsRenderer#create_context
# @see Printing Under Unix (GTK+)
# @param printerDC [Wx::PrinterDC]
# @return [Wx::GraphicsContext]
# @yieldparam [Wx::GraphicsContext]
# @return [::Object] last result of the given block
# @wxrb_require USE_PRINTING_ARCHITECTURE,WXMSW|WXOSX|USE_GTKPRINT
# @overload self.draw_on(image)
# Creates a {Wx::GraphicsContext} associated with a {Wx::Image} and passes that object to the given block.
# Deletes the gc object after the block returns.
# The image specifies the size of the context as well as whether alpha is supported (if {Wx::Image#has_alpha}) or not and the initial contents of the context. The image object must have a life time greater than that of the new context as the context copies its contents back to the image when it is destroyed.
# @param image [Wx::Image]
# @return [Wx::GraphicsContext]
# @yieldparam [Wx::GraphicsContext]
# @return [::Object] last result of the given block
# @overload self.draw_on()
# Create a lightweight context that can be used only for measuring text and passes that object to the given block.
# Deletes the gc object after the block returns.
# @return [Wx::GraphicsContext]
# @yieldparam [Wx::GraphicsContext]
# @return [::Object] last result of the given block
def self.draw_on(*args) end

end
Expand Down
12 changes: 6 additions & 6 deletions lib/wx/doc/list_ctrl.rb
Expand Up @@ -13,13 +13,13 @@ class ListCtrl

# Iterates all items in the list control passing each item (id) to the given block.
# @yieldparam [Integer] item
# @return [Object] result of last block iteration
# @return [::Object] result of last block iteration
def each(&block) end

# Iterates all selected items in the list control (like #get_next_item(item, Wx::LIST_NEXT_ALL, Wx::LIST_STATE_SELECTED))
# passing each item (id) to the given block.
# @yieldparam [Integer] item
# @return [Object] result of last block iteration
# @return [::Object] result of last block iteration
def each_selected(&block) end

# Returns array of selected items.
Expand All @@ -31,10 +31,10 @@ def get_selections; end
# passing the <b>item data</b> for each item as well as the `data` argument given to the #sort_items method.
# The block should return 0 if the items are equal, negative value if the first item is less than the second
# one and positive value if the first one is greater than the second one.
# @param [Object] data user data to pass on to the sorting block
# @yieldparam [Object] item_data1 data for first item
# @yieldparam [Object] item_data2 data for second item
# @yieldparam [Object] data propagated data argument
# @param [::Object] data user data to pass on to the sorting block
# @yieldparam [::Object] item_data1 data for first item
# @yieldparam [::Object] item_data2 data for second item
# @yieldparam [::Object] data propagated data argument
def sort_items(data = nil, &block) end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/wx/doc/mirror_dc.rb
Expand Up @@ -14,7 +14,7 @@ class MirrorDC < Wx::DC
# @param [Wx::DC] dc DC to duplicate the (mirrored) drawing on
# @param [Boolean] mirror whether to mirror or not
# @yieldparam [Wx::MirrorDC] dc the MirrorDC instance to paint on
# @return [Object] result of the block
# @return [::Object] result of the block
def self.draw_on(dc, mirror) end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/wx/doc/persistence_manager.rb
Expand Up @@ -14,7 +14,7 @@ module Wx
# instance for the object it is called for.
# This method raises a NoImplementError if the object class does not support persistence.
# @see Defining Custom Persistent Windows
# @param obj [Object]
# @param obj [::Object]
# @return [Wx::PersistentObject]
def self.create_persistent_object(obj) end

Expand Down
2 changes: 1 addition & 1 deletion lib/wx/doc/persistent_object.rb
Expand Up @@ -11,7 +11,7 @@ class PersistentObject < ::Object

# Save the specified value using the given name.
# @param [String] name The name of the value in the configuration file.
# @param [Object] value The value to save, currently must be a type supported by wxConfig.
# @param [::Object] value The value to save, currently must be a type supported by wxConfig.
# @return [Boolean] true if the value was saved or false if an error occurred.
def save_value(name, value); end
protected :save_value
Expand Down
6 changes: 3 additions & 3 deletions lib/wx/doc/pg/property_grid_interface.rb
Expand Up @@ -18,7 +18,7 @@ class PropertyGridInterface
# @param start [Integer,Wx::PG::Property] start position (either {Wx::Direction::TOP} or {Wx::Direction::BOTTOM} or the property to start at)
# @param reverse [true,false] iterate properties in reverse
# @yieldparam item [Wx::PG::PGProperty] property
# @return [Object] result of last block execution
# @return [::Object] result of last block execution
# @overload each_property(flags, start, reverse:)
# @param flags [Integer] flags specifying iteration (see {Wx::PG::PG_ITERATOR_FLAGS})
# @param start [Integer,Wx::PG::Property] start position (either {Wx::Direction::TOP} or {Wx::Direction::BOTTOM} or the property to start at)
Expand All @@ -35,7 +35,7 @@ def each_property(flags = Wx::PG::PG_ITERATE_DEFAULT, start = nil, reverse: fals
# @param start [Integer,Wx::PG::Property] start position (either {Wx::Direction::TOP} or {Wx::Direction::BOTTOM} or the property to start at)
# @param reverse [true,false] iterate properties in reverse
# @yieldparam item [Wx::PG::PGProperty] property
# @return [Object] result of last block execution
# @return [::Object] result of last block execution
# @overload reverse_each_property(flags, start)
# @param flags [Integer] flags specifying iteration (see {Wx::PG::PG_ITERATOR_FLAGS})
# @param start [Integer,Wx::PG::Property] start position (either {Wx::Direction::TOP} or {Wx::Direction::BOTTOM} or the property to start at)
Expand All @@ -50,7 +50,7 @@ def reverse_each_property(flags = Wx::PG::PG_ITERATE_DEFAULT, start = nil, &bloc
# @overload each_property_attribute(id , &block)
# @param id [String,Wx::PG::PGProperty] (name of) property to iterate attributes of
# @yieldparam item [Wx::Variant] attribute
# @return [Object] result of last block execution
# @return [::Object] result of last block execution
# @overload each_property_attribute(id)
# @param id [String,Wx::PG::PGProperty] (name of) property to iterate attributes of
# @return [Enumerator] an enumerator
Expand Down
4 changes: 2 additions & 2 deletions lib/wx/doc/prt/printer_dc.rb
Expand Up @@ -13,7 +13,7 @@ class PrinterDC < Wx::DC
# it's single argument.
# @param [Wx::PRT::PrintData] print_data print_data defining the print settings
# @yieldparam [Wx::PrinterDC] dc the PrinterDC instance to paint on
# @return [Object] result of the block
# @return [::Object] result of the block
def self.draw_on(print_data) end

end
Expand All @@ -24,7 +24,7 @@ class PostScriptDC < Wx::DC
# it's single argument.
# @param [Wx::PRT::PrintData] print_data print_data defining the print settings
# @yieldparam [Wx::PostScriptDC] dc the PostScriptDC instance to paint on
# @return [Object] result of the block
# @return [::Object] result of the block
def self.draw_on(print_data) end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/wx/doc/region_iterator.rb
Expand Up @@ -31,7 +31,7 @@ def next_rect; end
# If no block is given an Enumerator is returned.
# @overload each(&block)
# @yieldparam [Wx::Rect] rect
# @return [Object]
# @return [::Object]
# @overload each()
# @return [Enumerator]
def each; end
Expand Down
2 changes: 1 addition & 1 deletion lib/wx/doc/scaled_dc.rb
Expand Up @@ -16,7 +16,7 @@ class ScaledDC < Wx::DC
# @param [Wx::DC] target DC to draw on (scaled)
# @param [Float] scale scale factor
# @yieldparam [Wx::ScaledDC] dc scaled dc to draw on
# @return [Object] result from block
# @return [::Object] result from block
def self.draw_on(target, scale) end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/wx/doc/screen_dc.rb
Expand Up @@ -12,7 +12,7 @@ class ScreenDC < Wx::DC
# Executes the given block providing a temporary (screen) dc as
# it's single argument.
# @yieldparam [Wx::ScreenDC] dc the ScreenDC instance to paint on
# @return [Object] result of the block
# @return [::Object] result of the block
def self.draw_on; end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/wx/doc/svg_file_dc.rb
Expand Up @@ -18,7 +18,7 @@ class SVGFileDC < Wx::DC
# @param [Float] dpi resolution for SVG image
# @param [String] title readable name for the SVG document
# @yieldparam [Wx::SVGFileDC] dc the SVGFileDC instance to paint on
# @return [Object] result of the block
# @return [::Object] result of the block
def self.draw_on(filename, width=320, height=240, dpi=72, title='') end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/wx/doc/textctrl.rb
Expand Up @@ -62,7 +62,7 @@ class TextCtrl

# Appends the string representation of `obj` to the text value of the control.
# Calls #to_s to get the string representation of `obj`.
# @param [Object] obj
# @param [::Object] obj
# @return [self]
def <<(obj) end

Expand Down
4 changes: 2 additions & 2 deletions lib/wx/doc/tree_ctrl.rb
Expand Up @@ -37,7 +37,7 @@ def get_first_child(parent_id) end
#
# Returns an invalid tree item if there are no further children.
# @param [Wx::TreeItemId] parent_id the id of the parent tree item for which to iterate children
# @param [Object] cookie cookie value as returned from previous #get_first_cild or #get_next_child call.
# @param [::Object] cookie cookie value as returned from previous #get_first_cild or #get_next_child call.
# @return [Array(Wx::TreeItemId, Object)] first child item id (if any) and cookie value
def get_next_child(parent_id, cookie) end

Expand Down Expand Up @@ -74,7 +74,7 @@ def get_selections; end
# @param [Integer] pos child item's position to insert before
# @param [Integer] image image index for unselected item
# @param [Integer] selImage image index for selected item
# @param data [Object]
# @param data [::Object]
# @return [Wx::TreeItemId] id of inserted tree item
def insert_item_before(parent, pos, text, image=-1, selImage=-1, data=nil) end

Expand Down
12 changes: 6 additions & 6 deletions lib/wx/doc/validator.rb
Expand Up @@ -22,15 +22,15 @@ def initialize(*arg) end
# Should retrieve and return the data from the associated window (#get_window).
# By default returns nil (which indicates there is no custom data to transfer).
# Overload for customized functionality.
# @return [Object] retrieved data from window
# @return [::Object] retrieved data from window
def do_transfer_from_window; end
protected :do_transfer_from_window

# Method called when transferring data to window.
# Should transfer the given data to the associated window and return true if successful.
# By default does nothing and just returns true.
# Overload for customized functionality.
# @param [Object] data
# @param [::Object] data
# @return [Boolean]
def do_transfer_to_window(data) end
protected :do_transfer_to_window
Expand Down Expand Up @@ -60,7 +60,7 @@ module Binding
# win.set_validator(val)
#
# @param [String,Symbol,Method,Proc] meth (name of) method or event handling proc; to be supplied when no block is given
# @yieldparam [Object] data the data retrieved from the window
# @yieldparam [::Object] data the data retrieved from the window
def on_transfer_from_window(meth=nil, &block) end

# Installs a callback handler to provide the data to transfer to the associated window.
Expand All @@ -85,13 +85,13 @@ def on_transfer_from_window(meth=nil, &block) end
# win.set_validator(val)
#
# @param [String,Symbol,Method,Proc] meth (name of) method or event handling proc; to be supplied when no block is given
# @yieldreturn [Object] the data to transfer to the window
# @yieldreturn [::Object] the data to transfer to the window
def on_transfer_to_window(meth=nil, &block) end

# Method called with data transferred from window.
# By default will call the on_transfer_from_window handler if defined.
# Returns true if successful or none defined.
# @param [Object] data
# @param [::Object] data
# @return [Boolean]
def do_on_transfer_from_window(data) end
protected :do_on_transfer_from_window
Expand All @@ -100,7 +100,7 @@ def do_on_transfer_from_window(data) end
# By default will call the on_transfer_to_window handler if defined.
# Returns the handler's result if successful.
# Otherwise returns nil.
# @return [Object]
# @return [::Object]
def do_on_transfer_to_window; end
protected :do_on_transfer_to_window

Expand Down
4 changes: 2 additions & 2 deletions lib/wx/doc/variant.rb
Expand Up @@ -16,7 +16,7 @@ class Variant
# Returns an enumerator when no block is given.
# @overload each(&block)
# @yieldparam item [Wx::Variant] variant list item
# @return [Object] result of last block execution
# @return [::Object] result of last block execution
# @overload each
# @return [Enumerator] an enumerator
def each; end
Expand Down Expand Up @@ -52,7 +52,7 @@ def each; end
# @return [self]
# @overload assign(value)
# Equality test operator.
# @param value [Object]
# @param value [::Object]
# @return [self]
# @overload assign(value)
# Equality test operator.
Expand Down

0 comments on commit 8dbb010

Please sign in to comment.