Skip to content

How to retrieve text from a label? #602

Answered by damiensellier
bijlevel asked this question in Q&A
Discussion options

You must be logged in to vote

L calls "luabind" wrapper associated to the component.
this is why in the ctrlr code you have a list of Luabind functions.

For exemple this is the function for the component (slider, button etc)

void CtrlrComponent::wrapForLua (lua_State *L)
{
    using namespace luabind;

    module(L)
    [
        class_<CtrlrComponent, bases<CtrlrLuaObject, Component> >("CtrlrComponent")
            .def("repaint", (void (Component::*)()) &Component::repaint)
            .def("getWidth", &Component::getWidth)
            .def("getHeight", &Component::getHeight)
            .def("setSize", &Component::setSize)
            .def("getX", &Component::getX)
            .def("getY", &Component::getY)
       …

Replies: 4 comments 19 replies

Comment options

You must be logged in to vote
15 replies
@Ted-juh
Comment options

@bijlevel
Comment options

@damiensellier
Comment options

Answer selected by bijlevel
@bijlevel
Comment options

@damiensellier
Comment options

@Ted-juh
Comment options

@dobo365
Comment options

Comment options

You must be logged in to vote
3 replies
@bijlevel
Comment options

@damiensellier
Comment options

@dnaldoog
Comment options

Comment options

You must be logged in to vote
1 reply
@dnaldoog
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants