hiViewTextFile
hiViewTextFile(
t_file
?winSpec g_winspec
?title g_title
?appName g_appName
?help g_help
?iconPosition l_iconPosition
?deviceMode g_deviceMode
?pluginFactory g_pluginFactory
?fixedFont g_fixedFont
)
=> w_windowId / nil
Description
Creates a viewfile window, inserts the menu bar, sets the window and icon names, specifies how to load the file in the window, and displays the file in the window.
This function is similar to the view function. However, it uses keywords other than mandatory options to specify the arguments.
Arguments
|
t_file
|
File name to view.
|
|
?winSpec g_winspec
|
|
|
Screen coordinates of the lower-left and upper-right corners of the window, assuming 0:0 to be the lower-left corner of the window.
|
|
?title g_title
|
Title for the window. This title appears in the window manager banner of the viewfile window. If not specified, the file name is used.
|
|
?appName g_appName
|
|
|
String representing the window application type or name.
The default is "Show File".
|
|
?help g_help
|
Help string for the window used to reference a .tgf help file. If you do not specify this argument or specify an empty string, "", the help argument is set to appName, which is the value of the g_appName argument.
The default is "".
|
|
?iconPosition l_iconPosition
|
|
|
Icon location (in X Window System screen coordinates) for the window. This causes the window to be iconified initially. If l_iconPosition is nil or not specified, the window is not iconified initially.
This argument is passed to hiCreateWindow.
|
|
?deviceMode g_deviceMode
|
|
|
Method to be used to load the text file.
Valid values: LoadAll, Sparse.
|
|
?pluginFactory g_pluginFactory
|
|
|
This argument is passed to hiSetViewfile.
|
|
?fixedFont g_fixedFont
|
|
|
Allows only fixed-width fonts for display. If the current application uses or changes to a non-fixed width font for text display, it either uses the current fixed-width font or "Noto Mono" as the default font.
The default is nil.
|
Value Returned
|
w_windowId
|
ID of the viewfile window.
|
|
nil
|
The viewfile window could not be created.
|
Examples
Creates a viewfile window to open the text file log.txt with fixed width fonts.
hiViewTextFile("log.txt" ?fixedFont t)
Related Topics
Functions of Viewfile Window
hiViewfile
hiSetViewfile
Return to top