### In Files

- wx/classes/simplehelpprovider.rb

### Parent

Wx::HelpProvider

### Methods

- add_help
- get_help
- new
- remove_help
- show_help

### Files

- wxruby2.lib

### Class Index

Quicksearch

- Wx
- Wx::AcceleratorTable
- Wx::Animation
- Wx::App
- Wx::ArtProvider
- Wx::AuiNotebook
- Wx::Bitmap
- Wx::BusyCursor
- Wx::CheckListBox
- Wx::Choice
- Wx::ClientDC
- Wx::Clipboard
- Wx::Colour
- Wx::ComboBox
- Wx::CommandEvent
- Wx::ControlWithItems
- Wx::DC
- Wx::Event
- Wx::EvtHandler
- Wx::Font
- Wx::Grid
- Wx::HelpController
- Wx::HelpControllerHelpProvider
- Wx::HelpProvider
- Wx::HtmlHelpController
- Wx::HtmlWindow
- Wx::Icon
- Wx::IconBundle
- Wx::Image
- Wx::ImageList
- Wx::KeywordConstructor
- Wx::KeywordConstructor::ClassMethods
- Wx::ListBox
- Wx::ListCtrl
- Wx::Locale
- Wx::MediaCtrl
- Wx::Menu
- Wx::MenuItem
- Wx::Notebook
- Wx::Object
- Wx::PaintDC
- Wx::Point
- Wx::PreviewFrame
- Wx::Rect
- Wx::RichTextCtrl
- Wx::SimpleHelpProvider
- Wx::Size
- Wx::Sizer
- Wx::Sound
- Wx::StandardPaths
- Wx::TextCtrl
- Wx::TextUrlEvent
- Wx::Timer
- Wx::ToolBar
- Wx::ToolBarTool
- Wx::TreeCtrl
- Wx::Window
- Wx::XmlResource
- Rumix
- Rumix::Application
- Rumix::Config
- Rumix::Registry
- Rumix::Widget
- Rumix::Widget::CheckOptionPanel
- Rumix::Widget::OptionItem
- Rumix::Widget::OptionPanel
- Rumix::Widget::RadioOptionPanel
- Rumix::Widget::TitleText
- ROpt
- ROpt::ArgumentParser
- ROpt::ParseResult
- Uconv
- Uconv::Error
- Enumerable
- File
- Ini
- Kernel
- Module
- Object
- Pathname
- WxConstructor
- WxRubyStyleAccessors

No matching classes.

# Wx::SimpleHelpProvider

Pure-ruby implementation of the corresponding Wx class. Simply shows the Window’s help text in a tooltip.

### Public Class Methods

new() click to toggle source

(Not documented)

    # File wx/classes/simplehelpprovider.rb, line 4
      def initialize
        super
        # Store for mapping windows -> help strings
        @help_wins = {}
        # Store for mapping ids -> help strings
        @help_ids  = {}
      end

### Public Instance Methods

add_help(identifier, text) click to toggle source

This is what is called by Wx::Window#set_help_text

    # File wx/classes/simplehelpprovider.rb, line 13
      def add_help(identifier, text)
        if identifier.kind_of? Wx::Window
          @help_wins[identifier.object_id] = text
        else
          @help_ids[identifier] = text
        end
      end

get_help(win) click to toggle source

Retrieve help text for the given window `win`

    # File wx/classes/simplehelpprovider.rb, line 22
      def get_help(win)
        @help_wins[win.object_id] || @help_ids[win.wx_id] || ""
      end

remove_help(win) click to toggle source

Remove the help text for `win`

    # File wx/classes/simplehelpprovider.rb, line 27
      def remove_help(win)
        @help_wins.delete(win.object_id)
      end

show_help(win) click to toggle source

Show help for `win`

    # File wx/classes/simplehelpprovider.rb, line 32
      def show_help(win)
        help_text = get_help(win)
        return false if help_text.empty?
        tip = Wx::TipWindow.new(win, help_text, 100)
        true
      end

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.