Main goal is: get content "xywh" from given rect and padding.
Of course content.x is dynamic.

//
import core.sys.windows.windows;
import std.stdio;


class Base
{
    RECT rect    = { 0, 0, 500, 400 };
    RECT padding = { 10, 10, 10, 10 };

    // ...content...
    ??? content
    {
@property int x() const { return rect.left + padding.left; }
    }
}

int main()
{
    auto b = new Base();
    writeln( b.content.x );
}



How to implement "b.content.x" ( sequence call "content" of the "b" and then "x" of that ) ?
How to implement beauty ?


  • b.content.x - get prop... Виталий Фадеев via Digitalmars-d-learn

Reply via email to