File: Text.pm

package info (click to toggle)
libur-perl 0.470%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,184 kB
  • sloc: perl: 61,813; javascript: 255; xml: 108; sh: 13; makefile: 9
file content (72 lines) | stat: -rw-r--r-- 1,303 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package UR::Object::View::Toolkit::Text;

use warnings;
use strict;
require UR;

our $VERSION = "0.47"; # UR $VERSION;

UR::Object::Type->define(
    class_name => __PACKAGE__,
    is => 'UR::Object::View::Toolkit',
    has => [
        toolkit_name    => { is_constant => 1, value => "text" },
        toolkit_module  => { is_constant => 1, value => "(none)" },  # is this used anywhere?
    ]
);

sub show_view {
    my $class = shift;
    my $view = shift;
    my $widget = $view->widget;
    return $$widget;
}

# This doesn't really apply for text?!
sub hide_view {
return undef;

    my $class = shift;
    my $view = shift;
    my $widget = $view->widget;
    print "DEL: $widget\n";
    return 1;
}

# This doesn't really apply for text?!
sub create_window_for_view {
return undef;

    my $class = shift;
    my $view = shift;
    my $widget = $view->widget;
    print "WIN: $widget\n";
    return 1;
}

# This doesn't really apply for text?!
sub delete_window_around_view {
return undef;

    my $class = shift;
    my $widget = shift; 
    print "DEL: $widget\n";
    return 1;
}

1;

=pod

=head1 NAME

UR::Object::View::Toolkit::Text - Declaration of Text as a View toolkit type

=head1 SYNOPSIS

Methods called by UR::Object::View to get toolkit specific support for
common tasks.

=cut