Fixed overloading issue in MenuBar

git-svn-id: svn://ultimatepp.org/upp/trunk@9910 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-06-08 08:46:27 +00:00
parent bff0f52f4e
commit 767408e881
3 changed files with 6 additions and 12 deletions

View file

@ -291,12 +291,12 @@ Bar::Item& Bar::Add(const char *text, const UPP::Image& image, const Callback&
{
return AddItem(callback).Text(text).Image(image);
}
/*
Bar::Item& Bar::Add(const String& text, const UPP::Image& image, const Callback& callback)
{
return Add(~text, image, callback);
}
*/
Bar::Item& Bar::Add(KeyInfo& (*key)(), const UPP::Image& image, const Callback& callback)
{
const char *text = (*key)().name;
@ -332,10 +332,12 @@ Bar::Item& Bar::Add(const char *text, const UPP::Image& image, const Function<vo
return Add(text, image, Callback() << fn);
}
/*
Bar::Item& Bar::Add(const String& text, const UPP::Image& image, const Function<void ()>& fn)
{
return Add(text, image, Callback() << fn);
}
*/
Bar::Item& Bar::Add(KeyInfo& (*key)(), const UPP::Image& image, const Function<void ()>& fn)
{

View file

@ -104,7 +104,7 @@ public:
Item& Add(bool enable, const char *text, const UPP::Image& image, const Callback& callback);
Item& Add(bool enable, KeyInfo& (*key)(), const UPP::Image& image, const Callback& callback);
Item& Add(const char *text, const UPP::Image& image, const Callback& callback);
Item& Add(const String& text, const UPP::Image& image, const Callback& callback);
// Item& Add(const String& text, const UPP::Image& image, const Callback& callback);
Item& Add(KeyInfo& (*key)(), const UPP::Image& image, const Callback& callback);
Item& Add(bool enable, const char *text, const Callback& callback);
@ -115,7 +115,7 @@ public:
Item& Add(bool enable, const char *text, const UPP::Image& image, const Function<void ()>& fn);
Item& Add(bool enable, KeyInfo& (*key)(), const UPP::Image& image, const Function<void ()>& fn);
Item& Add(const char *text, const UPP::Image& image, const Function<void ()>& fn);
Item& Add(const String& text, const UPP::Image& image, const Function<void ()>& fn);
// Item& Add(const String& text, const UPP::Image& image, const Function<void ()>& fn);
Item& Add(KeyInfo& (*key)(), const UPP::Image& image, const Function<void ()>& fn);
Item& Add(bool enable, const char *text, const Function<void ()>& fn);

View file

@ -99,10 +99,6 @@ tem][@(0.0.255) `&]_[* Add]([@(0.0.255) bool]_[*@3 enable], [_^Upp`:`:KeyInfo^ K
tem][@(0.0.255) `&]_[* Add]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 text],
[@(0.0.255) const]_[_^Upp`:`:Image^ Upp`::Image][@(0.0.255) `&]_[*@3 image],
[@(0.0.255) const]_[_^Upp`:`:Callback^ Callback][@(0.0.255) `&]_[*@3 callback])&]
[s5;:Upp`:`:Bar`:`:Add`(const Upp`:`:String`&`,const Upp`:`:Image`&`,const Upp`:`:Callback`&`):%- [_^Upp`:`:Bar`:`:Item^ I
tem][@(0.0.255) `&]_[* Add]([@(0.0.255) const]_[_^Upp`:`:String^ String][@(0.0.255) `&]_[*@3 t
ext], [@(0.0.255) const]_[_^Upp`:`:Image^ Upp`::Image][@(0.0.255) `&]_[*@3 image],
[@(0.0.255) const]_[_^Upp`:`:Callback^ Callback][@(0.0.255) `&]_[*@3 callback])&]
[s5;:Upp`:`:Bar`:`:Add`(Upp`:`:KeyInfo`&`(`*`)`(`)`,const Upp`:`:Image`&`,const Upp`:`:Callback`&`):%- [_^Upp`:`:Bar`:`:Item^ I
tem][@(0.0.255) `&]_[* Add]([_^Upp`:`:KeyInfo^ KeyInfo][@(0.0.255) `&]_(`*[*@3 key])(),
[@(0.0.255) const]_Upp`::Image[@(0.0.255) `&]_[*@3 image], [@(0.0.255) const]_Callback[@(0.0.255) `&
@ -132,10 +128,6 @@ tem][@(0.0.255) `&]_[* Add]([@(0.0.255) bool]_[*@3 enable], [_^Upp`:`:KeyInfo^ K
tem][@(0.0.255) `&]_[* Add]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 text],
[@(0.0.255) const]_[_^Upp`:`:Image^ Upp`::Image][@(0.0.255) `&]_[*@3 image],
[@(0.0.255) const]_[_^Upp`:`:Function^ Function]<[@(0.0.255) void]_()>`&_[*@3 fn])&]
[s5;:Upp`:`:Bar`:`:Add`(const Upp`:`:String`&`,const Upp`:`:Image`&`,const Upp`:`:Function`<void`(`)`>`&`):%- [_^Upp`:`:Bar`:`:Item^ I
tem][@(0.0.255) `&]_[* Add]([@(0.0.255) const]_[_^Upp`:`:String^ String][@(0.0.255) `&]_[*@3 t
ext], [@(0.0.255) const]_[_^Upp`:`:Image^ Upp`::Image][@(0.0.255) `&]_[*@3 image],
[@(0.0.255) const]_[_^Upp`:`:Function^ Function]<[@(0.0.255) void]_()>`&_[*@3 fn])&]
[s5;:Upp`:`:Bar`:`:Add`(Upp`:`:KeyInfo`&`(`*`)`(`)`,const Upp`:`:Image`&`,const Upp`:`:Function`<void`(`)`>`&`):%- [_^Upp`:`:Bar`:`:Item^ I
tem][@(0.0.255) `&]_[* Add]([_^Upp`:`:KeyInfo^ KeyInfo][@(0.0.255) `&]_(`*[*@3 key])(),
[@(0.0.255) const]_Upp`::Image[@(0.0.255) `&]_[*@3 image], [@(0.0.255) const]_Function<[@(0.0.255) v