summaryrefslogtreecommitdiffstats
path: root/ksirc/puke/plabel.pm
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /ksirc/puke/plabel.pm
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/puke/plabel.pm')
-rw-r--r--ksirc/puke/plabel.pm105
1 files changed, 105 insertions, 0 deletions
diff --git a/ksirc/puke/plabel.pm b/ksirc/puke/plabel.pm
new file mode 100644
index 00000000..bc557b5e
--- /dev/null
+++ b/ksirc/puke/plabel.pm
@@ -0,0 +1,105 @@
+
+&::PukeSendMessage($PUKE_WIDGET_LOAD,
+ $::PUKE_CONTROLLER,
+ $PWIDGET_LABEL,
+ "plabel.so",
+ sub { my %ARG = %{shift()};
+ if($ARG{'iArg'} == 1){
+ print "*E* PLabel Load failed!\n";
+ }
+ }
+ );
+
+package PLabel;
+@ISA = qw(PFrame);
+use strict;
+
+sub new {
+ my $class = shift;
+ my $self = $class->SUPER::new($class, @_);
+
+ $self->{widgetType} = $::PWIDGET_LABEL;
+
+ if($class eq 'PLabel'){
+ $self->create();
+ }
+
+ return $self;
+
+}
+
+sub setText {
+ my $self = shift;
+
+ my $text = shift;
+
+ $self->{text} = $text;
+
+ # Don't need the ouput since GET_TEXT_ACK will be called and
+ # we'll set it there
+ $self->sendMessage('iCommand' => $::PUKE_LABEL_SETTEXT,
+ 'iArg' => 0,
+ 'cArg' => $text,
+ 'CallBack' => sub {});
+
+}
+
+sub setPixmap {
+ my $self = shift;
+
+ my $text = shift;
+
+ $self->{text} = "***PIXMAP***" . $text;
+
+ # Don't need the ouput since GET_TEXT_ACK will be called and
+ # we'll set it there
+ $self->sendMessage('iCommand' => $::PUKE_LABEL_SETPIXMAP,
+ 'cArg' => $text,
+ 'CallBack' => sub {});
+
+}
+
+sub setMovie {
+ my $self = shift;
+
+ my $text = shift;
+
+ $self->{text} = "***MOVIE***" . $text;
+
+ # Don't need the ouput since GET_TEXT_ACK will be called and
+ # we'll set it there
+ $self->sendMessage('iCommand' => $::PUKE_LABEL_SETMOVIE,
+ 'cArg' => $text,
+ 'CallBack' => sub {});
+
+}
+
+
+sub text {
+ my $self = shift;
+
+ return $self->{text};
+}
+
+
+
+sub setAlignment {
+ my $self = shift;
+
+ my $align = shift;
+
+
+ $self->{align} = $align;
+
+ # Don't need the ouput since GET_TEXT_ACK will be called and
+ # we'll set it there
+ $self->sendMessage('iCommand' => $::PUKE_LABEL_SETALIGNMENT,
+ 'iArg' => $align,
+ 'CallBack' => sub {});
+
+}
+
+
+
+package main;
+