# Copyright (c) 2005 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: Anchor.pm,v 1.2 2006/10/16 21:08:05 moeller Exp $ package Bivio::UI::HTML::Widget::Anchor; use strict; $Bivio::UI::HTML::Widget::Anchor::VERSION = sprintf('%d.%02d', q$Revision: 1.2 $ =~ /\d+/g); $_ = $Bivio::UI::HTML::Widget::Anchor::VERSION; =head1 NAME Bivio::UI::HTML::Widget::Anchor - a link target anchor =head1 RELEASE SCOPE bOP =head1 SYNOPSIS use Bivio::UI::HTML::Widget::Anchor; =cut =head1 EXTENDS L =cut use Bivio::UI::Widget; @Bivio::UI::HTML::Widget::Anchor::ISA = ('Bivio::UI::Widget'); =head1 DESCRIPTION C renders an anchor which can be used as a link target. =head1 ATTRIBUTES =over 4 =item name : string or array_ref (required) The name of the anchor. =item value : string or array_ref or Bivio::UI::Widget (required) The value inside the anchor. =back =cut #=IMPORTS use Bivio::HTML; #=VARIABLES =head1 METHODS =cut =for html =head2 static internal_new_args(any name, any value, hash_ref attributes) : hash_ref Implements positional argument parsing for L. =cut sub internal_new_args { my(undef, $name, $value, $attributes) = @_; return { name => $name, value => $value, ($attributes ? %$attributes : ()), }; } =for html =head2 render(any source, string_ref buffer) Renders the named anchor. =cut sub render { my($self, $source, $buffer) = @_; # call escape_query() and not escape() because MSIE # requires that the item match the URI value exactly $$buffer .= ''; $self->render_attr('value', $source, $buffer); $$buffer .= ''; return; } #=PRIVATE SUBROUTINES =head1 COPYRIGHT Copyright (c) 2005 bivio Software, Inc. All Rights Reserved. Visit http://www.bivio.biz for more info. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; If not, you may get a copy from: http://www.opensource.org/licenses/lgpl-license.html =head1 VERSION $Id: Anchor.pm,v 1.2 2006/10/16 21:08:05 moeller Exp $ =cut 1;