Vultraz

Untitled

Jan 26th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. template <typename T, typename W>
  2. void tpreferences::bind_status_label(
  3. W& parent
  4. , const std::string& label_id
  5. , T& window
  6. , T& window_second)
  7. {
  8. tcontrol& label = find_widget<tcontrol>(&window_second, label_id, false);
  9.  
  10. label.set_label(lexical_cast<std::string>(parent.get_value()));
  11.  
  12. parent.set_callback_state_change(boost::bind(
  13. &tpreferences::status_label_callback
  14. , this, boost::ref(parent), boost::ref(label)));
  15. }
  16.  
  17. template <typename T>
  18. void tpreferences::bind_status_label(
  19. tslider& parent
  20. , const std::string& label_id
  21. , T& window
  22. , T& window_second)
  23. {
  24. tcontrol& label = find_widget<tcontrol>(&window_second, label_id, false);
  25.  
  26. label.set_label(lexical_cast<std::string>(parent.get_value()));
  27.  
  28. connect_signal_notify_modified(parent, boost::bind(
  29. &tpreferences::status_label_callback
  30. , this, boost::ref(parent), boost::ref(label)));
  31. }
Advertisement
Add Comment
Please, Sign In to add comment