1 //=========================================================
2 //  MusE
3 //  Linux Music Editor
4 //
5 //  function_dialog_base.h
6 //  (C) Copyright 2018 Tim E. Real (terminator356 on users dot sourceforge dot net)
7 //
8 //  This program is free software; you can redistribute it and/or
9 //  modify it under the terms of the GNU General Public License
10 //  as published by the Free Software Foundation; version 2 of
11 //  the License, or (at your option) any later version.
12 //
13 //  This program is distributed in the hope that it will be useful,
14 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 //  GNU General Public License for more details.
17 //
18 //  You should have received a copy of the GNU General Public License
19 //  along with this program; if not, write to the Free Software
20 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 //
22 //=========================================================
23 
24 #ifndef __FUNCTION_DIALOG_CONSTS_H__
25 #define __FUNCTION_DIALOG_CONSTS_H__
26 
27 namespace MusEGui {
28 
29 //--------------------------------------------------------
30 // FunctionDialogElements: Types of common elements which
31 //  can be displayed in all function dialogs:
32 //--------------------------------------------------------
33 enum FunctionDialogElements
34 {
35   FunctionDialogNoElements = 0x0000,
36 
37   //------------------------------
38   // Buttons:
39   //------------------------------
40   FunctionAllEventsButton = 0x100,
41   FunctionSelectedEventsButton = 0x200,
42 
43   FunctionLoopedButton = 0x400,
44   FunctionSelectedLoopedButton = 0x800,
45 
46   FunctionAllPartsButton = 0x1000,
47   FunctionSelectedPartsButton = 0x2000,
48 
49   FunctionDialogAllElements =
50     FunctionAllEventsButton | FunctionSelectedEventsButton |
51     FunctionLoopedButton | FunctionSelectedLoopedButton |
52     FunctionAllPartsButton | FunctionSelectedPartsButton
53 };
54 
55 // Combination of FunctionDialogElements flags.
56 typedef int FunctionDialogElements_t;
57 
58 
59 //------------------------------------------------
60 // FunctionDialogReturnFlags: Types of convenience
61 //  return flags common to all function dialogs
62 //  (individual dialog members can also be accessed):
63 //------------------------------------------------
64 enum FunctionDialogReturnFlags
65 {
66   FunctionReturnNoFlags = 0x0,
67 
68   FunctionReturnAllEvents = 0x01,
69 
70   FunctionReturnLooped = 0x02,
71 
72   FunctionReturnAllParts = 0x04,
73 
74   FunctionReturnAllFlags = FunctionReturnAllEvents | FunctionReturnLooped |
75     FunctionReturnAllParts
76 };
77 
78 // Combination of FunctionDialogReturnFlags flags.
79 typedef int FunctionReturnDialogFlags_t;
80 
81 const int functionQuantizeRasterVals[] = {
82   1, // Whole note divisor
83   2, // Half note divisor
84   4, // 4th note divisor
85   6, // 4thT divisor
86   8, // 8th divisor
87   12,//8thT divisor
88   16,// ...
89   24,
90   32,
91   48,
92   64
93 };
94 
95 
96 } // namespace MusEGui
97 
98 #endif
99 
100 
101 
102