Class: Wx::LogWindow

Inherits:
LogInterposer show all
Defined in:
lib/wx/doc/gen/log.rb

Overview

This class represents a background log window: to be precise, it collects all log messages in the log frame which it manages but also passes them on to the log target which was active at the moment of its creation.

This allows you, for example, to show all the log messages in a frame but still continue to process them normally by showing the standard log dialog.

Category: Logging

See Also:

Requires:

  • USE_LOG

Instance Method Summary collapse

Methods inherited from LogChain

#get_old_log, #is_passing_messages, #pass_messages, #release, #set_log

Methods inherited from Log

add_trace_mask, clear_trace_masks, disable_timestamp, #do_log_record, #do_log_text, #do_log_text_at_level, dont_create_on_demand, enable_logging, #flush, flush_active, for_component, get_active_target, get_log_level, get_repetition_counting, get_timestamp, get_trace_masks, get_verbose, is_allowed_trace_mask, is_enabled, is_level_enabled, #log_record, remove_trace_mask, resume, set_active_target, set_component_level, set_log_level, set_repetition_counting, set_timestamp, set_verbose, suspend

Constructor Details

#initialize(pParent, szTitle, show = true, passToOld = true) ⇒ Wx::LogWindow

Creates the log frame window and starts collecting the messages in it.

Parameters:

  • pParent (Wx::Window)

    The parent window for the log frame, may be NULL

  • szTitle (String)

    The title for the log frame

  • show (Boolean) (defaults to: true)

    true to show the frame initially (default), otherwise #show must be called later.

  • passToOld (Boolean) (defaults to: true)

    true to process the log messages normally in addition to logging them in the log frame (default), false to only log them in the log frame. Note that if no targets were set using Wx::Log.set_active_target then Wx::LogWindow simply becomes the active one and messages won’t be passed to other targets.



496
# File 'lib/wx/doc/gen/log.rb', line 496

def initialize(pParent, szTitle, show=true, passToOld=true) end

Instance Method Details

#get_frameWx::Frame Also known as: frame

Returns the associated log frame window.

This may be used to position or resize it but use #show to show or hide it.

Returns:



502
# File 'lib/wx/doc/gen/log.rb', line 502

def get_frame; end

#on_frame_close(frame) ⇒ Boolean

Called if the user closes the window interactively, will not be called if it is destroyed for another reason (such as when program exits).

Return true from here to allow the frame to close, false to prevent this from happening.

Parameters:

Returns:

  • (Boolean)

See Also:



511
# File 'lib/wx/doc/gen/log.rb', line 511

def on_frame_close(frame) end

#on_frame_delete(frame) ⇒ void

This method returns an undefined value.

Called right before the log frame is going to be deleted: will always be called unlike #on_frame_close.

Parameters:



516
# File 'lib/wx/doc/gen/log.rb', line 516

def on_frame_delete(frame) end

#show(show = true) ⇒ void

This method returns an undefined value.

Shows or hides the frame.

Parameters:

  • show (Boolean) (defaults to: true)


521
# File 'lib/wx/doc/gen/log.rb', line 521

def show(show=true) end