| Class | Joyau::MultiVerticalMsgSelecter |
| In: |
Drawable.cpp
|
| Parent: | Joyau::Drawable |
Class which allows to select between some VerticalMsgSelecter.
Creates a new selecter.
/*
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;
}
Adds an object to the selecter.
/*
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.
/*
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.
/*
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.
/*
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.
/*
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.
/*
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.
/*
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;
}