| 1 | package UR::Object::View::Toolkit::Text; | ||
| 2 | |||
| 3 | use warnings; | ||
| 4 | use strict; | ||
| 5 | require UR; | ||
| 6 | |||
| 7 | our $VERSION = "0.46"; # UR $VERSION;; | ||
| 8 | |||
| 9 | UR::Object::Type->define( | ||
| 10 | class_name => __PACKAGE__, | ||
| 11 | is => 'UR::Object::View::Toolkit', | ||
| 12 | has => [ | ||
| 13 | toolkit_name => { is_constant => 1, value => "text" }, | ||
| 14 | toolkit_module => { is_constant => 1, value => "(none)" }, # is this used anywhere? | ||
| 15 | ] | ||
| 16 | ); | ||
| 17 | |||
| 18 | sub show_view { | ||
| 19 | my $class = shift; | ||
| 20 | my $view = shift; | ||
| 21 | my $widget = $view->widget; | ||
| 22 | return $$widget; | ||
| 23 | } | ||
| 24 | |||
| 25 | # This doesn't really apply for text?! | ||
| 26 | sub hide_view { | ||
| 27 | return undef; | ||
| 28 | |||
| 29 | my $class = shift; | ||
| 30 | my $view = shift; | ||
| 31 | my $widget = $view->widget; | ||
| 32 | print "DEL: $widget\n"; | ||
| 33 | return 1; | ||
| 34 | } | ||
| 35 | |||
| 36 | # This doesn't really apply for text?! | ||
| 37 | sub create_window_for_view { | ||
| 38 | return undef; | ||
| 39 | |||
| 40 | my $class = shift; | ||
| 41 | my $view = shift; | ||
| 42 | my $widget = $view->widget; | ||
| 43 | print "WIN: $widget\n"; | ||
| 44 | return 1; | ||
| 45 | } | ||
| 46 | |||
| 47 | # This doesn't really apply for text?! | ||
| 48 | sub delete_window_around_view { | ||
| 49 | return undef; | ||
| 50 | |||
| 51 | my $class = shift; | ||
| 52 | my $widget = shift; | ||
| 53 | print "DEL: $widget\n"; | ||
| 54 | return 1; | ||
| 55 | } | ||
| 56 | |||
| 57 | 1; | ||
| 58 | |||
| 59 | =pod | ||
| 60 | |||
| 61 | =head1 NAME | ||
| 62 | |||
| 63 | UR::Object::View::Toolkit::Text - Declaration of Text as a View toolkit type | ||
| 64 | |||
| 65 | =head1 SYNOPSIS | ||
| 66 | |||
| 67 | Methods called by UR::Object::View to get toolkit specific support for | ||
| 68 | common tasks. | ||
| 69 | |||
| 70 | =cut | ||
| 71 | |||
| 72 |