def _position w
      if @_ws_active.nil? || @_ws_active.empty?
        # no stack or flow, this is independent usage, or else we are outside stacks and flows
        #
        # this is outside any stack or flow, so we do the minimal
        # user should specify row and col
        w.row ||= 0
        w.col ||= 0
        #$log.debug "XXX:  LABEL #{w.row} , #{w.col} "
        w.set_form @form if @form # temporary,, only set if not inside an object FIXME
        if w.width == :expand  # calculate from current col, not 0 FIXME
          w.width = FFI::NCurses.COLS-w.col # or take windows width since this could be in a message box
        end
        if w.height == :expand
          # take from current row, and not zero  FIXME
          w.height = FFI::NCurses.LINES-w.row # or take windows width since this could be in a message box
        end
        return

      end
      # -------------------------- there is a stack or flow -------------------- #
      #
      cur = @_ws_active.last
      unless cur
        raise "This should have been handled previously.Somethings wrong, check/untested"
      end
      r = cur[:row] || 0
      c = cur[:col] || 0
      w.row = r
      w.col = c
      # if flow then take flows height, else use dummy value
      if w.height_pc
        w.height =       ( (cur[:height] * w.height_pc.to_i)/100).floor
      end
      if w.height == :expand
        if cur.is_a? WsFlow
          w.height = cur[:height] || 8 #or raise "height not known for flow"
        else
          w.height = cur[:item_height] || 8 #or raise "height not known for flow"
        end
        #alert "setting ht to #{w.height}, #{cur[:height]} , for #{cur} "
      end
      if w.width == :expand
        if cur.is_a? WsFlow
          if cur[:item_width]
            w.width = cur[:item_width] #or raise "item_Width not known for flow #{cur.class}, #{cur[:item_width]}, #{cur[:width]} , #{w.width_pc}  "
          elsif w.width_pc
            #w.width = w.width_pc * cur[:width]
            w.width = (cur[:width] * (w.width_pc.to_i * 0.01)).floor
          else
            w.width = cur[:width] 
          end
          raise "width could not be calculated. i need flow width and item width_pc" if w.width == :expand
        else
          w.width = cur[:width] or raise "Width not known for stack #{cur.class}, #{cur[:width]} "
        end
      end
      if cur.is_a? WsStack
        r += w.height || 1   # NOTE, we need to have height for this purpose defined BEFORE calling for list/text
        cur[:row] = r
      else
        wid = cur[:item_width] || w.width || 10
        c += wid + 1
        cur[:col] = c
      end
      #alert "set width to #{w.width} ,cur: #{cur[:width]} ,iw: #{cur[:item_width]} "
      if cur.is_a? WsFlow
        unless w.height
          w.height = cur[:height] #or raise "Height not known for flow"
        end
      end
      w.color   ||= cur[:color]
      w.bgcolor ||= cur[:bgcolor]
      w.set_form @form if @form # temporary
      @_ws_components << w
      cur[:components] << w
    end
def _position w
      if @_ws_active.nil? || @_ws_active.empty?
        # no stack or flow, this is independent usage, or else we are outside stacks and flows
        #
        # this is outside any stack or flow, so we do the minimal
        # user should specify row and col
        w.row ||= 0
        w.col ||= 0
        #$log.debug "XXX:  LABEL #{w.row} , #{w.col} "
        w.set_form @form if @form # temporary,, only set if not inside an object FIXME
        if w.width == :expand  # calculate from current col, not 0 FIXME
          w.width = FFI::NCurses.COLS-w.col # or take windows width since this could be in a message box
        end
        if w.height == :expand
          # take from current row, and not zero  FIXME
          w.height = FFI::NCurses.LINES-w.row # or take windows width since this could be in a message box
        end
        return

      end
      # -------------------------- there is a stack or flow -------------------- #
      #
      cur = @_ws_active.last
      unless cur
        raise "This should have been handled previously.Somethings wrong, check/untested"
      end
      r = cur[:row] || 0
      c = cur[:col] || 0
      w.row = r
      w.col = c
      # if flow then take flows height, else use dummy value
      if w.height_pc
        w.height =       ( (cur[:height] * w.height_pc.to_i)/100).floor
      end
      if w.height == :expand
        if cur.is_a? WsFlow
          w.height = cur[:height] || 8 #or raise "height not known for flow"
        else
          w.height = cur[:item_height] || 8 #or raise "height not known for flow"
        end
        #alert "setting ht to #{w.height}, #{cur[:height]} , for #{cur} "
      end
      if w.width == :expand
        if cur.is_a? WsFlow
          if cur[:item_width]
            w.width = cur[:item_width] #or raise "item_Width not known for flow #{cur.class}, #{cur[:item_width]}, #{cur[:width]} , #{w.width_pc}  "
          elsif w.width_pc
            #w.width = w.width_pc * cur[:width]
            w.width = (cur[:width] * (w.width_pc.to_i * 0.01)).floor
          else
            w.width = cur[:width] 
          end
          raise "width could not be calculated. i need flow width and item width_pc" if w.width == :expand
        else
          w.width = cur[:width] or raise "Width not known for stack #{cur.class}, #{cur[:width]} "
        end
      end
      if cur.is_a? WsStack
        r += w.height || 1   # NOTE, we need to have height for this purpose defined BEFORE calling for list/text
        cur[:row] = r
      else
        wid = cur[:item_width] || w.width || 10
        c += wid + 1
        cur[:col] = c
      end
      #alert "set width to #{w.width} ,cur: #{cur[:width]} ,iw: #{cur[:item_width]} "
      if cur.is_a? WsFlow
        unless w.height
          w.height = cur[:height] #or raise "Height not known for flow"
        end
      end
      w.color   ||= cur[:color]
      w.bgcolor ||= cur[:bgcolor]
      w.set_form @form if @form # temporary
      @_ws_components << w
      cur[:components] << w
    end
--- }}}