/* @(#) 1.5 com/src/samples/piano/iodpiano.h, odpianopart, od96nt, odnt9712d 3/4/97 18:24:28 [3/21/97 17:38:17] */
/*====START_GENERATED_PROLOG======================================
 */
/*
 *   COMPONENT_NAME: odother
 *
 *   CLASSES:   PianoModel
 *
 *   ORIGINS: 82,27
 *
 *
 *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
 *   All Rights Reserved
 *   Licensed Materials - Property of IBM
 *   US Government Users Restricted Rights - Use, duplication or
 *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 *   	
 *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
 *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
 *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
 *   OR PERFORMANCE OF THIS SOFTWARE.
 */
/*====END_GENERATED_PROLOG========================================
 */
//---- Piano.PianoPart -----------------------------------------------
//
//

#ifndef OpenDoc_Sample_PianoPart
#define OpenDoc_Sample_PianoPart




// ---- PianoModel ----------------------------------------------------------
//
//      This class contains the contents (persistent data) of the Piano
//      program. This persistent data is the note mode (whole notes, ...)
//      selected from the Piano pulldown menu.
//
//

class PianoModel {

    public:

                        PianoModel();
        virtual         ~PianoModel();

        short           GetState(void);
        void            SetState(short);

    private:

        short            fState;      // note last selected from the menu

        PianoModel&      operator=(const PianoModel&);
                         PianoModel(const PianoModel&);

};



// ---- SOM / OpenDoc Includes, Constants, ... ---------------------------
//
//


#define PianoPart_Class_Source


// VARIABLE_MACROS enables the SOM _fMyVariable convenience macros
#define VARIABLE_MACROS
#define METHOD_MACROS

#include <barray.h>
#include <focuslib.h>
#include <ODMath.h>
#include <ODRes.h>
#include <ODTypes.h>
#include <StorUtil.h>
#include <TempObj.h>
#include <WinUtils.h>
#include <ODExcept.h>

#ifndef SOM_PianoPart_xih
#include <iodpiano.xih>
#endif

#ifndef SOM_StaffPart_xh
#include <iodstaff.xh>
#endif


#ifndef SOM_ODArbitrator_xh
#include <Arbitrat.xh>
#endif

#ifndef SOM_ODCanvas_xh
#include <Canvas.xh>
#endif

#ifndef SOM_ODFacet_xh
#include <Facet.xh>
#endif

#ifndef SOM_ODFrame_xh
#include <Frame.xh>
#endif

#ifndef SOM_ODMenubar_xh
#include <Menubar.xh>
#endif

#ifndef SOM_ODSession_xh
#include <ODSessn.xh>
#endif

#ifndef SOM_ODPlatformCanvas_xh
#include <PlatCanv.xh>
#endif

#ifndef SOM_ODShape_xh
#include <Shape.xh>
#endif

#ifndef SOM_Module_xh5cStdProps_OpenDoc_StdProps_defined
#include <StdProps.xh>
#endif

#ifndef SOM_Module_xh5cStdTypes_OpenDoc_StdTypes_defined
#include <StdTypes.xh>
#endif

#ifndef SOM_ODStorageUnit_xh
#include <StorageU.xh>
#endif

#ifndef SOM_ODTransform_xh
#include <Trnsform.xh>
#endif

#ifndef SOM_ODWindow_xh
#include <Window.xh>
#endif

#ifndef SOM_ODWin32Canvas_xh
#include <WinPCanv.xh>
#endif

#ifndef SOM_ODWindowWorldCanvas_xh
#include <WinWCanv.xh>
#endif

#ifndef SOM_ODWindowState_xh
#include <WinStat.xh>
#endif



// ---- MSGDISP LOG function ---------------------------------------------
//
//      The LOG function outputs a message to the MSGDISP screen (if present)
//      each time one of your SOM methods are called, allowing you to see
//      a trace of what gets called and when.
//
//      DEBUG must be defined at compile time to activate it.
//
//


#ifdef DEBUG
   #undef PianoPartMethodDebug
   #undef M_PianoPartMethodDebug

   #include <qprintf.h>  // output to MSGDISP.EXE

   #define PianoPartMethodDebug(x,y)   qprintf("%s:%s\n",x,y)
   #define M_PianoPartMethodDebug(x,y) qprintf("%s:%s\n",x,y)

#endif


#   define QPRINTF qprintf
#   include <windows.h>
#   include <winuser.h>
#   include <wingdi.h>


#include <iostream.h>

#include <ODRegApi.h>



// ---- OpenDoc Menu Constants -------------------------------------------
//
//      Start our menuids with kODCommandParts, which is the menuid set
//      aside for parts subclassed from Base Container part, as defined
//      in BCMAIN.H.

const   ODMenuID  kODPianoMenuID = kODCommandParts+100;

#define CMD(X)    kODCommand##X


#define kODCommandWholeNote             (kODCommandParts+101)
#define kODCommandHalfNote              (kODCommandParts+102)
#define kODCommandQuarterNote           (kODCommandParts+103)
#define kODCommandEighthNote            (kODCommandParts+104)
#define kODCommandRestSome              (kODCommandParts+105)
#define kODCommandBackupOne             (kODCommandParts+106)
#define kODCommandSkipFwdOne            (kODCommandParts+107)
#define kODCommandOneNote               (kODCommandParts+108)


#define kPianoProp                      "PianoPart:Property:Song"

// used to query if the container is a staff part
#define kStaffExtension                 "StaffPart:Extension:Song"


#define kPartKindName                   "PianoPart"


#define kPartHandlerName                "PianoPart"
#define kPartHandlerDllName             "PIANO.DLL"
#define kWindowsIcon                    "PIANO.ICO"

const   ODType   kPartKindDisplayName = "Piano Container Part";
const   ODType   kPartCategory        = "Piano Container";



// ---- NLS Message constants --------------------------------------------
//
//      The PP_MSG_SET and PP_* messages must conform to what
//      is shown in the XPG/4 Message catalog file PIANO.MSG
//
//

#include <locale.h>
#include <wchar.h>
#include <odnltyps.h>
#ifndef NL_CAT_LOCALE

    #define NL_CAT_LOCALE 1
    typedef int nl_catd;

    int catopen(char *, int) { return 0; }
    char* catgets(int a, int b, int c, char *defaultMsg) { return defaultMsg; }
    void catclose(int) { }

#endif

#define PP_NLS_CATALOG "Piano"   // Messages are stored in PIANO.MSG
#define PP_MSG_SET     1         // Menu messages are in Set #1

#define PP_PIANOMENU   1         // message "Piano" title of the PIANO pulldown menu
#define PP_WHOLENOTE   2         // message "Whole Note"
#define PP_HALFNOTE    3         // message "1/2 Note"
#define PP_QUARTERNOTE 4         // message "1/4 Note"
#define PP_EIGHTHNOTE  5         // message "1/8 Note"

#define PP_PLAYSONG    9         // message "Play Song" for replaying the last song

#define PP_PIANO_TITLE 10


// mouse position displayed for insertion point of dropped or pasted data
#define PP_NPOINTS 5            // # of points to make a cross hair mark


#endif   // end of OpenDoc_Sample_PianoPart Include file
