vptk_w::VPTK_Widget::Label - Label widget definition


vptk_w documentation Contained in the vptk_w distribution.

Index


Code Index:

Name

Top

  vptk_w::VPTK_Widget::Label - Label widget definition

Description

Top

  This is a sample class derived from vptk_w::VPTK_Widget

Properties

Top

  Correct object must have following obligatory properties:
    -instance_data => {-widget_data=>{},-geometry_data=>{}}
  Dynamic data:
    -id
    -visual_object
    -parent_object

Methods

Top

  This class implement virtual methods defined by parent class:

  Getter methods (Class-related):

    HaveGeometry  => (0/1) 
    DefaultParams => [-relief=>'flat']
    TkClassName   => 'Tk::Label',
    PrintTitle    => 'Label',
    EditorProperties => {-background=>'color',-borderwidth=>'int+'},

  $w->JustDraw(parent) - draw the object using widget's actual parameters


vptk_w documentation Contained in the vptk_w distribution.

package vptk_w::VPTK_Widget::Label;

use strict;
use base qw(vptk_w::VPTK_Widget);

sub HaveGeometry  { 1 }
sub DefaultParams { [-relief=>'flat'] }
sub TkClassName   { 'Tk::Label' }
sub PrintTitle    { 'Label' }
sub AssociatedIcon{ 'label' }
sub EditorProperties {
  return {
    -bitmap=>'bitmap',-image=>'variable',-highlightcolor=>'color',
    -background=>'color',-foreground=>'color',-borderwidth=>'int+',
    -justify=>'justify',-textvariable=>'variable',-underline=>'int+',
    -wraplength=>'int+',-relief=>'relief',-text=>'text',-height=>'int+',
    -padx=>'int+',-pady=>'int+',-width=>'int+',-anchor=>'anchor'
  }
}

sub JustDraw {
  my ($this,$parent,%args) = @_;
  delete $args{'-image'};
  return $parent->Label(%args);
}

1;#)