³ò
0ŽGc           @   so   d  d k  Z  d  d k Td  d k l Z d d d „  ƒ  YZ d d d „  ƒ  YZ d e f d	 „  ƒ  YZ d
 „  Z d S(   iÿÿÿÿN(   t   *(   t   StatusFieldsHandlert   PerlStatusBarCodeGeneratorc           B   s   e  Z d  „  Z RS(   c         C   s-  t  i d } | i d \ } } | i i d ƒ } | p
 d } n d | i t | ƒ | f g } g  } | i } | d | i d i t t	 | ƒ ƒ f ƒ d i g  }	 | D] }
 |	 | i
 |
 ƒ q« ~	 ƒ } | d	 | i | f ƒ | d
 | i ƒ | d | i | i f ƒ | d | i ƒ | | g  f S(   sM           function that generates code for the statusbar of a wxFrame.
        t   perlt	   statusbart   stylet   0s.   $self->{%s} = $self->CreateStatusBar(%s, %s);
s"   $self->{%s}->SetStatusWidths(%s);
t   ,s   ,
		s!   
	my( @%s_fields ) = (
		%s
	);

s   if( @%s_fields ) {
s0   	$self->{%s}->SetStatusText($%s_fields[$_], $_) s   
		for 0 .. $#%s_fields ;
	}
(   t   commont   code_writerst
   propertiest   gett   namet   lent   appendt   joint   mapt   strt	   quote_str(   t   selft   objt   plgent   labelst   widthsR   t   initt   propsR   t   _[1]t   l(    (    sP   C:\Python25\Lib\site-packages\_spe\plugins\wxGlade\widgets\frame\perl_codegen.pyt   get_code   s$    	#3(   t   __name__t
   __module__R   (    (    (    sP   C:\Python25\Lib\site-packages\_spe\plugins\wxGlade\widgets\frame\perl_codegen.pyR      s   t   PerlFrameCodeGeneratorc           B   s>   e  Z d  d d d d d d g Z d „  Z d „  Z d	 „  Z RS(
   s   $parents   $ids   $titles   $poss   $sizes   $styles   $namec         C   s   g  g  g  g  f S(   N(    (   R   R   (    (    sP   C:\Python25\Lib\site-packages\_spe\plugins\wxGlade\widgets\frame\perl_codegen.pyR   .   s    c         C   s¸   | i  } t i d } g  } | i d ƒ } | o | i d | i | ƒ ƒ n | i d ƒ } | o8 | i d ƒ | i d | i | ƒ ƒ | i d ƒ n | i | i | ƒ ƒ | S(   s           generates the code for the various wxFrame specific properties.
        Returns a list of strings containing the generated code
        R   t   titles   $self->SetTitle(%s);
t   icons   my $icon = Wx::Icon->new();
s?   $icon->CopyFromBitmap(Wx::Bitmap->new(%s, wxBITMAP_TYPE_ANY));
s   $self->SetIcon($icon);
(   R
   R   R	   R   R   R   t   extendt   generate_common_properties(   R   t   framet   propR   t   outR    R!   (    (    sP   C:\Python25\Lib\site-packages\_spe\plugins\wxGlade\widgets\frame\perl_codegen.pyt   get_properties_code1   s    		c         C   s¥   d g } y) t  | i d ƒ o | i d ƒ n Wn t t f j
 o n Xt i d } | i i d d ƒ i ƒ  o* | i	 d	 j  o | i | i
 | ƒ ƒ n | S(
   Ns   $self->Layout();
t   centereds   $self->Centre();
R   t   sizet    i   i   (   i   i   (   t   intR
   R   t   KeyErrort
   ValueErrorR   R	   R   t   stript   for_versiont   generate_code_size(   R   R$   t   retR   (    (    sP   C:\Python25\Lib\site-packages\_spe\plugins\wxGlade\widgets\frame\perl_codegen.pyt   get_layout_codeG   s    	(   R   R   t   new_signatureR   R'   R2   (    (    (    sP   C:\Python25\Lib\site-packages\_spe\plugins\wxGlade\widgets\frame\perl_codegen.pyR   (   s   		t   PerlMDIChildFrameCodeGeneratorc           B   s   e  Z d  g Z RS(   s   Wx::MDI(   R   R   t   extra_headers(    (    (    sP   C:\Python25\Lib\site-packages\_spe\plugins\wxGlade\widgets\frame\perl_codegen.pyR4   W   s   c          C   sÑ   t  i }  d |  d <d |  d <d |  d <d t  i d <d t  i d <t  i i d ƒ } | os | i d t ƒ  ƒ | i d t ƒ  ƒ | i d t ƒ  ƒ | i	 d	 t
 ƒ | i	 d
 | i ƒ | i	 d | i ƒ n d  S(   Nt   wxFramet	   EditFramet   wxMDIChildFramet   EditMDIChildFramet   wxStatusBart   EditStatusBari   R   t   fieldst   menubarR   (   R   t   class_namest	   toplevelsR	   R   t   add_widget_handlerR   R4   R   t   add_property_handlerR   t   DummyPropertyHandler(   t   cnR   (    (    sP   C:\Python25\Lib\site-packages\_spe\plugins\wxGlade\widgets\frame\perl_codegen.pyt
   initialize^   s    	


	
(    (    (   R   t   MenuTreet   codegenR   R   R   R4   RD   (    (    (    sP   C:\Python25\Lib\site-packages\_spe\plugins\wxGlade\widgets\frame\perl_codegen.pys   <module>   s   
/