Ignore:
Timestamp:
Feb 19, 2010, 8:27:08 AM (16 years ago)
Author:
mansoux
Message:

version 0.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/Quartz/PIMenuQuartz.cpp

    r3326 r3747  
    1010#include "PIMenuQuartz.h"
    1111
    12 
     12/* ----------------------------- Methode ------------------------------- */
    1313PIMenuQuartz::PIMenuQuartz(PIWdg* par, const char* nom, PIMenuType pdpu)
    1414:PIMenuGen(par, nom, pdpu)
     
    1717    Str255 menuTitle;
    1818
     19    mNItem = 0;  mNItemMax = 0;     
     20    mMenuID = mMenuIdentificateur++;
     21
     22//    Beware with using this attribute, no place for check mark!
     23//    CreateNewMenu (mMenuID, kMenuAttrExcludesMarkColumn, &mMenu);
     24
    1925//  Popupmenu are associated with ButtonControl
    2026    if (pdpu == k_PopupMenu)
    21         {       
    22         }
    23    
    24     mNItem = 0;  mNItemMax = 0;     
    25     mMenuID = mMenuIdentificateur++;
    26 
    27 //    Beware with using this attribute, no place for check mark!
    28 //    CreateNewMenu (mMenuID, kMenuAttrExcludesMarkColumn, &mMenu);
    29 
    30     CreateNewMenu (mMenuID,kMenuAttrAutoDisable, &mMenu);
    31    
     27        {
     28                CreateNewMenu (mMenuID, kMenuAttrHidden, &mMenu);
     29        }
     30    else
     31        {
     32                CreateNewMenu (mMenuID, kMenuAttrAutoDisable, &mMenu);
     33    }
     34       
     35        parent = par;
    3236    CopyCStringToPascal (nom, menuTitle);
    3337    SetMenuTitle (mMenu, menuTitle);
     
    3539}
    3640
     41/* ----------------------------- Methode ------------------------------- */
    3742PIMenuQuartz::~PIMenuQuartz()
    3843{
     
    4045}
    4146                                   
     47/* ----------------------------- Methode ------------------------------- */
    4248void PIMenuQuartz::AppendItem(const char* nom, PIMessage msg, char* sc)
    4349{
     
    7682}
    7783                                   
     84/* ----------------------------- Methode ------------------------------- */
    7885void PIMenuQuartz::AppendCheckItem(const char* nom, PIMessage msg, char* sc)
    7986{
     
    8592}
    8693
     94/* ----------------------------- Methode ------------------------------- */
    8795void PIMenuQuartz::AppendPDMenu(PIMenuGen *pdm, char* sc)
    8896{
     
    9199}
    92100
    93 
     101/* ----------------------------- Methode ------------------------------- */
    94102void PIMenuQuartz::AppendCascadeMenu(PIMenuQuartz* cascadeMenu, PIMessage msg)
    95103{
     
    103111}
    104112
     113/* ----------------------------- Methode ------------------------------- */
    105114void PIMenuQuartz::AppendSeparator()
    106115{
     
    112121
    113122
     123/* ----------------------------- Methode ------------------------------- */
    114124void PIMenuQuartz::DeleteItem(const char *nom)
    115125{
     
    123133}
    124134
     135/* ----------------------------- Methode ------------------------------- */
    125136void PIMenuQuartz::DeleteItemMsg(PIMessage msg)
    126137{
     
    128139}
    129140
     141/* ----------------------------- Methode ------------------------------- */
    130142void PIMenuQuartz::DeleteItemNum(int n)
    131143{
     
    135147
    136148
     149/* ----------------------------- Methode ------------------------------- */
    137150void PIMenuQuartz::SetSensitivity(const char *nom, bool sens)
    138151{
     
    143156}
    144157
     158/* ----------------------------- Methode ------------------------------- */
    145159void PIMenuQuartz::SetSensitivityMsg(PIMessage msg, bool sens)
    146160{
     
    151165}
    152166
     167/* ----------------------------- Methode ------------------------------- */
    153168void PIMenuQuartz::SetSensitivityNum(int n, bool sens)
    154169{
     
    160175}
    161176
     177/* ----------------------------- Methode ------------------------------- */
    162178bool PIMenuQuartz::IsSensitive(const char *nom)
    163179{
     
    167183}
    168184
     185/* ----------------------------- Methode ------------------------------- */
    169186bool PIMenuQuartz::IsSensitiveMsg(PIMessage msg)
    170187{
     
    174191}
    175192
     193/* ----------------------------- Methode ------------------------------- */
    176194bool PIMenuQuartz::IsSensitiveNum(int n)
    177195{
     
    179197}
    180198
     199/* ----------------------------- Methode ------------------------------- */
    181200void PIMenuQuartz::SetState(const char *nom, bool st)
    182201{
     
    187206}
    188207
     208/* ----------------------------- Methode ------------------------------- */
    189209void PIMenuQuartz::SetStateMsg(PIMessage msg, bool st)
    190210{
     
    195215}
    196216
     217/* ----------------------------- Methode ------------------------------- */
    197218void PIMenuQuartz::SetStateNum(int n, bool st)
    198219{
     
    200221}
    201222 
     223/* ----------------------------- Methode ------------------------------- */
    202224bool PIMenuQuartz::GetState(const char *nom)
    203225{
     
    208230}
    209231
     232/* ----------------------------- Methode ------------------------------- */
    210233bool PIMenuQuartz::GetStateMsg(PIMessage msg)
    211234{
     
    216239}
    217240
     241/* ----------------------------- Methode ------------------------------- */
    218242bool PIMenuQuartz::GetStateNum(int n)
    219243{
     
    221245}
    222246
     247/* ----------------------------- Methode ------------------------------- */
    223248void PIMenuQuartz::Show()
    224249{
     
    227252}
    228253
     254/* ----------------------------- Methode ------------------------------- */
    229255void PIMenuQuartz::Show(PIWdg *w, int px, int py)
    230256{
     
    233259}
    234260
     261/* ----------------------------- Methode ------------------------------- */
    235262PIMessage PIMenuQuartz::GetMsgItem(int itemID)
    236263{
     
    246273}
    247274
     275/* ----------------------------- Methode ------------------------------- */
    248276int PIMenuQuartz::GetNumItem(const char* nom)
    249277{
     
    269297}
    270298
     299/* ----------------------------- Methode ------------------------------- */
    271300int PIMenuQuartz::GetNumItemMsg(PIMessage msg)
    272301{
     
    280309}
    281310
     311/* ----------------------------- Methode ------------------------------- */
    282312char*  PIMenuQuartz::ItemName(int n)
    283313{
     
    287317}
    288318
     319/* ----------------------------- Methode ------------------------------- */
    289320MenuRef PIMenuQuartz::GetMenuRef()
    290321{
     
    292323}
    293324
     325/* ----------------------------- Methode ------------------------------- */
    294326MenuID PIMenuQuartz::GetMenuID()
    295327{
    296328    return (mMenuID);
    297329}
     330
     331/* ----------------------------- Methode ------------------------------- */
     332PIWdg* PIMenuQuartz::GetParent()
     333{
     334    return (parent);
     335}
     336
     337
Note: See TracChangeset for help on using the changeset viewer.