Skip to content

Commit

Permalink
Member functions of controls are added @Property annotation.
Browse files Browse the repository at this point in the history
  • Loading branch information
shoo committed Sep 8, 2011
1 parent cea9ab7 commit e7aa350
Show file tree
Hide file tree
Showing 18 changed files with 752 additions and 751 deletions.
52 changes: 26 additions & 26 deletions win32/dfl/button.d
Expand Up @@ -16,7 +16,7 @@ private extern(Windows) void _initButton();
abstract class ButtonBase: ControlSuperClass // docmain
{
///
void textAlign(ContentAlignment calign) // setter
@property void textAlign(ContentAlignment calign) // setter
{
LONG wl = _bstyle() & ~(BS_BOTTOM | BS_CENTER | BS_TOP | BS_RIGHT | BS_LEFT | BS_VCENTER);

Expand Down Expand Up @@ -65,7 +65,7 @@ abstract class ButtonBase: ControlSuperClass // docmain
}

/// ditto
ContentAlignment textAlign() // getter
@property ContentAlignment textAlign() // getter
{
LONG wl = _bstyle();

Expand Down Expand Up @@ -208,13 +208,13 @@ abstract class ButtonBase: ControlSuperClass // docmain
protected:

///
final void isDefault(bool byes) // setter
final @property void isDefault(bool byes) // setter
{
isdef = byes;
}

/// ditto
final bool isDefault() // getter
final @property bool isDefault() // getter
{
//return (_bstyle() & BS_DEFPUSHBUTTON) == BS_DEFPUSHBUTTON;
//return GetDlgCtrlID(m.hWnd) == IDOK;
Expand All @@ -240,7 +240,7 @@ abstract class ButtonBase: ControlSuperClass // docmain


///
override Size defaultSize() // getter
override @property Size defaultSize() // getter
{
return Size(75, 23);
}
Expand Down Expand Up @@ -281,13 +281,13 @@ class Button: ButtonBase, IButtonControl // docmain


///
DialogResult dialogResult() // getter
@property DialogResult dialogResult() // getter
{
return dresult;
}

/// ditto
void dialogResult(DialogResult dr) // setter
@property void dialogResult(DialogResult dr) // setter
{
dresult = dr;
}
Expand Down Expand Up @@ -378,7 +378,7 @@ class Button: ButtonBase, IButtonControl // docmain
}


override void text(Dstring txt) // setter
override @property void text(Dstring txt) // setter
{
if(txt.length)
assert(!this.image, "Button image with text not supported");
Expand All @@ -390,13 +390,13 @@ class Button: ButtonBase, IButtonControl // docmain


///
final Image image() // getter
final @property Image image() // getter
{
return _img;
}

/// ditto
final void image(Image img) // setter
final @property void image(Image img) // setter
in
{
if(img)
Expand Down Expand Up @@ -548,7 +548,7 @@ class Button: ButtonBase, IButtonControl // docmain
class CheckBox: ButtonBase // docmain
{
///
final void appearance(Appearance ap) // setter
final @property void appearance(Appearance ap) // setter
{
final switch(ap)
{
Expand All @@ -565,7 +565,7 @@ class CheckBox: ButtonBase // docmain
}

/// ditto
final Appearance appearance() // getter
final @property Appearance appearance() // getter
{
if(_bstyle() & BS_PUSHLIKE)
return Appearance.BUTTON;
Expand All @@ -574,7 +574,7 @@ class CheckBox: ButtonBase // docmain


///
final void autoCheck(bool byes) // setter
final @property void autoCheck(bool byes) // setter
{
if(byes)
_bstyle((_bstyle() & ~BS_CHECKBOX) | BS_AUTOCHECKBOX);
Expand All @@ -586,7 +586,7 @@ class CheckBox: ButtonBase // docmain
}

/// ditto
final bool autoCheck() // getter
final @property bool autoCheck() // getter
{
/+
return (_bstyle() & BS_AUTOCHECKBOX) == BS_AUTOCHECKBOX;
Expand All @@ -612,7 +612,7 @@ class CheckBox: ButtonBase // docmain


///
final void checked(bool byes) // setter
final @property void checked(bool byes) // setter
{
if(byes)
_check = CheckState.CHECKED;
Expand All @@ -625,7 +625,7 @@ class CheckBox: ButtonBase // docmain

/// ditto
// Returns true for indeterminate too.
final bool checked() // getter
final @property bool checked() // getter
{
if(isHandleCreated)
_updateState();
Expand All @@ -634,7 +634,7 @@ class CheckBox: ButtonBase // docmain


///
final void checkState(CheckState st) // setter
final @property void checkState(CheckState st) // setter
{
_check = st;

Expand All @@ -643,7 +643,7 @@ class CheckBox: ButtonBase // docmain
}

/// ditto
final CheckState checkState() // getter
final @property CheckState checkState() // getter
{
if(isHandleCreated)
_updateState();
Expand Down Expand Up @@ -680,7 +680,7 @@ class CheckBox: ButtonBase // docmain
class RadioButton: ButtonBase // docmain
{
///
final void appearance(Appearance ap) // setter
final @property void appearance(Appearance ap) // setter
{
final switch(ap)
{
Expand All @@ -697,7 +697,7 @@ class RadioButton: ButtonBase // docmain
}

/// ditto
final Appearance appearance() // getter
final @property Appearance appearance() // getter
{
if(_bstyle() & BS_PUSHLIKE)
return Appearance.BUTTON;
Expand All @@ -706,7 +706,7 @@ class RadioButton: ButtonBase // docmain


///
final void autoCheck(bool byes) // setter
final @property void autoCheck(bool byes) // setter
{
/+
if(byes)
Expand All @@ -721,7 +721,7 @@ class RadioButton: ButtonBase // docmain


/// ditto
final bool autoCheck() // getter
final @property bool autoCheck() // getter
{
/+ // Also commented out when using BS_AUTORADIOBUTTON.
return (_bstyle() & BS_AUTOCHECKBOX) == BS_AUTOCHECKBOX;
Expand Down Expand Up @@ -772,7 +772,7 @@ class RadioButton: ButtonBase // docmain


///
final void checked(bool byes) // setter
final @property void checked(bool byes) // setter
{
if(byes)
_check = CheckState.CHECKED;
Expand All @@ -785,7 +785,7 @@ class RadioButton: ButtonBase // docmain

/// ditto
// Returns true for indeterminate too.
final bool checked() // getter
final @property bool checked() // getter
{
if(isHandleCreated)
_updateState();
Expand All @@ -794,7 +794,7 @@ class RadioButton: ButtonBase // docmain


///
final void checkState(CheckState st) // setter
final @property void checkState(CheckState st) // setter
{
_check = st;

Expand All @@ -803,7 +803,7 @@ class RadioButton: ButtonBase // docmain
}

/// ditto
final CheckState checkState() // getter
final @property CheckState checkState() // getter
{
if(isHandleCreated)
_updateState();
Expand Down
9 changes: 5 additions & 4 deletions win32/dfl/clippingform.d
Expand Up @@ -50,15 +50,15 @@ private:
public:


const
const @property
size_t width()
{
return _width;
}


///
const
const @property
size_t height()
{
return _height;
Expand Down Expand Up @@ -114,6 +114,7 @@ public:


///
@property
Region region()
{
if (_rgn is null) return null;
Expand Down Expand Up @@ -212,14 +213,14 @@ public:


///
Image clipping()
@property Image clipping()
{
return m_Image;
}


/// ditto
void clipping(Image img)
@property void clipping(Image img)
{
m_Image = img;
}
Expand Down

0 comments on commit e7aa350

Please sign in to comment.