forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathans.h
More file actions
106 lines (93 loc) · 5.06 KB
/
ans.h
File metadata and controls
106 lines (93 loc) · 5.06 KB
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
/* Copyright (C) 2003-2013 Runtime Revolution Ltd.
This file is part of LiveCode.
LiveCode is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License v3 as published by the Free
Software Foundation.
LiveCode is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
#ifndef __MC_ANS__
#define __MC_ANS__
// MW-2005-05-15: Have expanded these to take extra parameters
#define MCA_OPTION_SHEET (1 << 0)
#define MCA_OPTION_PLURAL (1 << 1)
#define MCA_OPTION_RETURN_FILTER (1 << 2)
#define MCA_OPTION_SAVE_DIALOG (1 << 3)
#define MCA_OPTION_FOLDER_DIALOG (1 << 4)
// Display a system file open dialog.
// p_title - this string should appear in the titlebar
// p_prompt - this string should appear as a description of what the user should do
// (if there is no suitable place for this, p_prompt override p_title in the titlebar)
// p_filter - this string is the filter that should be applied to the files this
// string is platform specific:
// UNIX - single wildcard expression
// Mac OS - list of filetype codes
// Windows - list of file extensions and names
// p_initial - the path to start with
// p_options - options controlling display
// MCA_OPTION_SHEET - (Mac OS X only) display the dialog as a sheet
// MCA_OPTION_PLURAL - allow multiple files to be selected (not ASK)
//
// On exit:
// ep should be a return-delimited list of revolution paths to the selected files
// or empty if the dialog was cancelled
//
// The Revolution sytax that uses this call is deprecated.
//
extern int MCA_file(MCExecPoint& ep, const char *p_title, const char *p_prompt, const char *p_filter, const char *p_initial, unsigned int p_options);
extern int MCA_ask_file(MCExecPoint& ep, const char *p_title, const char *p_prompt, const char *p_filter, const char *p_initial, unsigned int p_options); //const char *prompt, char *fn, MCExecPoint& ep, Boolean sheet);
// Display a system file open dialog with a list of file types.
// p_title - this string should appear in the titlebar
// p_prompt - this string should appear as a description of what the user should do
// (if there is no suitable place for this, p_prompt override p_title in the titlebar)
// p_types - this is an array of file type strings. Each string has the format:
// <label>|<comma delimited list of extension>|<comma delimited list of Mac OS filetypes>
// e.g. "All Images|jpg,gif,png|JPEG,GIFf,PNGf"
// p_type_count - the number of types in the p_types array
// p_initial - the path to start with
// p_options - options controlling display
// MCA_OPTION_SHEET - (Mac OS X only) display the dialog as a sheet
// MCA_OPTION_PLURAL - allow multiple files to be selected (not ASK)
// MCA_OPTION_RETURN_FILTER - return the label of the type selected in MCresult
//
// On exit:
// ep should be a return-delimited list of revolution paths to the selected files
// or empty if the dialog was cancelled
// If MCA_OPTION_RETURN_FILTER is specified MCresult should contain the label of the
// filetype in effect when the dialog was closed (but not cancelled).
//
extern int MCA_file_with_types(MCExecPoint& ep, const char *p_title, const char *p_prompt, char * const p_types[], uint4 p_type_count, const char *p_initial, unsigned int p_options);
extern int MCA_ask_file_with_types(MCExecPoint& ep, const char *p_title, const char *p_prompt, char * const p_types[], uint4 p_type_count, const char *p_initial, unsigned int p_options);
// Display a system folder selection dialog.
// p_title - this string should appear in the titlebar
// p_prompt - this string should appear as a description of what the user should do
// (if there is no suitable place for this, p_prompt override p_title in the titlebar)
// p_initial - the path to start with
// p_options - options controlling display
// MCA_OPTION_SHEET (Mac OS X only) - display the dialog as a sheet
//
// On exit:
// ep should contain the revolution path of the folder selected, or empty if the
// dialog was cancelled.
//
extern int MCA_folder(MCExecPoint& ep, const char *p_title, const char *p_prompt, const char *p_initial, unsigned int p_options);
// Display a system color selection dialog.
// p_title - this string should appear in the titlebar
// p_initial - the color to start with
// sheet (OS X only) - display the dialog as a sheet
//
// On exit:
// ep should contain the selected color as "red,green,blue" or empty if the dialog
// was cancelled
//
// Note:
// if p_initial is empty, take the value of MCpencolor.
// otherwise parse p_initial using MCscreen -> parsecolor
//
extern int MCA_color(MCExecPoint &ep, const char *p_title, const char *p_initial, Boolean sheet);
extern void MCA_getcolordialogcolors(MCExecPoint &ep);
extern void MCA_setcolordialogcolors(MCExecPoint &ep);
#endif