module Fox
  #
  # Directory item
  #
  class FXDirItem < FXTreeItem
    # File associations [FXFileAssoc]
    attr_reader :assoc

    # File size [Integer]
    attr_reader :size
    
    # File time [Integer]
    attr_reader :date

    # Returns an initialized FXDirItem instance
    def initialize(text, oi=nil, ci=nil, data=nil) # :yields: theDirItem
    end
    
    # Return +true+ if this is a directory
    def directory?; end

    # Return +true+ if this is an executable
    def executable?; end
    
    # Return +true+ if this is a symbolic link
    def symlink?; end
    
    # Return +true+ if this is a character device
    def chardev?; end
    
    # Return +true+ if this is a block device
    def blockdev?; end
    
    # Return +true+ if this is a FIFO (a named pipe)
    def fifo?; end
    
    # Return +true+ if this is a socket
    def socket?; end
  end
  
  #
  # Directory tree List
  #
  # === Events
  #
  # +SEL_CLOSED+::
  #   sent when a folder item is closed; the message data is a reference to the FXDirItem that was closed
  # +SEL_OPENED+::
  #   sent when a folder item is opened; the message data is a reference to the FXDirItem that was opened
  #
  # === Directory List options
  #
  # +DIRLIST_SHOWFILES+::	Show files as well as directories
  # +DIRLIST_SHOWHIDDEN+::	Show hidden files or directories
  # +DIRLIST_NO_OWN_ASSOC+::	Do not create associations for files
  #
  # === Message identifiers
  #
  # +ID_REFRESH+::		x
  # +ID_SHOW_FILES+::		x
  # +ID_HIDE_FILES+::		x
  # +ID_TOGGLE_FILES+::		x
  # +ID_SHOW_HIDDEN+::		x
  # +ID_HIDE_HIDDEN+::		x
  # +ID_TOGGLE_HIDDEN+::	x
  # +ID_SET_PATTERN+::		x
  # +ID_SORT_REVERSE+::		x
  #
  class FXDirList < FXTreeList

    # Current file [String]
    attr_accessor :currentFile
    
    # Current directory [String]
    attr_accessor :directory
    
    # Wildcard pattern [String]
    attr_accessor :pattern
    
    # Wildcard matching mode, some combination of file matching flags [Integer]
    attr_accessor :matchMode
    
    # File associations [FXFileDict]
    attr_accessor :associations

    # Returns an initialized FXDirList instance
    def initialize(p, nvis, tgt=nil, sel=0, opts=0, x=0, y=0, w=0, h=0) # :yields: theDirList
    end
  
    # Return +true+ if item is a directory
    def itemDirectory?(anItem); end
    
    # Return +true+ if item is a file
    def itemFile?(anItem); end
    
    # Return +true+ if item is executable
    def itemExecutable?(anItem); end
    
    # Return name of item 
    def itemFilename(anItem); end
    
    # Return full pathname of item
    def itemPathname(anItem); end
    
    # Return +true+ if showing files as well as directories
    def filesShown?; end
    
    #
    # If _state_ is +true+, the directory list will show files as well as
    # directories; otherwise, it will only show directories.
    #
    def filesShown=(state); end
  
    # Return +true+ if showing hidden files and directories
    def hiddenFilesShown?; end
    
    #
    # If _state_ is +true+, the directory list will show hidden files and
    # directories; otherwise, it won't.
    #
    def hiddenFilesShown=(state); end
  end
end

