-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from mcorino/develop
Widgets sample
- Loading branch information
Showing
278 changed files
with
26,989 additions
and
21,834 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) 2023 M.J.N. Corino, The Netherlands | ||
# | ||
# This software is released under the MIT license. | ||
|
||
|
||
module Wx | ||
|
||
class StandardPaths | ||
|
||
class << self | ||
|
||
wx_get = instance_method :get | ||
define_method :get do | ||
# cache the global singleton | ||
@instance ||= wx_get.bind(self).call | ||
end | ||
|
||
end | ||
|
||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# :stopdoc: | ||
# Copyright (c) 2023 M.J.N. Corino, The Netherlands | ||
# | ||
# This software is released under the MIT license. | ||
# :startdoc: | ||
|
||
|
||
module Wx | ||
|
||
class DatePickerCtrl < Control | ||
|
||
# If the control had been previously limited to a range of dates using #set_range, returns the lower and upper bounds of this range. | ||
# | ||
# If no range is set (or only one of the bounds is set), dt1 and/or dt2 are set to be invalid. | ||
# | ||
# Notice that when using a native MSW implementation of this control the lower range is always set, even | ||
# if #set_range hadn't been called explicitly, as the native control only supports dates later than year 1601. | ||
# @return [Array(Time, Time),nil] a set with the lower and upper range limit or nil if no range previously set | ||
def get_range; end | ||
|
||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# :stopdoc: | ||
# Copyright (c) 2023 M.J.N. Corino, The Netherlands | ||
# | ||
# This software is released under the MIT license. | ||
# :startdoc: | ||
|
||
|
||
module Wx | ||
|
||
class EditableListBox < Panel | ||
|
||
# Returns list control of composite. | ||
# @return [Wx::ListCtrl] | ||
def get_list_ctrl; end | ||
alias :list_ctrl :get_list_ctrl | ||
|
||
# Returns button of composite. | ||
# @return [Wx::BitmapButton] | ||
def get_del_button; end | ||
alias :del_button :get_del_button | ||
|
||
# Returns button of composite. | ||
# @return [Wx::BitmapButton] | ||
def get_new_button; end | ||
alias :new_button :get_new_button | ||
|
||
# Returns button of composite. | ||
# @return [Wx::BitmapButton] | ||
def get_up_button; end | ||
alias :up_button :get_up_button | ||
|
||
# Returns button of composite. | ||
# @return [Wx::BitmapButton] | ||
def get_down_button; end | ||
alias :down_button :get_down_button | ||
|
||
# Returns button of composite. | ||
# @return [Wx::BitmapButton] | ||
def get_edit_button; end | ||
alias :edit_button :get_edit_button | ||
|
||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# :stopdoc: | ||
# Copyright (c) 2023 M.J.N. Corino, The Netherlands | ||
# | ||
# This software is released under the MIT license. | ||
# :startdoc: | ||
|
||
|
||
module Wx | ||
|
||
class OwnerDrawnComboBox | ||
|
||
# Returns the label of the selected item or an empty string if no item is selected. | ||
# | ||
# @see Wx::OwnerDrawnComboBox#get_selection | ||
# @return [String] | ||
def get_list_string_selection; end | ||
alias :list_string_selection :get_list_string_selection | ||
|
||
# Selects the item with the specified string in the control. | ||
# | ||
# This method doesn't cause any command events to be emitted. | ||
# Notice that this method is case-insensitive, i.e. the string is compared with all the elements of the control | ||
# case-insensitively and the first matching entry is selected, even if it doesn't have exactly the same case as | ||
# this string and there is an exact match afterwards. | ||
# | ||
# true if the specified string has been selected, false if it wasn't found in the control. | ||
# @param string [String] The string to select. | ||
# @return [Boolean] | ||
def set_list_string_selection(string) end | ||
alias :list_string_selection= :set_list_string_selection | ||
|
||
# Returns the index of the selected item or {Wx::NOT_FOUND} if no item is selected. | ||
# | ||
# The position of the current selection. | ||
# @see Wx::OwnerDrawnComboBox#set_list_selection | ||
# @see Wx::OwnerDrawnComboBox#get_list_string_selection | ||
# @return [Integer] | ||
def get_list_selection; end | ||
alias :list_selection :get_list_selection | ||
|
||
# Sets the selection to the given item n or removes the selection entirely if n == {Wx::NOT_FOUND}. | ||
# | ||
# Note that this does not cause any command events to be emitted nor does it deselect any other items in the controls which support multiple selections. | ||
# @see Wx::OwnerDrawnComboBox#set_string | ||
# @see Wx::OwnerDrawnComboBox#set_list_string_selection | ||
# @param n [Integer] The string position to select, starting from zero. | ||
# @return [void] | ||
def set_list_selection(n) end | ||
alias :list_selection= :set_list_selection | ||
|
||
# Returns the number of items in the control. | ||
# | ||
# @see Wx::OwnerDrawnComboBox#is_list_empty | ||
# @return [Integer] | ||
def get_count; end | ||
alias_method :count, :get_count | ||
|
||
# Returns the label of the item with the given index. | ||
# | ||
# The index must be valid, i.e. less than the value returned by {Wx::OwnerDrawnComboBox#get_count}, | ||
# otherwise an assert is triggered. Notably, this function can't be called if the control is empty. | ||
# | ||
# The label of the item. | ||
# @param n [Integer] The zero-based index. | ||
# @return [String] | ||
def get_string(n) end | ||
alias_method :string, :get_string | ||
|
||
# Returns the array of the labels of all items in the control. | ||
# @return [Array<String>] | ||
def get_strings; end | ||
alias_method :strings, :get_strings | ||
|
||
# Sets the label for the given item. | ||
# @param n [Integer] The zero-based item index. | ||
# @param string [String] The label to set. | ||
# @return [void] | ||
def set_string(n, string) end | ||
|
||
# Finds an item whose label matches the given string. | ||
# | ||
# The zero-based position of the item, or {Wx::NOT_FOUND} if the string was not found. | ||
# @param string [String] String to find. | ||
# @param caseSensitive [Boolean] Whether search is case sensitive (default is not). | ||
# @return [Integer] | ||
def find_string(string, caseSensitive=false) end | ||
|
||
# This is the same as {Wx::OwnerDrawnComboBox#set_list_selection} and exists only because it is slightly | ||
# more natural for controls which support multiple selection. | ||
# @param n [Integer] | ||
# @return [void] | ||
def select(n) end | ||
|
||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# :stopdoc: | ||
# Copyright (c) 2023 M.J.N. Corino, The Netherlands | ||
# | ||
# This software is released under the MIT license. | ||
# :startdoc: | ||
|
||
|
||
module Wx | ||
|
||
# A generic (non-native) static bitmap control to display bitmap. | ||
# | ||
# Unlike the native control implemented by {Wx::StaticBitmap}, which on some platforms is only meant for display of | ||
# the small icons in the dialog boxes, you may use this implementation to display larger images portably. | ||
# Notice that for the best results, the size of the control should be the same as the size of the image displayed in | ||
# it, as happens by default if it's not resized explicitly. Otherwise, behaviour depends on the platform: under MSW, | ||
# the bitmap is drawn centred inside the control, while elsewhere it is drawn at the origin of the control. You can | ||
# use {Wx::GenericStaticBitmap#set_scale_mode} to control how the image is scaled inside the control. | ||
# | ||
# @see Wx::Bitmap | ||
# @see Wx::StaticBitmap | ||
class GenericStaticBitmap < Control | ||
|
||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.