package body MSHTML.IHTMLSelection_Object is

   function Get_anchorNode
     (This : IHTMLSelection_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLSelection_Get_anchorNode);
   end Get_anchorNode;

   function Get_anchorOffset
     (This : IHTMLSelection_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLSelection_Get_anchorOffset);
   end Get_anchorOffset;

   function Get_focusNode
     (This : IHTMLSelection_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLSelection_Get_focusNode);
   end Get_focusNode;

   function Get_focusOffset
     (This : IHTMLSelection_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLSelection_Get_focusOffset);
   end Get_focusOffset;

   function Get_isCollapsed
     (This : IHTMLSelection_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLSelection_Get_isCollapsed);
   end Get_isCollapsed;

   procedure collapse
     (This       : IHTMLSelection_Type;
      parentNode : GNATCOM.Types.VARIANT;
      offfset    : GNATCOM.Types.VARIANT;
      Free       : Boolean := True)
   is
   begin
      Invoke
        (This,
         IHTMLSelection_collapse,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => offfset,
          2 => parentNode),
         Free);
   end collapse;

   procedure collapseToStart
     (This : IHTMLSelection_Type)
   is
   begin
      Invoke (This, IHTMLSelection_collapseToStart);
   end collapseToStart;

   procedure collapseToEnd
     (This : IHTMLSelection_Type)
   is
   begin
      Invoke (This, IHTMLSelection_collapseToEnd);
   end collapseToEnd;

   procedure selectAllChildren
     (This       : IHTMLSelection_Type;
      parentNode : GNATCOM.Types.VARIANT;
      Free       : Boolean := True)
   is
   begin
      Invoke
        (This,
         IHTMLSelection_selectAllChildren,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => parentNode),
         Free);
   end selectAllChildren;

   procedure deleteFromDocument
     (This : IHTMLSelection_Type)
   is
   begin
      Invoke (This, IHTMLSelection_deleteFromDocument);
   end deleteFromDocument;

   function Get_rangeCount
     (This : IHTMLSelection_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLSelection_Get_rangeCount);
   end Get_rangeCount;

   function getRangeAt
     (This  : IHTMLSelection_Type;
      index : GNATCOM.Types.VARIANT;
      Free  : Boolean := True)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Invoke
        (This,
         IHTMLSelection_getRangeAt,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => index),
         Free);
   end getRangeAt;

   procedure addRange
     (This   : IHTMLSelection_Type;
      urange : GNATCOM.Types.VARIANT;
      Free   : Boolean := True)
   is
   begin
      Invoke
        (This,
         IHTMLSelection_addRange,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => urange),
         Free);
   end addRange;

   procedure removeRange
     (This   : IHTMLSelection_Type;
      urange : GNATCOM.Types.VARIANT;
      Free   : Boolean := True)
   is
   begin
      Invoke
        (This,
         IHTMLSelection_removeRange,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => urange),
         Free);
   end removeRange;

   procedure removeAllRanges
     (This : IHTMLSelection_Type)
   is
   begin
      Invoke (This, IHTMLSelection_removeAllRanges);
   end removeAllRanges;

   function toString
     (This : IHTMLSelection_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Invoke (This, IHTMLSelection_toString);
   end toString;

end MSHTML.IHTMLSelection_Object;

