GTK docking interfaces and more

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

Use GtkPaned

roundabout,
created on Tuesday, 4 March 2025, 14:43:51 (1741099431), received on Tuesday, 4 March 2025, 14:43:53 (1741099433)
Author identity: vlad <vlad.muntoiu@gmail.com>

50bc1a215f45dd3b067553129762a5d4b4d3ad40

panthera-www.cc

@@ -42,11 +42,15 @@ protected:

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    auto outer_grid = Gtk::make_managed<Gtk::Grid>();
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    outer_grid->attach(*switcher_1, 0, 1, 1, 1);
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    outer_grid->attach(*switcher_2, 1, 2, 1, 1);
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                auto inner_grid = Gtk::make_managed<Gtk::Grid>();
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                inner_grid->attach(*dock_stack_1, 0, 0, 1, 1);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                inner_grid->attach(*dock_stack_2, 1, 0, 1, 1);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                outer_grid->attach(*inner_grid, 1, 1, 1, 1);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                inner_grid->set_expand(true);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                auto outer_paned = Gtk::make_managed<Gtk::Paned>(Gtk::Orientation::HORIZONTAL);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                outer_paned->set_start_child(*dock_stack_1);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                auto inner_paned = Gtk::make_managed<Gtk::Paned>(Gtk::Orientation::VERTICAL);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                auto content = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::VERTICAL, 0);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                content->append(*Gtk::make_managed<Gtk::Label>("Main content"));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                inner_paned->set_start_child(*content);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                inner_paned->set_end_child(*dock_stack_2);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                outer_paned->set_end_child(*inner_paned);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                outer_grid->attach(*outer_paned, 1, 1, 1, 1);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    window->set_child(*outer_grid);
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                }