Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
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
#
# An FXDirList widget provides a tree-structured view of the file system.
# It automatically updates itself periodically by re-scanning the file system
# for any changes. As it scans the displayed directories and files, it automatically
# determines the icons to be displayed by consulting the file-associations registry
# settings. A number of messages can be sent to the FXDirList to control the
# filter pattern, sorting order, case sensitivity, and hidden file display mode.
# The Directory list widget supports drags and drops of files.
#
# === 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, target=nil, selector=0, opts=0, x=0, y=0, width=0, height=0) # :yields: theDirList
end
#
# Scan the directories and update the items if needed, or if _force_ is +true+.
#
def scan(force=true); 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
#
# Set current file.
# If _notify_ is +true+, a +SEL_CHANGED+ message is sent to the list's
# message target to indicate that the current item has changed.
#
def setCurrentFile(file, notify=false); end
#
# Set current directory.
# If _notify_ is +true+, a +SEL_CHANGED+ message is sent to the list's
# message target to indicate that the current item has changed.
#
def setDirectory(path, notify=false); end
# Return absolute pathname of item
def itemPathname(anItem); end
# Return the item from the absolute pathname
def pathnameItem(path); 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