Thanks, I'll toss that into a project and start messing with it!
But I guess one of the things I wanted to get out of this was figure out
what I was doing wrong. On the surface, my code looks like it should work,
yet I seem to be doing something wrong with it. Shouldn't I be able to
create a bunch of components and then arrange them? I feel like I don't
understand the rule set needed to layout complex stuff, like I am missing
some key understanding.
That make sense?
On Wed, Jan 14, 2015 at 7:12 PM, Rabbi David Botton <[email protected]>
wrote:
> Here is a three pain layout with a Tab and Card View for the Fill.
>
> David Botton
>
>
> with Gnoga.Gui.Base;
> with Gnoga.Gui.View;
> with Gnoga.Gui.View.Docker;
> with Gnoga.Gui.Element.Common;
> with Gnoga.Gui.View.Card;
>
> package Dapp.View is
>
> type Button_Array is array (1 .. 8) of
> Gnoga.Gui.Element.Common.Button_Type;
>
> type Default_View_Type is new Gnoga.Gui.View.Docker.Docker_View_Type
> with
> record
> Left_Panel : aliased Gnoga.Gui.View.View_Type;
> Fill_Panel : aliased Gnoga.Gui.View.Docker.Docker_View_Type;
> Status_Panel : aliased Gnoga.Gui.View.View_Type;
>
> Tabs : aliased Gnoga.Gui.View.Card.Tab_Type;
> Cards : aliased Gnoga.Gui.View.Card.Card_View_Type;
>
> Buttons : Button_Array;
> end record;
>
> type Default_View_Access is access all Default_View_Type;
> type Pointer_to_Default_View_Class is access all
> Default_View_Type'Class;
>
> overriding
> procedure Create
> (View : in out Default_View_Type;
> Parent : in out Gnoga.Gui.Base.Base_Type'Class;
> Attach : in Boolean := True;
> ID : in String := "");
>
> end Dapp.View;
>
> package body Dapp.View is
>
> ------------
> -- Create --
> ------------
>
> overriding
> procedure Create
> (View : in out Default_View_Type;
> Parent : in out Gnoga.Gui.Base.Base_Type'Class;
> Attach : in Boolean := True;
> ID : in String := "")
> is
> A_Card : Gnoga.Gui.View.View_Access;
> begin
> Gnoga.Gui.View.View_Type (View).Create (Parent, Attach, ID);
>
> -- Create panels for Main View
> View.Left_Panel.Create (View);
> View.Left_Panel.Width (150);
> View.Left_Panel.Border (Width => "1px");
>
> View.Fill_Panel.Create (View);
> View.Fill_Panel.Border (Width => "1px");
>
> View.Status_Panel.Create (View);
> View.Status_Panel.Height (50);
> View.Status_Panel.Background_Color ("lightblue");
>
> View.Fill_Dock (View.Fill_Panel'Access);
> View.Left_Dock (View.Left_Panel'Access);
> View.Bottom_Dock (View.Status_Panel'Access);
>
> -- Create panels for fill panel
> View.Cards.Create (View.Fill_Panel);
> View.Tabs.Create (View.Fill_Panel, View.Cards);
>
> A_Card := new Gnoga.Gui.View.View_Type;
> A_Card.Dynamic;
> A_Card.Create (View.Cards);
> A_Card.Padding ("5px","5px","5px","5px");
>
> View.Cards.Add_Card
> (Name => "tab 1",
> Card => A_Card,
> Show => True);
> View.Tabs.Add_Tab (Card => "tab 1",
> Label => "Tab 1",
> Selected => True);
>
> A_Card := new Gnoga.Gui.View.View_Type;
> A_Card.Dynamic;
> A_Card.Create (View.Cards);
> A_Card.Padding ("5px","5px","5px","5px");
>
> View.Cards.Add_Card
> (Name => "tab 2",
> Card => A_Card,
> Show => False);
> View.Tabs.Add_Tab (Card => "tab 2",
> Label => "Tab 2",
> Selected => False);
>
> View.Fill_Panel.Top_Dock (View.Tabs'Access);
> view.Fill_Panel.Fill_Dock (View.Cards'Access);
>
> for i in View.Buttons'Range loop
> View.Buttons (i).Create (View.Cards.Card ("tab 1").all,
> "Button" & i'img);
> View.Cards.Card ("tab 1").New_Line;
> end loop;
>
> View.Cards.Card ("tab 2").Put_Line ("Hello World");
> end Create;
>
> end Dapp.View;
>
>
> On Fri, Jan 9, 2015 at 1:11 AM, Jeremiah Breeden <
> [email protected]> wrote:
>
>> I've been trying different layouts using Gnoga, but have had trouble
>> actually getting things to display they way I want. Is there a resource
>> that goes through exactly the order of operations to get each element to
>> display the way you want? For example, I want to lay out a page with 3
>> rectangular areas. One will be vertical with some buttons and other
>> elements. One will be the main area and included a Tabbed view. Another
>> will be the bottom "status" area. I want everything to pack itself up and
>> left so that even if the user stretches the browser, the elements don't
>> stretch or move. Below is some ascii art of what I am looking for:
>>
>> |------|-------------------------------------------------|
>> | [] |_/====\/====\____________________________________|
>> | | [] |
>> | | [] |
>> | | [] |
>> | | [] |
>> | | [] |
>> | | [] |
>> | | [] |
>> |------|-------------------------------------------------|
>> | [] |
>> |--------------------------------------------------------|
>>
>>
>>
>
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> Gnoga-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>
>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Gnoga-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnoga-list