Class Joyau::MultiVerticalMsgSelecter
In: Drawable.cpp
Parent: Joyau::Drawable

Class which allows to select between some VerticalMsgSelecter.

Methods

<<   focus   focus=   index   item   new   resize   select   selected   size  

Public Class methods

Creates a new selecter.

[Source]

/*
  call-seq: new()

  Creates a new selecter.
*/
VALUE wrap<MultiVerticalMsgSelecter>(int argc, VALUE *argv, VALUE info)
{
   MultiVerticalMsgSelecter *ptr = new MultiVerticalMsgSelecter;
   ptr->setClass("MultiVerticalMsgSelecter");
   VALUE tdata = Data_Wrap_Struct(info, 0, 
                                  wrapped_free<MultiVerticalMsgSelecter>, ptr);
   return tdata;
}

Public Instance methods

Adds an object to the selecter.

[Source]

/*
  call-seq: addItem(obj)

  Adds an object to the selecter.
*/
VALUE GenericSelecter_addItem(VALUE self, VALUE obj)
{
   T &ref = getRef<T>(self);
   typename T::content_t &arg = getRef<typename T::content_t>(obj);
   
   ref.addItem(arg);
   return Qnil;
}

Returns whether the object has focus.

[Source]

/*
  Returns whether the object has focus.
*/
VALUE GenericSelecter_focus(VALUE self)
{
   T &ref = getRef<T>(self);
   return ref.getFocus() ? Qtrue : Qfalse;
}

Sets the focus on the selecter. When false, the focus effect is never applied.

[Source]

/*
  call-seq: focus=(val)

  Sets the focus on the selecter. When false, the focus effect is never applied.
*/
VALUE GenericSelecter_setFocus(VALUE self, VALUE val)
{
   T &ref = getRef<T>(self);
   ref.setFocus(val == Qtrue);
   
   return Qnil;
}

Returns the actual object’s index.

[Source]

/*
  Returns the actual object's index.
*/
VALUE GenericSelecter_index(VALUE self)
{
   T &ref = getRef<T>(self);
   return INT2FIX(ref.getIndex());
}

Changes the selected element, increasing the actual index by the given argument.

If index + id > size, nothing will happen.

[Source]

/*
  call-seq: select(id)

  Changes the selected element, increasing the actual index by the given 
  argument.

  If index + id > size, nothing will happen.
*/
VALUE GenericSelecter_select(VALUE self, VALUE dir)
{
   T &ref = getRef<T>(self);
   ref.select(FIX2INT(dir));

   return Qnil;
}

Changes the selecter’s size. Everything will be drawn in a such rect, either by reducing or increasing the object’s size.

[Source]

/*
  call-seq: resize(w, h)

  Changes the selecter's size. Everything will be drawn in a such rect,
  either by reducing or increasing the object's size.
*/
VALUE GenericSelecter_resize(VALUE self, VALUE w, VALUE h)
{
   T &ref = getRef<T>(self);
   ref.resize(FIX2INT(w), FIX2INT(h));

   return Qnil;
}

Changes the selected element, increasing the actual index by the given argument.

If index + id > size, nothing will happen.

[Source]

/*
  call-seq: select(id)

  Changes the selected element, increasing the actual index by the given 
  argument.

  If index + id > size, nothing will happen.
*/
VALUE GenericSelecter_select(VALUE self, VALUE dir)
{
   T &ref = getRef<T>(self);
   ref.select(FIX2INT(dir));

   return Qnil;
}

Returns the selected item.

[Source]

/*
  Returns the selected item.
*/
VALUE GenericSelecter_selected(VALUE self)
{
   T &ref = getRef<T>(self);
   return ref.getSelected().toRuby();
}

Returns how many items are present in the selecter.

[Source]

/*
  Returns how many items are present in the selecter.
*/
VALUE GenericSelecter_size(VALUE self)
{
   T &ref = getRef<T>(self);
   return INT2FIX(ref.getSize());
}

[Validate]