Ejemplo n.º 1
0
        public Sidebar() : base()
        {
            ContextSwitchStrategy = new MRUSidebarContextSwitchStrategy(this);
            ContextChanged       += HandleContextChanged;

            button_box = new HBox();
            PackStart(button_box, false, false, 0);

            notebook            = new Notebook();
            notebook.ShowTabs   = false;
            notebook.ShowBorder = false;
            PackStart(notebook, true, true, 0);

            Button button = new Button();

            button.Image    = new Image("gtk-close", IconSize.Button);
            button.Relief   = ReliefStyle.None;
            button.Pressed += HandleCloseButtonPressed;
            button_box.PackEnd(button, false, true, 0);

            choose_button        = new MenuButton();
            choose_button.Relief = ReliefStyle.None;

            eventBox = new EventBox();
            eventBox.Add(choose_button);

            button_box.PackStart(eventBox, true, true, 0);

            choose_menu        = new Menu();
            choose_button.Menu = choose_menu;

            menu_list  = new List <string> ();
            image_list = new List <string> ();
            pages      = new List <SidebarPage> ();
        }
Ejemplo n.º 2
0
		public Sidebar () : base ()
		{
			ContextSwitchStrategy = new MRUSidebarContextSwitchStrategy (this);
			ContextChanged += HandleContextChanged;

			button_box = new HBox ();
			PackStart (button_box, false, false, 0);
			
			notebook = new Notebook ();
			notebook.ShowTabs = false;
			notebook.ShowBorder = false;
			PackStart (notebook, true, true, 0);
			
			Button button = new Button ();
			button.Image = new Image ("gtk-close", IconSize.Button);
			button.Relief = ReliefStyle.None;
			button.Pressed += HandleCloseButtonPressed;
			button_box.PackEnd (button, false, true, 0);
			
			choose_button = new MenuButton ();
			choose_button.Relief = ReliefStyle.None;
			
			eventBox = new EventBox ();
			eventBox.Add (choose_button);
			
			button_box.PackStart (eventBox, true, true, 0);
			
			choose_menu = new Menu ();
			choose_button.Menu = choose_menu;

			menu_list = new List<string> ();
			image_list = new List<string> ();
			pages = new List<SidebarPage> ();
		}