Skip to content

Commit

Permalink
Merge pull request #262 from mcorino/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mcorino authored Apr 2, 2024
2 parents 08ee81d + a016722 commit 05def64
Show file tree
Hide file tree
Showing 13 changed files with 201 additions and 91 deletions.
19 changes: 19 additions & 0 deletions lib/wx/core/const.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,14 @@ module Wx
TREE_LIST_CTRL_NAME_STR = 'wxTreeListCtrl'
HTML_LIST_BOX_NAME_STR = 'htmlListBox'
SIMPLE_HTML_LIST_BOX_NAME_STR = 'simpleHtmlListBox'
HTML_WINDOW_NAME_STR = 'htmlWindow'
EDITABLE_LIST_BOX_NAME_STR = 'editableListBox'
V_LIST_BOX_NAME_STR = 'wxVListBox'
ACTIVITY_INDICATOR_NAME_STR = 'activityindicator'
TIME_PICKER_CTRL_NAME_STR = 'timectrl'
DATE_PICKER_CTRL_NAME_STR = 'datectrl'
CALENDAR_NAME_STR = 'CalendarCtrl'
SPIN_BUTTON_NAME_STR = 'wxSpinButton'

if Wx::PLATFORM == 'WXMSW'
# wxMSW only
Expand All @@ -80,4 +86,17 @@ module Wx
PROPERTY_GRID_NAME_STR = 'wxPropertyGrid'
STC_NAME_STR = 'stcwindow'

# custom wxRuby addition
MEDIA_CTRL_NAME_STR = 'mediaCtrl'
SPIN_CTRL_NAME_STR = 'wxSpinCtrl'
SPIN_CTRL_DOUBLE_NAME_STR = 'wxSpinCtrlDouble'
SPLITTER_WINDOW_NAME_STR = 'splitter'
CHOICEBOOK_NAME_STR = 'choicebook'
LISTBOOK_NAME_STR = 'listbook'
TOOLBOOK_NAME_STR = 'toolbook'
TREEBOOK_NAME_STR = 'treebook'
SASH_WINDOW_NAME_STR = 'sashWindow'
SASH_LAYOUT_WINDOW_NAME_STR = 'layoutWindow'
SCROLLED_NAME_STR = 'SCROLLED_WINDOW'

end
16 changes: 16 additions & 0 deletions lib/wx/doc/const.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,14 @@ module Wx
TREE_LIST_CTRL_NAME_STR = 'wxTreeListCtrl'
HTML_LIST_BOX_NAME_STR = 'htmlListBox'
SIMPLE_HTML_LIST_BOX_NAME_STR = 'simpleHtmlListBox'
HTML_WINDOW_NAME_STR = 'htmlWindow'
EDITABLE_LIST_BOX_NAME_STR = 'editableListBox'
V_LIST_BOX_NAME_STR = 'wxVListBox'
ACTIVITY_INDICATOR_NAME_STR = 'activityindicator'
TIME_PICKER_CTRL_NAME_STR = 'timectrl'
DATE_PICKER_CTRL_NAME_STR = 'datectrl'
CALENDAR_NAME_STR = 'CalendarCtrl'
SPIN_BUTTON_NAME_STR = 'wxSpinButton'

# wxMSW only
MSW_HEADER_CTRL_NAME_STR = 'wxMSWHeaderCtrl'
Expand All @@ -81,4 +87,14 @@ module Wx
PROPERTY_GRID_NAME_STR = 'wxPropertyGrid'
STC_NAME_STR = 'stcwindow'

MEDIA_CTRL_NAME_STR = 'mediaCtrl'
SPIN_CTRL_NAME_STR = 'spinCtrl'
SPIN_CTRL_DOUBLE_NAME_STR = 'wxSpinCtrlDouble'
SPLITTER_WINDOW_NAME_STR = 'splitter'
TOOLBOOK_NAME_STR = 'toolbook'
TREEBOOK_NAME_STR = 'treebook'
SASH_WINDOW_NAME_STR = 'sashWindow'
SASH_LAYOUT_WINDOW_NAME_STR = 'layoutWindow'
SCROLLED_NAME_STR = 'SCROLLED_WINDOW'

end
34 changes: 34 additions & 0 deletions lib/wx/doc/dc_overlay.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# :stopdoc:
# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.
# :startdoc:


module Wx

class DCOverlay < Wx::DC

private :initialize

# Connects this overlay to the corresponding drawing dc. If the overlay is not initialized yet, this call will do so.
# Creates a Wx::DCOverlay instance for to do that and passes the instance to the given block to use.
# Uses either the entire area of the drawing DC or the area specified.
# @overload draw_on(overlay, 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
# @overload draw_on(overlay, dc, x, y, width, height)
# @param [Wx::Overlay] overlay Overlay to connect
# @param [Wx::DC] dc Drawing DC
# @param [Integer] x topleft x coordinate of area to use
# @param [Integer] y topleft y coordinate of area to use
# @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
def self.draw_on(*arg) end
end

end
2 changes: 1 addition & 1 deletion lib/wx/grid/keyword_defs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# wxGrid A grid (table) window
Wx::define_keyword_ctors(Wx::GRID::Grid) do
wx_ctor_params :id, :pos, :size, :style => Wx::WANTS_CHARS
wx_ctor_params :name => 'grid'
wx_ctor_params :name => Wx::GRID_NAME_STR
end
6 changes: 3 additions & 3 deletions lib/wx/html/keyword_defs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
# wxHtmlWindow - Control for displaying HTML
Wx::define_keyword_ctors(Wx::HTML::HtmlWindow) do
wx_ctor_params :id, :pos, :size, :style => Wx::HTML::HW_DEFAULT_STYLE
wx_ctor_params :name => 'htmlWindow'
wx_ctor_params :name => Wx::HTML_WINDOW_NAME_STR
end

# wxHtmlListBox A listbox showing HTML content
Wx::define_keyword_ctors(Wx::HTML::HtmlListBox) do
wx_ctor_params :id, :pos, :size, :style, :name => 'HtmlListBox'
wx_ctor_params :id, :pos, :size, :style, :name => Wx::HTML_LIST_BOX_NAME_STR
end

Wx::define_keyword_ctors(Wx::HTML::SimpleHtmlListBox) do
wx_ctor_params :id, :pos, :size
wx_ctor_params :choices => []
wx_ctor_params :style, :validator, :name => 'SimpleHtmlListBox'
wx_ctor_params :style, :validator, :name => Wx::SIMPLE_HTML_LIST_BOX_NAME_STR
end
Loading

0 comments on commit 05def64

Please sign in to comment.