Sha256: 62985bf4de1b167e55a7a3df457fcfb3bd47e960ead8bf0b43d116a5173cf72e

Contents?: true

Size: 1.21 KB

Versions: 19

Compression:

Stored size: 1.21 KB

Contents

---
:wxColourDialog:
  :detail:
    :pre:
      :programlisting:
        - :pattern: !ruby/regexp /.*/
          :replace: |
            
            ```ruby
              # Some function for redrawing using the given colour. Ideally, it
              # shouldn't do anything if the colour is the same as the one used
              # before.
              # def redraw(colour) ... end
            
              data = Wx::ColourData.new
              data.set_colour(initialColourToUse)
              Wx::ColourDialog(self, data) do |dlg|
                dlg.evt_colour_changed { |event| redraw(event.get_colour) }
                if dlg.show_modal == Wx::ID_OK
                   # Colour did change.
                else
                   # Colour didn't change.
                end
              end
            
              # This call is unnecessary under platforms generating
              # Wx::EVT_COLOUR_CHANGED if the dialog was accepted and unnecessary
              # under the platforms not generating this event if it was cancelled,
              # so we could check for the different cases explicitly to avoid it,
              # but it's simpler to just always call it.
              redraw(data.get_colour)
            ```

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
wxruby3-1.3.1 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-1.3.0 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-1.2.1 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-1.2.0 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-1.1.2 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-1.1.1 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-1.1.0 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-1.0.1 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-0.9.8 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-0.9.7 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-0.9.5 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-0.9.4 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-0.9.3 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-0.9.2 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-0.9.1 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-0.9.0 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-0.9.0.pre.rc.3 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-0.9.0.pre.rc.2 rakelib/lib/generate/doc/colour_dialog.yaml
wxruby3-0.9.0.pre.rc.1 rakelib/lib/generate/doc/colour_dialog.yaml