// ================================================================================= // CSimlabHVarListBox.cp ©1995 J. Rodden, DD/MF & Associates. All rights reserved // ================================================================================= #include #include "RuntimeResources.h" #include "CSimlabEditListRec.h" #include "CSimlabHVarListBox.h" #include // ================================================================================= const Int32 kEditFieldPos = 133; // ================================================================================= #define __ListBoxClass CSimlabHVarListBox #define __ListBoxParent CSimlabHierListBox #include "CSimlabEditListBox.cc" // ================================================================================= // € CreateFromStream // ================================================================================= CSimlabHVarListBox* CSimlabHVarListBox::CreateFromStream (LStream *inStream) { return (new CSimlabHVarListBox(inStream)); } // ================================================================================= // € CSimlabHVarListBox(LStream *inStream) // ================================================================================= CSimlabHVarListBox::CSimlabHVarListBox(LStream *inStream) : CSimlabHierListBox(inStream) { } // ================================================================================= // € CSimlabHVarListBox // ================================================================================= CSimlabHVarListBox::~CSimlabHVarListBox () { Destruct(); } // ================================================================================= // € FinishCreateSelf // ================================================================================= void CSimlabHVarListBox::FinishCreateSelf() { SetupListBox(); } // ================================================================================= // € AssignEditField // ================================================================================= void CSimlabHVarListBox::AssignEditField( Cell inCell) { if( GetElementIndent(inCell) > 0 ) { CSimlabEditListRec* theCellData = (CSimlabEditListRec*) GetElementData(inCell); AssignEditFieldSelf( inCell, theCellData); } } // ============================================================================ // € LDEFHilite // ============================================================================ void CSimlabHVarListBox::LDEFHilite( Boolean lSelect, Rect *lRect, Cell lCell, short lDataOffset, short lDataLen ) { CSimlabEditListRec* theElementData = (CSimlabEditListRec*) GetElementData(lCell); LDEFHiliteSelf( lSelect, lRect, lCell, lDataOffset, lDataLen, theElementData); } // ================================================================================= // € DrawElementData // ================================================================================= void CSimlabHVarListBox::DrawElementData( Boolean lSelect, Rect* lRect, Cell lCell, short lDataLen) { CSimlabEditListRec* theElementData = (CSimlabEditListRec*) GetElementData(lCell); short indent = GetElementIndent(lCell); if ( indent == 0 ) { ::TextFace(bold); } theElementData->Draw( lRect, (indent > 0) ? kEditFieldPos : kNoEditField); } // ================================================================================= // € CreateNewListRec // ================================================================================= CSimlabListRec* CSimlabHVarListBox::CreateNewListRec( SimlabListTag theTag, Str255 theString) { return new CSimlabEditListRec( theTag, theString); } // =================================================================================