------------------------------------------------------------------------------ -- -- -- XVIEW ADA LIBRARY COMPONENTS -- -- -- -- XVIEW_PANEL_PACKAGE -- -- -- -- B o d y -- -- -- -- Copyright (c) 1995 Andreas Almroth, All Rights Reserved -- -- -- -- The XVIEW ADA library is free software; you can redistribute it and/or -- -- modify it under terms of the GNU Library General Public License as -- -- published by the Free Software Foundation; either version 2, or (at your -- -- option) any later version. The XVIEW ADA library is distributed in the -- -- hope that it will be useful, but WITHOUT ANY WARRANTY; without even the -- -- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- -- See the GNU Library General Public License for more details. -- -- You should have received a copy of the GNU Library General Public -- -- License along with the XVIEW ADA library; see the file COPYING.LIB. If -- -- not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, -- -- MA 02139, USA. -- -- -- ------------------------------------------------------------------------------ -- Lots of bindings to XView C functions needs the Interfaces.C package. with Interfaces.C,Interfaces.C.Strings; package body Xv_Panel_Package is XV_SHOW : constant := 1079052545; XV_WIDTH : constant := 1246234689; XV_HEIGHT : constant := 1246300289; XV_X : constant := 1246103617; XV_Y : constant := 1246169217; PANEL_LABEL_STRING : constant := 1430915425; PANEL_NOTIFY_PROC : constant := 1436158561; PANEL_VALUE : constant := 1437861889; PANEL_MIN_VALUE : constant := 1435502593; PANEL_MAX_VALUE : constant := 1435109377; PANEL_VALUE_DISPLAY_LENGTH : constant := 1437992961; PANEL_BORDER : constant := 1440352513; PANEL_ITEM_MENU : constant := 1429998081; PANEL_CHOICE_STRING : constant := 1427374082; PANEL_LAYOUT : constant := 1431439649; PANEL_VERTICAL : constant := 9; PANEL_HORIZONTAL : constant := 10; PANEL_CHOOSE_ONE : constant := 1428293889; PANEL_FEEDBACK : constant := 1429342497; PANEL_MARKED : constant := 8; PANEL_LIST_STRING : constant := 1433534466; PANEL_LIST_WIDTH : constant := 1434060801; PANEL_LIST_DISPLAY_ROWS : constant := 1432225793; PANEL_LIST_TITLE : constant := 1428097377; PANEL_LIST_FONT : constant := 1432354914; PANEL_LIST_SELECT : constant := 1433405442; PANEL_LIST_FIRST_SELECTED : constant := 1432291872; PANEL_LIST_MODE : constant := 1433864481; PANEL_LIST_READ : constant := 0; PANEL_LIST_EDIT : constant := 1; PANEL_READ_ONLY : constant := 1436682497; PANEL_VALUE_FONT : constant := 1438124449; PANEL_LABEL_FONT : constant := 1430653345; PANEL_LIST_DELETE : constant := 1432094721; PANEL_LIST_INSERT : constant := 1433012225; PANEL_LIST_NROWS : constant := 1433143297; PANEL_LABEL_IMAGE : constant := 1430784385; PANEL_TICKS : constant := 1437665281; PANEL_SLIDER_WIDTH : constant := 1437599809; PANEL_GAUGE_WIDTH : constant := 1429538817; PANEL_DISPLAY_ROWS : constant := 1432225793; PANEL_VALUE_STORED_LENGTH : constant := 1438255105; PANEL_VALUE_DISPLAY_WIDTH : constant := 1438058497; PANEL_LINE_BREAK_ACTION : constant := 1431570721; PANEL_WRAP_AT_CHAR : constant := 22; PANEL_WRAP_AT_WORD : constant := 23; ----------------------------------------------------------------------------- function xv_set (owner : Xv_opaque; cmd : Integer; data : Integer; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; data : Integer; data2 : Integer; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; data : Integer; data2 : Font; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; data : Font; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; data : Boolean; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; data : Xv_opaque; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; data : Interfaces.C.char_array; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; data1: Integer; data : Interfaces.C.char_array; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; data1: Integer; cmd2 : Integer; data3: Integer; data4 : Interfaces.C.char_array; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; func : callback_button_ptr; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; func : callback_text_ptr; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; func : Callback_Multi_text_ptr; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; func : callback_numeric_ptr; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; func : callback_choice_ptr; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; func : callback_slider_ptr; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); function xv_set (owner : Xv_opaque; cmd : Integer; func : callback_list_ptr; term : Integer) return Xv_object; pragma import (C,xv_set,"xv_set"); ----------------------------------------------------------------------------- function xv_get (owner : Xv_opaque; cmd : Integer; term : Integer) return Integer; pragma import (C,xv_get,"xv_get"); function xv_get (owner : Xv_opaque; cmd : Integer; Data : Integer; term : Integer) return Interfaces.C.Char_array; pragma import (C,xv_get,"xv_get"); function xv_get_string (owner : Xv_opaque; cmd : Integer; term : Integer) return Interfaces.C.Strings.chars_ptr; pragma import (C,xv_get_string,"xv_get"); procedure xv_destroy_safe (object : Xv_Opaque); pragma import (C,xv_destroy_safe,"xv_destroy_safe"); ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- xv_panel ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- procedure Initialize (V : in out Xv_Panel) is -- Declare C binding for xv_create function xv_create (owner : Frame; pkg : Xv_pkg_ptr; cmd : Integer; data: Boolean; term : Integer) return Panel; pragma import (C,xv_create,"xv_create"); function xv_create (owner : Frame; pkg : Xv_pkg_ptr; term : Integer) return Panel; pragma import (C,xv_create,"xv_create"); -- Initialize panel_base pointer xv_panel_pkg : Xv_pkg_ptr; pragma import (C,xv_panel_pkg,"my_xv_panel_pkg"); begin if V.Border = True then V.base := xv_create(V.parent,xv_panel_pkg,PANEL_BORDER,V.Border,0); else V.base := xv_create(V.parent,xv_panel_pkg,0); end if; end Initialize; ----------------------------------------------------------------------------- procedure Finalize (V : in out Xv_Panel) is begin Xv_Destroy_Safe(Xv_Opaque(V.Base)); end Finalize; ----------------------------------------------------------------------------- procedure Set_Pos (V : in xv_panel; X,Y : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),XV_X,x,0); Xv_rc := xv_set(Xv_opaque(V.base),XV_Y,y,0); end Set_Pos; ----------------------------------------------------------------------------- procedure Set_Size (V : in Xv_Panel; W,H : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),XV_WIDTH,w,0); Xv_rc := xv_set(Xv_opaque(V.base),XV_HEIGHT,h,0); end Set_Size; ----------------------------------------------------------------------------- function Get_Pos (V : in xv_panel) return IntegerPair is rc : IntegerPair; begin rc.X := xv_get(Xv_opaque(V.base),XV_X,0); rc.Y := xv_get(Xv_opaque(V.base),XV_Y,0); return rc; end Get_Pos; ----------------------------------------------------------------------------- function Get_Size (V : in xv_panel) return IntegerPair is rc : IntegerPair; begin rc.X := xv_get(Xv_opaque(V.base),XV_WIDTH,0); rc.Y := xv_get(Xv_opaque(V.base),XV_HEIGHT,0); return rc; end Get_Size; ----------------------------------------------------------------------------- function Get_Panel (V : in xv_panel) return Panel is begin return V.base; end Get_Panel; ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- xv_panel_button ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- procedure Initialize (V : in out Xv_Panel_Button) is -- Declare C binding for xv_create function xv_create (owner : Panel; pkg : Xv_pkg_ptr; term : Integer) return Panel_button_item; pragma import (C,xv_create,"xv_create"); -- Initialize panel_base pointer xv_panel_button_pkg : Xv_pkg_ptr; pragma import (C,xv_panel_button_pkg,"my_xv_panel_button_pkg"); begin V.Base := xv_create(V.Parent,xv_panel_button_pkg,0); if V.base = 0 then raise NO_OBJECT_CREATED; end if; end Initialize; ----------------------------------------------------------------------------- procedure Set_Callback(V : in Xv_Panel_Button; Func : callback_button_ptr) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_NOTIFY_PROC,func,0); end Set_Callback; ----------------------------------------------------------------------------- procedure Set_Menu(V : in Xv_Panel_Button; Menu : Xv_opaque) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_ITEM_MENU,menu,0); end Set_Menu; ----------------------------------------------------------------------------- procedure Set_Pos (V : in Xv_Panel_Button; X,Y : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),XV_X,x,0); Xv_rc := xv_set(Xv_opaque(V.base),XV_Y,y,0); end Set_Pos; ----------------------------------------------------------------------------- procedure Set_Text (V : in Xv_Panel_Button; Txt : String) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_STRING, Interfaces.C.to_C(txt,True),0); end Set_Text; ----------------------------------------------------------------------------- procedure Set_Image (V : in Xv_Panel_Button; Image : Server_image) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_IMAGE,Xv_Opaque(Image),0); end Set_Image; ----------------------------------------------------------------------------- procedure Finalize (V : in out Xv_Panel_Button) is begin Xv_Destroy_Safe(Xv_Opaque(V.Base)); end Finalize; ----------------------------------------------------------------------------- function Get_Button (V : in Xv_Panel_Button) return Panel_Button_item is begin return V.base; end Get_Button; ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- panel_text ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- procedure Initialize (V : in out Xv_Panel_Text) is -- Declare C binding for xv_create function xv_create (owner : Panel; pkg : Xv_pkg_ptr; term : Integer) return Panel_text_item; pragma import (C,xv_create,"xv_create"); -- Initialize panel_base pointer xv_panel_text_pkg : Xv_pkg_ptr; pragma import (C,xv_panel_text_pkg,"my_xv_panel_text_pkg"); begin V.base := xv_create(V.parent,xv_panel_text_pkg,0); if V.base = 0 then raise NO_OBJECT_CREATED; end if; end Initialize; ----------------------------------------------------------------------------- procedure Set_Callback(V : in Xv_Panel_Text; Func : Callback_Text_Ptr) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_NOTIFY_PROC, Callback_Text_Ptr(Func),0); end Set_Callback; ----------------------------------------------------------------------------- procedure Set_Pos (V : in Xv_Panel_Text; X,Y : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),XV_X,x,0); Xv_rc := xv_set(Xv_opaque(V.base),XV_Y,y,0); end Set_Pos; ----------------------------------------------------------------------------- procedure Set_Text (V : in Xv_Panel_Text; Txt : String) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_STRING, Interfaces.C.to_C(txt,True),0); end Set_Text; ----------------------------------------------------------------------------- procedure Set_Disp_Width (V : in Xv_Panel_Text; Txt : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE_DISPLAY_LENGTH,txt,0); end Set_Disp_Width; ----------------------------------------------------------------------------- procedure Set_Value (V : in Xv_Panel_Text; Txt : String) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE,Interfaces.C.to_C(txt,True),0); end Set_Value; ----------------------------------------------------------------------------- function Get_Value (V : in Xv_Panel_Text) return String is begin return Interfaces.C.Strings.Value(xv_get_string(Xv_opaque(V.base), PANEL_VALUE,0)); end Get_Value; ----------------------------------------------------------------------------- procedure Set_Label_Font (V : in Xv_Panel_Text; Fnt : Font) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_FONT,fnt,0); end Set_Label_Font; ----------------------------------------------------------------------------- procedure Set_Entry_Font (V : in Xv_Panel_Text; Fnt : Font) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE_FONT,fnt,0); end Set_Entry_Font; ----------------------------------------------------------------------------- procedure Finalize (V : in out Xv_Panel_Text) is begin Xv_Destroy_Safe(Xv_Opaque(V.Base)); end Finalize; ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- panel_multi_text ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- procedure Initialize (V : in out Xv_Panel_Multi_Text) is -- Declare C binding for xv_create function xv_create (owner : Panel; pkg : Xv_pkg_ptr; term : Integer) return Panel_Multi_Text_item; pragma import (C,xv_create,"xv_create"); -- Initialize panel_base pointer xv_panel_multi_text_pkg : Xv_pkg_ptr; pragma import (C,xv_panel_multi_text_pkg,"my_xv_panel_multi_text_pkg"); begin V.base := xv_create(V.parent,xv_panel_Multi_Text_pkg,0); if V.base = 0 then raise NO_OBJECT_CREATED; end if; end Initialize; ----------------------------------------------------------------------------- procedure Set_Callback(V : in Xv_Panel_Multi_Text; Func : Callback_Multi_Text_Ptr) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_NOTIFY_PROC, Callback_Multi_Text_Ptr(Func),0); end Set_Callback; ----------------------------------------------------------------------------- procedure Set_Pos (V : in Xv_Panel_Multi_Text; X,Y : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),XV_X,x,0); Xv_rc := xv_set(Xv_opaque(V.base),XV_Y,y,0); end Set_Pos; ----------------------------------------------------------------------------- procedure Set_Text (V : in Xv_Panel_Multi_Text; Txt : String) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_STRING, Interfaces.C.to_C(txt,True),0); end Set_Text; ----------------------------------------------------------------------------- procedure Set_Disp_Width (V : in Xv_Panel_Multi_Text; Txt : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE_DISPLAY_LENGTH,txt,0); end Set_Disp_Width; ----------------------------------------------------------------------------- procedure Set_Value (V : in Xv_Panel_Multi_Text; Txt : String) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE, Interfaces.C.to_C(txt,True),0); end Set_Value; ----------------------------------------------------------------------------- function Get_Value (V : in Xv_Panel_Multi_Text) return String is begin return Interfaces.C.Strings.Value(xv_get_string(Xv_opaque(V.base), PANEL_VALUE,0)); end Get_Value; ----------------------------------------------------------------------------- procedure Set_Label_Font (V : in Xv_Panel_Multi_Text; Fnt : Font) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_FONT,fnt,0); end Set_Label_Font; ----------------------------------------------------------------------------- procedure Set_Entry_Font (V : in Xv_Panel_Multi_Text; Fnt : Font) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE_FONT,fnt,0); end Set_Entry_Font; ----------------------------------------------------------------------------- procedure Set_Display_Length (V : in Xv_Panel_Multi_Text; W : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE_DISPLAY_LENGTH,w,0); end Set_Display_Length; ----------------------------------------------------------------------------- procedure Set_Stored_Length (V : in Xv_Panel_Multi_Text; W : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE_STORED_LENGTH,w,0); end Set_Stored_Length; ----------------------------------------------------------------------------- procedure Set_Display_Width (V : in Xv_Panel_Multi_Text; W : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE_DISPLAY_WIDTH,w,0); end Set_Display_Width; ----------------------------------------------------------------------------- procedure Set_Display_Rows (V : in Xv_Panel_Multi_Text; W : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_DISPLAY_ROWS,w,0); end Set_Display_Rows; ----------------------------------------------------------------------------- procedure Set_Wrap_On_Char (V : in Xv_Panel_Multi_Text) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LINE_BREAK_ACTION, Integer(PANEL_WRAP_AT_CHAR),0); end Set_Wrap_On_Char; ----------------------------------------------------------------------------- procedure Set_Wrap_On_Word (V : in Xv_Panel_Multi_Text) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LINE_BREAK_ACTION, Integer(PANEL_WRAP_AT_WORD),0); end Set_Wrap_On_Word; ----------------------------------------------------------------------------- procedure Finalize (V : in out Xv_Panel_Multi_Text) is begin Xv_Destroy_Safe(Xv_Opaque(V.Base)); end Finalize; ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- panel_numeric ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- procedure Initialize (V : in out Xv_Panel_Numeric) is -- Declare C binding for xv_create function xv_create (owner : Panel; pkg : Xv_pkg_ptr; term : Integer) return Panel_numeric_text_item; pragma import (C,xv_create,"xv_create"); -- Initialize panel_base pointer xv_panel_num_text_pkg : Xv_pkg_ptr; pragma import (C,xv_panel_num_text_pkg,"my_xv_panel_num_text_pkg"); begin V.base := xv_create(V.parent, xv_panel_num_text_pkg,0); if V.base = 0 then raise NO_OBJECT_CREATED; end if; end Initialize; ----------------------------------------------------------------------------- procedure Set_Callback(V : in Xv_Panel_Numeric; Func : Callback_Numeric_Ptr) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_NOTIFY_PROC, Callback_Numeric_Ptr(Func),0); end Set_Callback; ----------------------------------------------------------------------------- procedure Set_Pos (V : in Xv_Panel_Numeric; X,Y : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),XV_X,x,0); Xv_rc := xv_set(Xv_opaque(V.base),XV_Y,y,0); end Set_Pos; ----------------------------------------------------------------------------- procedure Set_Text (V : in Xv_Panel_Numeric; Txt : String) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_STRING, Interfaces.C.to_C(txt,True),0); end Set_Text; ----------------------------------------------------------------------------- procedure Set_Value (V : in Xv_Panel_Numeric; Txt : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE,txt,0); end Set_Value; ----------------------------------------------------------------------------- procedure Set_Min_Value (V : in Xv_Panel_Numeric; Txt : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_MIN_VALUE,txt,0); end Set_Min_Value; ----------------------------------------------------------------------------- procedure Set_Max_Value (V : in Xv_Panel_Numeric; Txt : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_MAX_VALUE,txt,0); end Set_Max_Value; ----------------------------------------------------------------------------- procedure Set_Disp_Width (V : in Xv_Panel_Numeric; Txt : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE_DISPLAY_LENGTH,txt,0); end Set_Disp_Width; ----------------------------------------------------------------------------- function Get_Value (V : in Xv_Panel_Numeric) return Integer is begin return xv_get(Xv_opaque(V.base),PANEL_VALUE,0); end Get_Value; ----------------------------------------------------------------------------- procedure Set_Label_Font (V : in Xv_Panel_Numeric; Fnt : Font) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_FONT,fnt,0); end Set_Label_Font; ----------------------------------------------------------------------------- procedure Set_Entry_Font (V : in Xv_Panel_Numeric; Fnt : Font) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE_FONT,fnt,0); end Set_Entry_Font; ----------------------------------------------------------------------------- procedure Finalize (V : in out Xv_Panel_Numeric) is begin Xv_Destroy_Safe(Xv_Opaque(V.Base)); end Finalize; ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- panel_choice ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- procedure Initialize (V : in out Xv_Panel_Choice) is -- Declare C binding for xv_create function xv_create (owner : Panel; pkg : Xv_pkg_ptr; term : Integer) return Panel_choice_item; pragma import (C,xv_create,"xv_create"); -- Initialize panel_base pointer xv_panel_choice_pkg : Xv_pkg_ptr; pragma import (C,xv_panel_choice_pkg,"my_xv_panel_choice_pkg"); begin V.Base := xv_create(V.Parent, xv_panel_choice_pkg,0); if V.Base = 0 then raise NO_OBJECT_CREATED; end if; end Initialize; ----------------------------------------------------------------------------- procedure Set_Choices (V: in Xv_Panel_Choice; Choices : Strings) is Xv_rc : Xv_object; begin for I in Choices'Range loop Xv_rc := xv_set(Xv_opaque(V.Base),PANEL_CHOICE_STRING,i - 1, Interfaces.C.To_C(Choices(I).all,True),0); end loop; end Set_Choices; ----------------------------------------------------------------------------- procedure Set_Callback(V : in Xv_Panel_Choice; Func : Callback_Choice_Ptr) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_NOTIFY_PROC,func,0); end Set_Callback; ----------------------------------------------------------------------------- procedure Set_Pos (V : in Xv_Panel_Choice; X,Y : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),XV_X,x,0); Xv_rc := xv_set(Xv_opaque(V.base),XV_Y,y,0); end Set_Pos; ----------------------------------------------------------------------------- procedure Set_Text (V : in Xv_Panel_Choice; Txt : String) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_STRING, Interfaces.C.to_C(txt,True),0); end Set_Text; ----------------------------------------------------------------------------- procedure Set_Value (V : in Xv_Panel_Choice; Txt : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE,txt,0); end Set_Value; ----------------------------------------------------------------------------- procedure Set_Layout (V : in Xv_Panel_Choice; Data : Boolean) is Xv_rc : Xv_object; begin if data = True then Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LAYOUT, Integer(PANEL_HORIZONTAL),0); else Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LAYOUT, Integer(PANEL_VERTICAL),0); end if; end Set_Layout; ----------------------------------------------------------------------------- function Get_Value (V : in Xv_Panel_Choice) return Integer is begin return xv_get(Xv_opaque(V.base),PANEL_VALUE,0); end Get_Value; ----------------------------------------------------------------------------- procedure Finalize (V : in out Xv_Panel_Choice) is begin Xv_Destroy_Safe(Xv_Opaque(V.Base)); end Finalize; ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- panel_toggle ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- procedure Initialize (V : in out Xv_Panel_Toggle) is -- Declare C binding for xv_create function xv_create (owner : Panel; pkg : Xv_pkg_ptr; -- cmd : Integer; data : Integer; term : Integer) return Panel_toggle_item; pragma import (C,xv_create,"xv_create"); -- Initialize panel_base pointer xv_panel_choice_pkg : Xv_pkg_ptr; pragma import (C,xv_panel_choice_pkg,"my_xv_panel_choice_pkg"); Xv_rc : Xv_object; begin V.base := xv_create(V.Parent,xv_panel_choice_pkg,0); if V.base = 0 then raise NO_OBJECT_CREATED; end if; Xv_rc := xv_set(Xv_opaque(V.base),PANEL_CHOOSE_ONE,Integer(0),0); end Initialize; ----------------------------------------------------------------------------- procedure Set_Choices (V: in Xv_Panel_Toggle; Choices : Strings) is Xv_rc : Xv_object; begin for I in Choices'Range loop Xv_rc := xv_set(Xv_opaque(V.Base),PANEL_CHOICE_STRING,i - 1, Interfaces.C.To_C(Choices(I).all,True),0); end loop; end Set_Choices; ----------------------------------------------------------------------------- procedure Set_Callback (V : in xv_panel_toggle; func : callback_choice_ptr) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_NOTIFY_PROC,func,0); end Set_Callback; ----------------------------------------------------------------------------- procedure Set_Pos (V : in Xv_Panel_Toggle; X,Y : Integer) is Xv_rc : Xv_Object; begin Xv_rc := xv_set(Xv_opaque(V.base),XV_X,X,0); Xv_rc := xv_set(Xv_opaque(V.base),XV_Y,Y,0); end Set_Pos; ----------------------------------------------------------------------------- procedure Set_Text (V : in Xv_Panel_Toggle; Txt : String) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_STRING, Interfaces.C.to_C(txt,True),0); end Set_Text; ----------------------------------------------------------------------------- procedure Set_Value (V : in Xv_Panel_Toggle; Txt : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE,txt,0); end Set_Value; ----------------------------------------------------------------------------- procedure Set_Layout (V : in Xv_Panel_Toggle; Data : Boolean) is Xv_rc : Xv_object; begin if data = True then Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LAYOUT, Integer(PANEL_HORIZONTAL),0); else Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LAYOUT, Integer(PANEL_VERTICAL),0); end if; end Set_Layout; ----------------------------------------------------------------------------- function Get_Value (V : in Xv_Panel_Toggle) return Integer is begin return xv_get(Xv_opaque(V.base),PANEL_VALUE,0); end Get_Value; ----------------------------------------------------------------------------- procedure Finalize (V : in out Xv_Panel_Toggle) is begin Xv_Destroy_Safe(Xv_Opaque(V.Base)); end Finalize; ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- panel_checkbox ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- procedure Initialize (V : in out Xv_Panel_checkbox) is -- Declare C binding for xv_create function xv_create (owner : Panel; pkg : Xv_pkg_ptr; -- cmd : Integer; data : Integer; term : Integer) return Panel_checkbox_item; pragma import (C,xv_create,"xv_create"); -- Initialize panel_base pointer xv_panel_choice_pkg : Xv_pkg_ptr; pragma import (C,xv_panel_choice_pkg,"my_xv_panel_choice_pkg"); Xv_rc : Xv_object; begin V.base := xv_create(V.parent,xv_panel_choice_pkg,0); if V.base = 0 then raise NO_OBJECT_CREATED; end if; Xv_rc := xv_set(Xv_opaque(V.base),PANEL_CHOOSE_ONE,Integer(0),0); Xv_rc := xv_set(Xv_opaque(V.base),PANEL_FEEDBACK,Integer(PANEL_MARKED),0); end Initialize; ----------------------------------------------------------------------------- procedure Set_Choices (V: in Xv_Panel_Checkbox; Choices : Strings) is Xv_rc : Xv_object; begin for I in Choices'Range loop Xv_rc := xv_set(Xv_opaque(V.Base),PANEL_CHOICE_STRING,i - 1, Interfaces.C.To_C(Choices(I).all,True),0); end loop; end Set_Choices; ----------------------------------------------------------------------------- procedure Set_Callback(V : in xv_panel_checkbox; func : callback_choice_ptr) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_NOTIFY_PROC,func,0); end Set_Callback; ----------------------------------------------------------------------------- procedure Set_Pos (V : in Xv_Panel_Checkbox; X,Y : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),XV_X,x,0); Xv_rc := xv_set(Xv_opaque(V.base),XV_Y,y,0); end Set_Pos; ----------------------------------------------------------------------------- procedure Set_Text (V : in Xv_Panel_Checkbox; Txt : String) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_STRING, Interfaces.C.to_C(txt,True),0); end Set_Text; ----------------------------------------------------------------------------- procedure Set_Value (V : in Xv_Panel_Checkbox; Txt : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_VALUE,txt,0); end Set_Value; ----------------------------------------------------------------------------- procedure Set_Layout (V : in Xv_Panel_Checkbox; Data : Boolean) is Xv_rc : Xv_object; begin if data = True then Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LAYOUT, Integer(PANEL_HORIZONTAL),0); else Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LAYOUT, Integer(PANEL_VERTICAL),0); end if; end Set_Layout; ----------------------------------------------------------------------------- function Get_Value (V : in Xv_Panel_Checkbox) return Integer is begin return xv_get(Xv_opaque(V.base),PANEL_VALUE,0); end Get_Value; ----------------------------------------------------------------------------- procedure Finalize (V : in out Xv_Panel_Checkbox) is begin Xv_Destroy_Safe(Xv_Opaque(V.Base)); end Finalize; ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- panel_list ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- procedure Initialize (V : in out Xv_Panel_list) is -- Declare C binding for xv_create function xv_create (owner : Panel; pkg : Xv_pkg_ptr; cmd : Integer; data : Integer; term : Integer) return Panel_list_item; pragma import (C,xv_create,"xv_create"); -- Initialize panel_base pointer xv_panel_list_pkg : Xv_pkg_ptr; pragma import (C,xv_panel_list_pkg,"my_xv_panel_list_pkg"); begin if V.state = True then V.base := xv_create(V.parent,xv_panel_list_pkg, PANEL_READ_ONLY,Integer(1),0); else V.base := xv_create(V.parent, xv_panel_list_pkg, PANEL_READ_ONLY,Integer(0),0); end if; if V.base = 0 then raise NO_OBJECT_CREATED; end if; end Initialize; ----------------------------------------------------------------------------- procedure Set_Choices (V: in Xv_Panel_List; Choices : Strings) is Xv_rc : Xv_object; begin for i in choices'range loop Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LIST_STRING,i - 1, Interfaces.C.To_C(choices(i).all,True),0); end loop; end Set_Choices; ----------------------------------------------------------------------------- procedure Set_Callback (V : in Xv_Panel_List; Func : Callback_List_Ptr) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_NOTIFY_PROC,func,0); end Set_Callback; ----------------------------------------------------------------------------- procedure Set_Pos (V : in Xv_Panel_List; X,Y : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),XV_X,x,0); Xv_rc := xv_set(Xv_opaque(V.base),XV_Y,y,0); end Set_Pos; ----------------------------------------------------------------------------- procedure Set_Disp_Rows (V : in Xv_Panel_List; Rows : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LIST_DISPLAY_ROWS,rows,0); end Set_Disp_Rows; ----------------------------------------------------------------------------- procedure Set_Width (V : in Xv_Panel_List; Width : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LIST_WIDTH,width,0); end Set_Width; ----------------------------------------------------------------------------- procedure Set_Title (V : in Xv_Panel_List; Txt : String) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LIST_TITLE, Interfaces.C.to_C(txt,True),0); end Set_Title; ----------------------------------------------------------------------------- procedure Set_Font (V : in Xv_Panel_List; Row: Integer; Fnt : Font) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LIST_FONT,row,fnt,0); end Set_Font; ----------------------------------------------------------------------------- procedure Set_Value (V : in Xv_Panel_List; Txt : Integer; State : Boolean) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),XV_SHOW,Integer(0),0); if state = True then Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LIST_SELECT,txt,Integer(1),0); else Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LIST_SELECT,txt,Integer(0),0); end if; Xv_rc := xv_set(Xv_opaque(V.base),XV_SHOW,Integer(1),0); end Set_Value; ----------------------------------------------------------------------------- function Get_Value (V : in Xv_Panel_List) return Integer is begin return xv_get(Xv_opaque(V.base),PANEL_LIST_FIRST_SELECTED,0); end Get_Value; ----------------------------------------------------------------------------- function Get_Choice (V : in Xv_Panel_List) return String is Item : Integer; begin Item := xv_get(Xv_opaque(V.base),PANEL_LIST_FIRST_SELECTED,0); return Interfaces.C.To_Ada(xv_get(Xv_opaque(V.base), PANEL_LIST_STRING,Item,0)); end Get_Choice; ----------------------------------------------------------------------------- procedure Remove_Row (V : in Xv_Panel_List; Row : Integer) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LIST_DELETE,row,0); end Remove_Row; ----------------------------------------------------------------------------- procedure Insert_Row (V : in Xv_Panel_List; Row : Integer; Choice : String) is Xv_Rc : Xv_Object; begin Xv_Rc := Xv_Set(Xv_Opaque(V.Base),PANEL_LIST_INSERT,Row, PANEL_LIST_STRING,Row,Interfaces.C.To_C(Choice,True),0); end Insert_Row; ----------------------------------------------------------------------------- function Get_Rows (V : in Xv_Panel_List) return Integer is begin return xv_get(Xv_opaque(V.base),PANEL_LIST_NROWS,0); end Get_Rows; ----------------------------------------------------------------------------- procedure Finalize (V : in out Xv_Panel_List) is begin Xv_Destroy_Safe(Xv_Opaque(V.Base)); end Finalize; ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- panel_message ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- procedure Initialize (V : in out Xv_Panel_Message) is -- Declare C binding for xv_create function xv_create (owner : Panel; pkg : Xv_pkg_ptr; term : Integer) return Panel_message_item; pragma import (C,xv_create,"xv_create"); -- Initialize panel_base pointer xv_panel_message_pkg : Xv_pkg_ptr; pragma import (C,xv_panel_message_pkg,"my_xv_panel_message_pkg"); begin V.base := xv_create(V.parent,xv_panel_message_pkg,0); if V.base = 0 then raise NO_OBJECT_CREATED; end if; end Initialize; ----------------------------------------------------------------------------- procedure Set_Pos (V : in Xv_Panel_Message; X,Y : Integer) is Xv_Rc : Xv_object; begin Xv_Rc := xv_set(Xv_opaque(V.base),XV_X,X,0); Xv_Rc := xv_set(Xv_opaque(V.base),XV_Y,Y,0); end Set_Pos; ----------------------------------------------------------------------------- procedure Set_Text (V : in Xv_Panel_Message; Txt : String) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_STRING, Interfaces.C.to_C(txt,True),0); end Set_Text; ----------------------------------------------------------------------------- procedure Set_Font (V : in Xv_Panel_Message; Fnt : Font) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_FONT,fnt,0); end Set_Font; ----------------------------------------------------------------------------- procedure Finalize (V : in out Xv_Panel_Message) is begin Xv_Destroy_Safe(Xv_Opaque(V.Base)); end Finalize; ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- panel_slider ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- procedure Initialize (V : in out Xv_Panel_Slider) is -- Declare C binding for xv_create function xv_create (owner : Panel; pkg : Xv_pkg_ptr; term : Integer) return Panel_slider_item; pragma import (C,xv_create,"xv_create"); -- Initialize panel_base pointer xv_panel_slider_pkg : Xv_pkg_ptr; pragma import (C,xv_panel_slider_pkg,"my_xv_panel_slider_pkg"); begin V.base := xv_create(V.parent,xv_panel_slider_pkg,0); if V.base = 0 then raise NO_OBJECT_CREATED; end if; end Initialize; ----------------------------------------------------------------------------- procedure Set_Pos (V : in Xv_Panel_Slider; X,Y : Integer) is Xv_Rc : Xv_object; begin Xv_Rc := xv_set(Xv_opaque(V.base),XV_X,X,0); Xv_Rc := xv_set(Xv_opaque(V.base),XV_Y,Y,0); end Set_Pos; ----------------------------------------------------------------------------- procedure Set_Text (V : in Xv_Panel_Slider; Txt : String) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_STRING, Interfaces.C.to_C(txt,True),0); end Set_Text; ----------------------------------------------------------------------------- procedure Set_Font (V : in Xv_Panel_Slider; Fnt : Font) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_FONT,fnt,0); end Set_Font; ----------------------------------------------------------------------------- procedure Set_Value (V : in Xv_Panel_Slider; Txt : Integer) is Xv_Rc : Xv_object; begin Xv_Rc := xv_set(Xv_opaque(V.base),PANEL_VALUE,Txt,0); end Set_Value; ----------------------------------------------------------------------------- procedure Set_Min_Value (V : in Xv_Panel_Slider; Txt : Integer) is Xv_Rc : Xv_object; begin Xv_Rc := xv_set(Xv_opaque(V.base),PANEL_MIN_VALUE,Txt,0); end Set_Min_Value; ----------------------------------------------------------------------------- procedure Set_Max_Value (V : in Xv_Panel_Slider; Txt : Integer) is Xv_Rc : Xv_object; begin Xv_Rc := xv_set(Xv_opaque(V.base),PANEL_MAX_VALUE,Txt,0); end Set_Max_Value; ----------------------------------------------------------------------------- function Get_Value (V : in Xv_Panel_Slider) return Integer is begin return xv_get(Xv_opaque(V.base),PANEL_VALUE,0); end Get_Value; ----------------------------------------------------------------------------- procedure Set_Ticks (V : in Xv_Panel_Slider; Txt : Integer) is Xv_Rc : Xv_object; begin Xv_Rc := xv_set(Xv_opaque(V.base),PANEL_TICKS,Txt,0); end Set_Ticks; ----------------------------------------------------------------------------- procedure Set_Callback(V : in Xv_Panel_Slider; func : Callback_Slider_Ptr) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_NOTIFY_PROC, Callback_Slider_Ptr(Func),0); end Set_Callback; ----------------------------------------------------------------------------- procedure Set_Width (V : in Xv_Panel_Slider; W : Integer) is Xv_Rc : Xv_object; begin Xv_Rc := xv_set(Xv_opaque(V.base),PANEL_SLIDER_WIDTH,W,0); end Set_Width; ----------------------------------------------------------------------------- procedure Set_Layout (V : in Xv_Panel_Slider; Data : Boolean) is Xv_rc : Xv_object; begin if data = True then Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LAYOUT, Integer(PANEL_HORIZONTAL),0); else Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LAYOUT, Integer(PANEL_VERTICAL),0); end if; end Set_Layout; ----------------------------------------------------------------------------- procedure Finalize (V : in out Xv_Panel_Slider) is begin Xv_Destroy_Safe(Xv_Opaque(V.Base)); end Finalize; ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- panel_Gauge ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- procedure Initialize (V : in out Xv_Panel_Gauge) is -- Declare C binding for xv_create function xv_create (owner : Panel; pkg : Xv_pkg_ptr; term : Integer) return Panel_Gauge_item; pragma import (C,xv_create,"xv_create"); -- Initialize panel_base pointer xv_panel_Gauge_pkg : Xv_pkg_ptr; pragma import (C,xv_panel_Gauge_pkg,"my_xv_panel_gauge_pkg"); begin V.base := xv_create(V.parent,xv_panel_Gauge_pkg,0); if V.base = 0 then raise NO_OBJECT_CREATED; end if; end Initialize; ----------------------------------------------------------------------------- procedure Set_Pos (V : in Xv_Panel_Gauge; X,Y : Integer) is Xv_Rc : Xv_object; begin Xv_Rc := xv_set(Xv_opaque(V.base),XV_X,X,0); Xv_Rc := xv_set(Xv_opaque(V.base),XV_Y,Y,0); end Set_Pos; ----------------------------------------------------------------------------- procedure Set_Text (V : in Xv_Panel_Gauge; Txt : String) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_STRING, Interfaces.C.to_C(txt,True),0); end Set_Text; ----------------------------------------------------------------------------- procedure Set_Font (V : in Xv_Panel_Gauge; Fnt : Font) is Xv_rc : Xv_object; begin Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LABEL_FONT,fnt,0); end Set_Font; ----------------------------------------------------------------------------- procedure Set_Value (V : in Xv_Panel_Gauge; Txt : Integer) is Xv_Rc : Xv_object; begin Xv_Rc := xv_set(Xv_opaque(V.base),PANEL_VALUE,Txt,0); end Set_Value; ----------------------------------------------------------------------------- procedure Set_Min_Value (V : in Xv_Panel_Gauge; Txt : Integer) is Xv_Rc : Xv_object; begin Xv_Rc := xv_set(Xv_opaque(V.base),PANEL_MIN_VALUE,Txt,0); end Set_Min_Value; ----------------------------------------------------------------------------- procedure Set_Max_Value (V : in Xv_Panel_Gauge; Txt : Integer) is Xv_Rc : Xv_object; begin Xv_Rc := xv_set(Xv_opaque(V.base),PANEL_MAX_VALUE,Txt,0); end Set_Max_Value; ----------------------------------------------------------------------------- function Get_Value (V : in Xv_Panel_Gauge) return Integer is begin return xv_get(Xv_opaque(V.base),PANEL_VALUE,0); end Get_Value; ----------------------------------------------------------------------------- procedure Set_Ticks (V : in Xv_Panel_Gauge; Txt : Integer) is Xv_Rc : Xv_object; begin Xv_Rc := xv_set(Xv_opaque(V.base),PANEL_TICKS,Txt,0); end Set_Ticks; ----------------------------------------------------------------------------- -- procedure Set_Callback(V : in Xv_Panel_Gauge; -- func : Callback_Gauge_Ptr) is -- Xv_rc : Xv_object; -- begin -- Xv_rc := xv_set(Xv_opaque(V.base),PANEL_NOTIFY_PROC,func,0); -- end Set_Callback; ----------------------------------------------------------------------------- procedure Set_Width (V : in Xv_Panel_Gauge; W : Integer) is Xv_Rc : Xv_object; begin Xv_Rc := xv_set(Xv_opaque(V.base),PANEL_GAUGE_WIDTH,W,0); end Set_Width; ----------------------------------------------------------------------------- procedure Set_Layout (V : in Xv_Panel_Gauge; Data : Boolean) is Xv_rc : Xv_object; begin if data = True then Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LAYOUT, Integer(PANEL_HORIZONTAL),0); else Xv_rc := xv_set(Xv_opaque(V.base),PANEL_LAYOUT, Integer(PANEL_VERTICAL),0); end if; end Set_Layout; ----------------------------------------------------------------------------- procedure Finalize (V : in out Xv_Panel_Gauge) is begin Xv_Destroy_Safe(Xv_Opaque(V.Base)); end Finalize; end Xv_Panel_Package;