Vultraz

Untitled

Mar 1st, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. // Initializes tabs for the various pages. This should be done before
  2. // setting up the member callbacks.
  3. initialize_tabs(window);
  4.  
  5. // Initializes initial values and sets up callbacks. This needs to be
  6. // done before selecting the initial page, otherwise widgets from other
  7. // pages cannot be found afterwards.
  8. initialize_members(window);
  9.  
  10. assert(selector.get_item_count() == pager.get_layer_count());
  11.  
  12. // Selects initial tab for each page and the initially displayed main
  13. // page. This should be done last after all initialization
  14. for(int i = 0; pager.get_layer_count(); ++i) {
  15. tstacked_widget* tab_pager = find_widget<tstacked_widget>(pager.get_page_grid(i), "tab_pager", false, false);
  16.  
  17. if(tab_pager) {
  18. tab_pager->select_layer(i == index_.second ? index_.second : 0);
  19. }
  20. }
  21.  
  22. selector.select_row(index_.first);
  23. pager.select_layer(index_.first);
Advertisement
Add Comment
Please, Sign In to add comment