My pleasure, pleased that it's useful
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menubool loadWidgetsFromFile(const std::string& filename)
//Using the provided Ressource Path
std::string filepath = line.substr(equalSignPosition + 1);
if(line.substr(0, equalSignPosition) == "configfile" || line.substr(0, equalSignPosition) == "filename")
filepath = m_RessourcePath + line.substr(equalSignPosition + 1);
if(!widgetPtr.back()->setProperty(line.substr(0, equalSignPosition), filepath))
failed = true;
...
gui.setRessourcePath(resourcePath());
gui.loadWidgetsFromFile(resourcePath()+"form.txt");
...
Window:
{
Picture: ""
{
Filename = "xubuntu_bg_aluminium.jpg"
Left = 0
Top = 0
Width = 800
Height = 600
Visible = true
Enabled = true
Transparency = 255
CallbackId = 0
Smooth = false
}
Label: ""
{
ConfigFile = ""
Left = 200
Top = 100
Width = 161
Height = 30
Visible = true
Enabled = true
Transparency = 255
CallbackId = 0
Text = "Username:"
TextColor = (255,255,255,255)
TextSize = 30
BackgroundColor = (0,0,0,0)
AutoSize = true
}
Label: ""
{
ConfigFile = ""
Left = 200
Top = 250
Width = 150
Height = 30
Visible = true
Enabled = true
Transparency = 255
CallbackId = 0
Text = "Password:"
TextColor = (255,255,255,255)
TextSize = 30
BackgroundColor = (0,0,0,0)
AutoSize = true
}
EditBox: "Username"
{
ConfigFile = "confs/Black.conf"
Left = 200
Top = 140
Width = 400
Height = 40
Visible = true
Enabled = true
Transparency = 255
CallbackId = 0
Text = ""
TextSize = 25
MaximumCharacters = 0
Borders = (6,4,6,4)
TextColor = (200,200,200,255)
SelectedTextColor = (255,255,255,255)
SelectedTextBackgroundColor = (10,110,255,255)
SelectionPointColor = (110,110,255,255)
LimitTextWidth = false
SelectionPointWidth = 2
NumbersOnly = false
}
EditBox: "Password"
{
ConfigFile = "confs/Black.conf"
Left = 200
Top = 290
Width = 400
Height = 40
Visible = true
Enabled = true
Transparency = 255
CallbackId = 0
Text = ""
TextSize = 25
PasswordCharacter = *
MaximumCharacters = 0
Borders = (6,4,6,4)
TextColor = (200,200,200,255)
SelectedTextColor = (255,255,255,255)
SelectedTextBackgroundColor = (10,110,255,255)
SelectionPointColor = (110,110,255,255)
LimitTextWidth = false
SelectionPointWidth = 2
NumbersOnly = false
}
Button: ""
{
ConfigFile = "confs/Black.conf"
Left = 270
Top = 440
Width = 260
Height = 60
Visible = true
Enabled = true
Transparency = 255
Callback = LeftMouseClicked
CallbackId = 1
Text = "Login"
TextColor = (200,200,200,255)
TextSize = 40
}
}
Quote/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/tuple:234:73: error:
no matching constructor for initialization of
'std::__1::reference_wrapper<tgui::Callback>'
_NOEXCEPT_(is_nothrow_default_constructible<_Hp>::value) : value()
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/tuple:447:23: note:
in instantiation of member function 'std::__1::__tuple_leaf<0,
std::__1::reference_wrapper<tgui::Callback>, false>::__tuple_leaf'
requested here
_LIBCPP_CONSTEXPR __tuple_impl()
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/tuple:550:23: note:
in instantiation of member function
'std::__1::__tuple_impl<std::__1::__tuple_indices<0>,
std::__1::reference_wrapper<tgui::Callback> >::__tuple_impl' requested
here
_LIBCPP_CONSTEXPR tuple()
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/functional:1744:11: note:
in instantiation of member function
'std::__1::tuple<std::__1::reference_wrapper<tgui::Callback> >::tuple'
requested here
__bound_args_(_VSTD::forward<_BA>(__bound_args)...) {}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2243:15: note:
in instantiation of function template specialization
'std::__1::__bind<std::__1::function<void (const tgui::Callback &)> &,
std::__1::reference_wrapper<tgui::Callback>
&>::__bind<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<tgui::Callback>
&>, , void>' requested here
__first_(_VSTD::forward<_Args1>(get<_I1>(__first_args))...)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2421:15: note:
in instantiation of function template specialization
'std::__1::__libcpp_compressed_pair_imp<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<tgui::Callback>
&>, std::__1::allocator<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<tgui::Callback>
&> >,
2>::__libcpp_compressed_pair_imp<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<tgui::Callback>
&> &&, , 0, >' requested here
: base(__pc, _VSTD::move(__first_args), _VSTD::move(__second_args),
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/functional:992:11: note:
in instantiation of function template specialization
'std::__1::__compressed_pair<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<tgui::Callback>
&>, std::__1::allocator<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<tgui::Callback>
&> > >::__compressed_pair<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<tgui::Callback>
&> &&, >' requested here
: __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)),
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/functional:1277:26: note:
in instantiation of member function
'std::__1::__function::__func<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<tgui::Callback>
&>, std::__1::allocator<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<tgui::Callback>
&> >, void ()>::__func' requested here
::new (__f_) _FF(_VSTD::move(__f));
^
/Users/tristansterin/Downloads/TGUI-0.6-RC - GCC 4.7 TDM (SJLJ) - 32 bits/src/TGUI/Callback.cpp:44:21: note:
in instantiation of function template specialization
'std::__1::function<void
()>::function<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<tgui::Callback>
&> >' requested here
mapCallback(std::bind(func, a), trigger);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_base:365:31: note:
candidate constructor not viable: requires single argument '__f', but no
arguments were provided
_LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) _NOEXCEPT : _...
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_base:367:14: note:
candidate constructor not viable: requires 1 argument, but 0 were provided
private: reference_wrapper(type&&); public: // = delete; // do not b...
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_base:354:24: note:
candidate constructor (the implicit copy constructor) not viable: requires
1 argument, but 0 were provided
class _LIBCPP_TYPE_VIS reference_wrapper
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_base:354:24: note:
candidate constructor (the implicit move constructor) not viable: requires
1 argument, but 0 were provided
1 error generated.
mapCallback(std::bind(func, std::ref(m_Callback)), trigger);
mapCallback(std::bind(func, m_Callback), trigger);