The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tk::IDEtabFrame - Tabbed Notebook Widget for a IDE Environment

SYNOPSIS

    use Tk::IDEtabFrame;

    $TabbedFrame = $widget->IDEtabFrame
       (
        # Tk::DynaTabFrame Options:
        -font => $font,
        -raisecmd => \&raise_callback,
        -raisecolor => 'green',
        -tabclose => sub { 
                my ($dtf, $caption) = @_; 
                $dtf->delete($caption);
                },
        -tabcolor => 'yellow',
        -tabcurve => 2,
        -tablock => undef,
        -tabpadx => 5,
        -tabpady => 5,
        -tabrotate => 1,
        -tabside => 'nw',
        -tabscroll => undef,
        -textalign => 1,
        -tiptime => 600,
        -tipcolor => 'yellow',
        
        # Additional Options added by IDEtabFrame
        -raisedfg => 'black',
        -raisedActivefg => 'red',
        
        -raisedCloseButtonfg => 'black',
        -raisedCloseButtonbg => 'lightgrey',
        -raisedCloseButtonActivefg => 'red',
        -raisedCloseButtonActivebg => 'white',
        
        -noraisedfg => 'grey60',
        -noraisedActivefg => 'black',
        
        -noraisedCloseButtonfg => 'lightgrey',
        -noraisedCloseButtonbg => 'white',
        -noraisedCloseButtonActivefg => 'red',
        -noraisedCloseButtonActivebg => 'white',
        
        [normal frame options...],
        
       );

DESCRIPTION

This is a subclass of the Tk::DynaTabFrame widget that adds some additional options that affect the appearance and behaviour for use as part of a Integrated Development Environment (IDE), similar to Eclipse, etc.

DRAG-DROP SUPPORT

Tabs can be dragged to the tab-frame area of other (or the same) IDEtabFrame widget. This will move the dragged tab and widget to the new IDEtabFrame widget.

Tabs can also be dragged outside the widget to become separate Tool-Windows. These windows can be dragged from a drag-area at the top of the Tool-Window and dropped back into a IDEtabFrame widget.

OPTIONS

In addition to the options from the parent class Tk::DynaTabFrame, this widget provides the following options:

raisedfg

Foreground color of the notebook tab that has been raised.

raisedActivefg

Active foreground color (i.e. the color when the mouse hovers over it) of the notebook tab that has been raised.

raisedCloseButtonfg

Foreground color of the Close button (i.e. the 'X') for the raised tab.

raisedCloseButtonbg

Background color of the Close button for the raised tab.

raisedCloseButtonActivefg

Active foreground color (i.e. the color when the mouse hovers over it) of the Close button for the raised tab.

raisedCloseButtonActivebg

Active background color (i.e. the color when the mouse hovers over it) of the Close button for the raised tab.

noraisedfg

Foreground color of the notebook tabs that have not been raised.

noraisedActivefg

Active foreground color (i.e. the color when the mouse hovers over it) of the notebook tabs not raised.

noraisedCloseButtonfg

Foreground color of the Close button (i.e. the 'X') for the tabs not raised.

noraisedCloseButtonbg

Background color of the Close button for tabs not raised.

noraisedCloseButtonActivefg

Active foreground color (i.e. the color when the mouse hovers over it) of the Close button for the tabs not raised.

noraisedCloseButtonActivebg

Active background color (i.e. the color when the mouse hovers over it) of the Close button for the tabs not raised.

defaultFrameConfig

Array Ref of default options used to create new tab-frames. Defaults to

  (-relief => 'flat', -bg => 'steelblue4', -bd => 2)
  
lastTabDeleteCallback

Optional Callback (i.e. subref) to execute after when the last tab is deleted. This can be used to perform cleanup, remove/unpack the tabframe from the parent display, etc.

ATTRIBUTES

dragImage

Tk::Photo object of the image displayed when dragging data. Optional.

dropSite

Tk::DropSite object of attached to the tab frame for the notebook widget. This provides a drop target for dropping other widgets into the notebook as new tabs.

dragShadow

Tk::IDEdragShadow object used to show drag/drop drop targets.

endDragActions

Array Refs of callbacks to execute at the end of a drag operation. Typically this will be set to delete or add a tab to the dialog after a drag operation has been completed.

dragging

Flag = 1 if we are currently in a drag operation for this object.

Class Data

Dropbox

Hash of objects. Since the Tk Drag/Drop mechanism only supports passing strings around, this hash is used as a "dropbox" where the source can put a object in this hash, key'ed by a text name. This name is passed to the target (i.e. the drop location). The target can use the string to lookup the real object in this hash.

Methods

TabCreate

Over-ridden method to create tabs.

Calls the parent tabCreate, then applies extra look options

TabRaise

Over-ridden method to raise a tab

Calls the parent TabRase, then applies extra look options

startDrag

Method called with a drag operation starts. Changes drag cursor.

endDrag

Method called when a drag operation end. Clears out the currentDrag class data.

dragImage

Gets (and optionally sets) the value of the object's dragImage object

Usage:

        $self->dragImage();    # Get dragImage
        $self->dragImage(...); # Set dragImage

dragDropEnterLeave

Method called when dragging and the mouse pointer enters or leaves a drop area.

drop

Method called when accepting a drop from a drag-drop operation

toolWindowConfigure

Method to configure a "toolwindow" so that it can be dragged back into a tab window.

Bindings are setup so moving the window just moves a frame.

Usage:

   $self->toolWindowConfigure($toolwindow);

endDragTW

Method called when a Tool-Window drag operation ends.

If not dropping back into a tab-frame, moves the toolwindow to the dragged position.

TabRemove

Overridden TabRemove method.

This calls the parent TabRemove and the calls the lastTabDeleteCallback if all the tabs have been deleted

tabclose

Overridden tabclose method.

If the tabclose option is 1, this installs a callback to our TabRemove, rather than the default Tk::DynaTabFrame::TabRemove.

Because Tk::DynaTabFrame calls its TabRemove directly (Using \&TabRemove), rather than by a method call, this tabclose method is needed to call our overriden TabRemove method.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 180:

You forgot a '=back' before '=head1'