Skip to content

Commit

Permalink
Merge branch 'work'
Browse files Browse the repository at this point in the history
  • Loading branch information
oktonion committed Oct 7, 2017
2 parents 1e34b32 + 757733a commit a520a0b
Show file tree
Hide file tree
Showing 28 changed files with 1,993 additions and 939 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,5 @@ src/.vscode/launch.json

# old library
/old/*
/slib/*
/slib/*
*.tar
3 changes: 3 additions & 0 deletions src/Basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ void Basic::check()

Basic::Basic(int abn):
Widget(abn),
resource(this),
//properties:
Color(this),
FillColor(this),
Expand All @@ -30,6 +31,7 @@ Basic::Basic(int abn):

Basic::Basic(PtWidget_t *wdg):
Widget(wdg),
resource(this),
//properties:
Color(this),
FillColor(this),
Expand All @@ -47,6 +49,7 @@ Basic::Basic(PtWidget_t *wdg):

Basic::Basic(const Basic &rhs):
Widget(rhs),
resource(this),
//properties:
Color(this),
FillColor(this),
Expand Down
32 changes: 17 additions & 15 deletions src/Basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,20 @@ namespace PhWidgets
public ArgumentsEx<Widget::ArgUnsignedShort>,
public ThisArgs::ArgUnsignedShort
{
using Widget::ArgUnsignedShort::eArgUnsignedShort;
using ThisArgs::ArgUnsignedShort::eArgUnsignedShort;
};

struct ArgUnsignedLong:
public ArgumentsEx<Widget::ArgUnsignedLong>,
public ThisArgs::ArgUnsignedLong
{
using Widget::ArgUnsignedLong::eArgUnsignedLong;
using ThisArgs::ArgUnsignedLong::eArgUnsignedLong;
};

struct ArgColor:
public ArgumentsEx<Widget::ArgColor>,
public ThisArgs::ArgColor
{
using Widget::ArgColor::eArgColor;
using ThisArgs::ArgColor::eArgColor;
};

Expand All @@ -145,14 +142,14 @@ namespace PhWidgets
public ArgumentsEx<Widget::ArgPChar>,
public ThisArgs::ArgPChar
{
using Widget::ArgPChar::eArgPChar;
using ThisArgs::ArgPChar::eArgPChar;
};

struct Callback:
public ArgumentsEx<ThisCallbacks::Callback>,
public Widget::Callback
{
using ThisCallbacks::Callback::eCallback;
};

struct Arguments:
Expand All @@ -174,6 +171,20 @@ namespace PhWidgets
};

protected:

typedef ResourceFrom<Widget::WidgetResourcesSingleton>::
Define::String<ThisArgs::ArgPChar::eArgPChar>::
Define::Color<ThisArgs::ArgColor::eArgColor>::
Define::Scalar<ThisArgs::ArgUnsignedShort::eArgUnsignedShort, unsigned short>::
Define::Scalar<ThisArgs::ArgChar::eArgChar, char>::
//Define::Flag<ThisArgs::ArgLong::eArgLong, long>::
Define::Flag<ThisArgs::ArgUnsignedLong::eArgUnsignedLong, unsigned long>::
//Define::Flag<ThisArgs::ArgUnsigned::eArgUnsigned, unsigned>::

Define::Link<ThisCallbacks::Callback::eCallback, PtCallback_t*>::

resource_type WidgetResourcesSingleton;

virtual void check();

void setColor(PgColor_t);
Expand All @@ -189,6 +200,8 @@ namespace PhWidgets
Basic(const Basic &rhs);

Basic &operator=(const Basic &rhs);

WidgetResourcesSingleton resource;

property<PgColor_t>::bind<Basic, &Basic::getColor, &Basic::setColor> Color;
property<PgColor_t>::bind<Basic, &Basic::getFillColor, &Basic::setFillColor> FillColor;
Expand All @@ -209,17 +222,6 @@ namespace PhWidgets
void OnMenu(PtCallbackInfo_t *info);
void OnRepeat(PtCallbackInfo_t *info);
};


INIT_WIDGET_RESOURCE0(Basic::ThisArgs::ArgPChar::eArgPChar, String);
//INIT_WIDGET_RESOURCE0(Basic::ThisArgs::ArgPVoid::eArgPVoid, Alloc);

INIT_WIDGET_RESOURCE1(Basic::ThisArgs::ArgColor::eArgColor, PgColor_t, Color);
INIT_WIDGET_RESOURCE1(Basic::ThisArgs::ArgUnsignedShort::eArgUnsignedShort, unsigned short, Scalar);
INIT_WIDGET_RESOURCE1(Basic::ThisArgs::ArgChar::eArgChar, char, Scalar);
INIT_WIDGET_RESOURCE1(Basic::ThisCallbacks::Callback::eCallback, PtCallback_t, Link);

INIT_WIDGET_RESOURCE2(Basic::ThisArgs::ArgUnsignedLong::eArgUnsignedLong, unsigned long, unsigned long, Flag);



Expand Down
3 changes: 3 additions & 0 deletions src/Button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ void Button::check()

Button::Button(int abn):
Label(abn),
resource(this),
ArmColor(this)
{
check();
}

Button::Button(PtWidget_t *wdg):
Label(wdg),
resource(this),
ArmColor(this)
{
check();
Expand All @@ -27,6 +29,7 @@ Button::Button(PtWidget_t *wdg):

Button::Button(const Button &rhs):
Label(rhs),
resource(this),
ArmColor(this)
{

Expand Down
18 changes: 12 additions & 6 deletions src/Button.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,21 @@ namespace PhWidgets
public ArgumentsEx<Label::ArgColor>,
public ThisArgs::ArgColor
{
using ThisArgs::ArgColor::eArgColor;
};

struct ArgUnsignedChar:
public ArgumentsEx<Label::ArgUnsignedChar>,
public ThisArgs::ArgUnsignedChar
{
using ThisArgs::ArgUnsignedChar::eArgUnsignedChar;
};

struct ArgPImage:
public ArgumentsEx<Label::ArgPImage>,
public ThisArgs::ArgPImage
{
using ThisArgs::ArgPImage::eArgPImage;
};


Expand All @@ -71,13 +74,22 @@ namespace PhWidgets
};

protected:
typedef ResourceFrom<Label::WidgetResourcesSingleton>::
//Define::Image<ArgPImage::eArgPImage>:: // not implemented
Define::Color<ThisArgs::ArgColor::eArgColor>::
Define::Scalar<ThisArgs::ArgUnsignedChar::eArgUnsignedChar, unsigned char>::

resource_type WidgetResourcesSingleton;

virtual void check();

void setArmColor(PgColor_t);
PgColor_t getArmColor() const;


public:
WidgetResourcesSingleton resource;

Button(int abn);
Button(PtWidget_t *wdg);

Expand All @@ -87,12 +99,6 @@ namespace PhWidgets

property<PgColor_t>::bind<Button, &Button::getArmColor, &Button::setArmColor> ArmColor;
};


INIT_WIDGET_RESOURCE0(Button::ThisArgs::ArgPImage::eArgPImage, Image);

INIT_WIDGET_RESOURCE1(Button::ThisArgs::ArgColor::eArgColor, PgColor_t, Color);
INIT_WIDGET_RESOURCE1(Button::ThisArgs::ArgUnsignedChar::eArgUnsignedChar, unsigned char, Scalar);

}

Expand Down
3 changes: 3 additions & 0 deletions src/Container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ void Container::check()

Container::Container(int abn):
Basic(abn),
resource(this),
//callbacks:
ChildAddedRemoved(this),
ChildGettingFocus(this),
Expand All @@ -25,6 +26,7 @@ Container::Container(int abn):

Container::Container(PtWidget_t *wdg):
Basic(wdg),
resource(this),
//callbacks:
ChildAddedRemoved(this),
ChildGettingFocus(this),
Expand All @@ -37,6 +39,7 @@ Container::Container(PtWidget_t *wdg):

PhWidgets::Container::Container(const Container & rhs):
Basic(rhs),
resource(this),
//callbacks:
ChildAddedRemoved(this),
ChildGettingFocus(this),
Expand Down
34 changes: 20 additions & 14 deletions src/Container.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ namespace PhWidgets
public ArgumentsEx<Basic::ArgLong>,
public ThisArgs::ArgLong
{
using Basic::ArgLong::eArgLong;
using ThisArgs::ArgLong::eArgLong;
};

Expand Down Expand Up @@ -143,6 +142,7 @@ namespace PhWidgets
public ArgumentsEx<Basic::ArgPVoid>,
public ThisArgs::ArgPVoid
{
using ThisArgs::ArgPVoid::eArgPVoid;
};

struct ArgPRowLayoutInfo:
Expand All @@ -155,12 +155,14 @@ namespace PhWidgets
public ArgumentsEx<Basic::ArgPChar>,
public ThisArgs::ArgPChar
{
using ThisArgs::ArgPChar::eArgPChar;
};

struct Callback:
public ArgumentsEx<ThisCallbacks::Callback>,
public Basic::Callback
{
using ThisCallbacks::Callback::eCallback;
};

struct Arguments:
Expand All @@ -183,9 +185,26 @@ namespace PhWidgets
};

protected:
typedef ResourceFrom<Basic::WidgetResourcesSingleton>::
Define::String<ThisArgs::ArgPChar::eArgPChar>::
//Define::Boolean<ThisArgs::ArgInt::eArgBool, bool>:: // not implemented
Define::Scalar<ThisArgs::ArgInt::eArgInt, int>::
Define::Struct<ThisArgs::ArgPFillLayoutInfo::eArgPFillLayoutInfo, PtFillLayoutInfo_t>::
Define::Struct<ThisArgs::ArgPGridLayoutInfo::eArgPGridLayoutInfo, PtGridLayoutInfo_t>::
Define::Struct<ThisArgs::ArgPLayoutDefinition::eArgPLayoutDefinition, PtLayoutDefinition_t>::
Define::Struct<ThisArgs::ArgPRowLayoutInfo::eArgPRowLayoutInfo, PtRowLayoutInfo_t>::
Define::Struct<ThisArgs::ArgPVoid::eArgPVoid, void*>::
Define::Flag<ThisArgs::ArgLong::eArgLong, long>::

Define::Link<ThisCallbacks::Callback::eCallback, PtCallback_t*>::

resource_type WidgetResourcesSingleton;

virtual void check();

public:
WidgetResourcesSingleton resource;

Container(int abn);
Container(PtWidget_t *wdg);

Expand All @@ -199,19 +218,6 @@ namespace PhWidgets
phwidgets_event<Container, Container::Callbacks::layout> LayoutChanged;
phwidgets_event<Container, Container::Callbacks::resize> Resize;
};

INIT_WIDGET_RESOURCE0(Container::ThisArgs::ArgPChar::eArgPChar, String);
INIT_WIDGET_RESOURCE0(Container::ThisArgs::ArgBool::eArgBool, Boolean);

INIT_WIDGET_RESOURCE1(Container::ThisArgs::ArgInt::eArgInt, int, Scalar);
INIT_WIDGET_RESOURCE1(Container::ThisArgs::ArgPFillLayoutInfo::eArgPFillLayoutInfo, PtFillLayoutInfo_t, Struct);
INIT_WIDGET_RESOURCE1(Container::ThisArgs::ArgPGridLayoutInfo::eArgPGridLayoutInfo, PtGridLayoutInfo_t, Struct);
INIT_WIDGET_RESOURCE1(Container::ThisArgs::ArgPLayoutDefinition::eArgPLayoutDefinition, PtLayoutDefinition_t, Struct);
INIT_WIDGET_RESOURCE1(Container::ThisArgs::ArgPRowLayoutInfo::eArgPRowLayoutInfo, PtRowLayoutInfo_t, Struct);
INIT_WIDGET_RESOURCE1(Container::ThisArgs::ArgPVoid::eArgPVoid, void*, Struct);
INIT_WIDGET_RESOURCE1(Container::ThisCallbacks::Callback::eCallback, PtCallback_t, Link);

INIT_WIDGET_RESOURCE2(Container::ThisArgs::ArgLong::eArgLong, long, long, Flag);
}


Expand Down
3 changes: 3 additions & 0 deletions src/Label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ void Label::check()

Label::Label(int abn):
Basic(abn),
resource(this),
Caption(this),
BalloonColor(this)
{
Expand All @@ -20,6 +21,7 @@ Label::Label(int abn):

Label::Label(PtWidget_t *wdg):
Basic(wdg),
resource(this),
Caption(this),
BalloonColor(this)
{
Expand All @@ -28,6 +30,7 @@ Label::Label(PtWidget_t *wdg):

Label::Label(const Label &rhs):
Basic(rhs),
resource(this),
Caption(this),
BalloonColor(this)
{
Expand Down
Loading

0 comments on commit a520a0b

Please sign in to comment.