Link Search Menu Expand Document

CLASSIFIER : GRButton

uid: class-GRButton-CVEViewer-MetaModel@g-scop.grenoble-inp.fr

About

Abstract

A GRButton is a graphic node visualizing a simple button

GRFrame

To create a GRCube just call

button=cve.viewer.GRButton(label=None,pixmap=None,area=(0,0,1,1))

where :

  • label : text to print
  • pixmap : texture to visualise as icon
  • area : sub-texture to bound the icon

Class Diagram

Class diagram of class of GRButton.

Inherits

attribute type cardinality
label vstring [1,1]
label-scale vreal [1,1]
texture TEXTURE [1,1]
texture-trim vvector [1,1]
texture-pushed TEXTURE [0,1]
texture-pushed-trim vvector [1,1]
show-label vboolean [1,1]
show-pixmap vboolean [1,1]
show-background vboolean [1,1]
direction vint [1,1]
highlighted vboolean [1,1]
pushed vboolean [1,1]
toggle vboolean [1,1]
toggle-fellow GRButton [0,-1]
toggle-antagonist GRButton [0,-1]
args GRNODE [0,-1]
on-push vstring [0,-1]
on-release vstring [0,-1]
show-objects GRNODE [0,-1]
min-length vint [1,1]
color-push vcolor [1,1]
color-release vcolor [1,1]
menu GRMenu [0,1]

Methods

  • add_antagonist(self,..) :

          *args: infinte list of buttons
    
  • add_antagonist_list(self,..) :

          args=[] : list or set of buttons
    
  • set_texture(self,..) :

          set texture
          < path to a picture file or a texture object
          < area a tuple (umin,vmin,umax,vmax)
    
  • set_colors(self,..) :

          release the button
          < local : emits the event towards the current world
          < sendtoserver : emits the event towards the server
    
  • set_label(self,..) :

          set button label
          < label (button label : a string'
    
  • push(self,..) :

          push the button
          < local : emits the event towards the current world
          < sendtoserver : emits the event towards the server
    
  • release(self,..) :

          release the button
          < local : emits the event towards the current world
          < sendtoserver : emits the event towards the server
    
  • set_toggle(self,..) :

          set the toggle status. If true the button changes its state only on push. Release as no effect.
          < toggle : toggle status (True or False)
          < local : emits the event towards the current world
          < sendtoserver : emits the event towards the server
    
  • is_toggle(self,..) :

          Provides the current toggle status of a button
          > toggle status :  If true the button changes its state only on push. Release as no effect.
    
  • show_label(self,..) :

          show or hide label
          < show : show status
          < local : emits the event towards the current world
          < sendtoserver : emits the event towards the server
    
  • show_pixmap(self,..) :

          show or hide icon/pixmap
          < show : show status
          < local : emits the event towards the current world
          < sendtoserver : emits the event towards the server
    
  • set_pixmap_texture(self,..) :

          set texture 
          < show : show status
          < local : emits the event towards the current world
          < sendtoserver : emits the event towards the server
    
  • trim_pixmap_texture(self,..) :

          set texture
          < trim vector : (umin,vmin,UMAX,VMAX)
          < local : emits the event towards the current world
          < sendtoserver : emits the event towards the server
    
  • set_texture_pushed(self,..) :

          set texture when button is pushed
          < texture : a cvetexture
          < trim : the trim area of th etexture
          < local : emits the event towards the current world
          < sendtoserver : emits the event towards the server
    
  • set_direction(self,..) :

          set button direction (icon-label)
              - 0 : label on icon right
              - 1 : label on icon left
              - 2 : label under icon 
              - 3 : label above icon 
          < direction 
          < local : emits the event towards the current world
          < sendtoserver : emits the event towards the server
    
  • show_background(self,..) :

          show or hide background
          < show : show status
          < local : emits the event towards the current world
          < sendtoserver : emits the event towards the server