Class: Wx::TipProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/tip_provider.rb

Overview

This is the class used together with show_tip function.

It must implement #get_tip function and return the current tip from it (different tip each time it is called). You will never use this class yourself, but you need it to show startup tips with show_tip. Also, if you want to get the tips text from elsewhere than a simple text file, you will want to derive a new class from TipProvider and use it instead of the one returned by create_file_tip_provider.

Category: Miscellaneous

See Also:

Requires:

  • USE_STARTUP_TIPS

Instance Method Summary collapse

Constructor Details

#initialize(currentTip) ⇒ Wx::TipProvider

Constructor.

Parameters:

  • currentTip (Integer)

    The starting tip index.



44
# File 'lib/wx/doc/gen/tip_provider.rb', line 44

def initialize(currentTip) end

Instance Method Details

#get_current_tipInteger Also known as: current_tip

Returns the index of the current tip (i.e. the one which would be returned by #get_tip).

The program usually remembers the value returned by this function after calling Wx.show_tip. Note that it is not the same as the value which was passed to Wx.show_tip + 1 because the user might have pressed the “Next” button in the tip dialog.

Returns:

  • (Integer)


50
# File 'lib/wx/doc/gen/tip_provider.rb', line 50

def get_current_tip; end

#get_tipString Also known as: tip

Return the text of the current tip and pass to the next one.

This function is pure virtual, it should be implemented in the derived classes.

Returns:

  • (String)


57
# File 'lib/wx/doc/gen/tip_provider.rb', line 57

def get_tip; end