Skip to content

Commit

Permalink
now with icon for every node
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiantheblind committed Aug 11, 2011
1 parent f1f4497 commit 5fc24fe
Show file tree
Hide file tree
Showing 37 changed files with 14,544 additions and 1,357 deletions.
Binary file modified .DS_Store
Binary file not shown.
97 changes: 66 additions & 31 deletions MPOLnchHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,54 +38,89 @@ PMString MPOLnchHelper::MissingHelpFileStr(PMString fn){

PMString MPOLnchHelper::GetScriptFile(int i){

PMString theFileName[13] = {
"MPO_Importer.jsx",
"theNumbers.jsx",
"clearAllStyles.jsx",
"theFindChange.jsx",
"theItemFinder.jsx",
"theLinkButton.jsx",
"theImagePlacer.jsx",
"clearStructure.jsx",
"color_KEY.jsx",
"color_PAPER.jsx",
"color_XXX.jsx",
"color_MIXEDBLACK.jsx",

"QUICKY.jsx"};
// PMString theFileName[13] = {
// "MPO_Importer.jsx",
// "theNumbers.jsx",
// "clearAllStyles.jsx",
// "theFindChange.jsx",
// "theItemFinder.jsx",
// "theLinkButton.jsx",
// "theImagePlacer.jsx",
// "clearStructure.jsx",
// "color_KEY.jsx",
// "color_PAPER.jsx",
// "color_XXX.jsx",
// "color_MIXEDBLACK.jsx",
//
// "QUICKY.jsx"};


if (i > 13) {
i = 13;
}
return theFileName[i];
PMString tfn = this->GetNodeName(i);
tfn.Append(".jsx");
return tfn;
return tfn;
}

PMString MPOLnchHelper::GetHelpFile(int i){

PMString theFileName[13] = {
"MPO_Importer.txt",
"theNumbers.txt",
"clearAllStyles.txt",
"theFindChange.txt",
"theItemFinder.txt",
"theLinkButton.txt",
"theImagePlacer.txt",
"clearStructure.txt",
"color_KEY.txt",
"color_PAPER.txt",
"color_XXX.txt",
"color_MIXEDBLACK.jsx",
"QUICKY.txt"};
// PMString theFileName[13] = {
// "MPO_Importer.txt",
// "theNumbers.txt",
// "clearAllStyles.txt",
// "theFindChange.txt",
// "theItemFinder.txt",
// "theLinkButton.txt",
// "theImagePlacer.txt",
// "clearStructure.txt",
// "color_KEY.txt",
// "color_PAPER.txt",
// "color_XXX.txt",
// "color_MIXEDBLACK.jsx",
// "QUICKY.txt"};



if (i > 13) {
i = 13;
}
return theFileName[i];
PMString tfn = this->GetNodeName(i);
tfn.Append(".txt");
return tfn;
}

// holds also the nodenames
PMString MPOLnchHelper::GetNodeName(int i){

PMString NN[13] = {
"MPO Importer",
"The Numbers",
"Clear All Styles",
"Find and Change",
"Find Items",
"Build Link Button",
"Place All Images",
"Clear xml Structure",
"Tint-2-Key",
"Tint-2-Paper",
"Tint-2-Swatch",
"Tint-2-Mixedblack",
"Quick Scribble"};



if (i > 13) {
i = 13;
}
return NN[i];




}

// the find change queries need to be installed in the resources

PMString MPOLnchHelper::GetObjectFCFile(int i){
Expand Down
1 change: 1 addition & 0 deletions MPOLnchHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class MPOLnchHelper
void ShowFC(); // show the FC folder
void RestoreMPOLnchScrpts(); // copy the scripts to the Scripts Panel
PMString GetScriptFile(int i); // holds also the nodenames
PMString GetNodeName(int i); // holds also the nodenames


// these should be private
Expand Down
56 changes: 55 additions & 1 deletion MPOLnchID.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,63 @@ DECLARE_PMID(kWidgetIDSpace, kMPOLnchListElementPenWidgetID, kMPOLnchPrefix + 5)
#define kMPOLnchUIPanelIconRsrcID 10252
#define kMPOLnchUIPanelIconRollRsrcID 10252

// PNG specific IDs
// PNG specific IDs The MPO_importer
#define kMPOLnchMPOBtnIconRsrcID 10253
#define kMPOLnchMPOBtnIconRollRsrcID 10253

// PNG specific IDs The theNumbers
#define kMPOLnchNUMBtnIconRsrcID 10254
#define kMPOLnchNUMBtnIconRollRsrcID 10254

// PNG specific IDs The clear all stayles
#define kMPOLnchCLSTYBtnIconRsrcID 10255
#define kMPOLnchCLSTYBtnIconRollRsrcID 10255

// PNG specific IDs The find Change
#define kMPOLnchFCBtnIconRsrcID 10256
#define kMPOLnchFCBtnIconRollRsrcID 10256


// PNG specific IDs The item finder
#define kMPOLnchIFBtnIconRsrcID 10257
#define kMPOLnchIFBtnIconRollRsrcID 10257

// PNG specific IDs The image placer
#define kMPOLnchIMGBtnIconRsrcID 10258
#define kMPOLnchIMGBtnIconRollRsrcID 10258


// PNG specific IDs The clear xml
#define kMPOLnchCLXMLBtnIconRsrcID 10259
#define kMPOLnchCLXMLBtnIconRollRsrcID 10259



// PNG specific IDs color key
#define kMPOLnchCKEYBtnIconRsrcID 10260
#define kMPOLnchCKEYBtnIconRollRsrcID 10260

// PNG specific IDs The color paper
#define kMPOLnchCPAPBtnIconRsrcID 10261
#define kMPOLnchCPAPBtnIconRollRsrcID 10261

// PNG specific IDs The color xxx
#define kMPOLnchCXXXBtnIconRsrcID 10262
#define kMPOLnchCXXXBtnIconRollRsrcID 10262

// PNG specific IDs The color black mixed
#define kMPOLnchCMXDBtnIconRsrcID 10263
#define kMPOLnchCMXDBtnIconRollRsrcID 10263


// PNG specific IDs The link
#define kMPOLnchLNKBtnIconRsrcID 10264
#define kMPOLnchLNKBtnIconRollRsrcID 10264

// PNG specific IDs The link
#define kMPOLnchQCKBtnIconRsrcID 10265
#define kMPOLnchQCKBtnIconRollRsrcID 10265

#endif // __MPOLnchID_h__

// End, MPOLnchID.h.
Expand Down
89 changes: 77 additions & 12 deletions MPOLnchTreeViewWidgetMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ class MPOLnchTVWidgetMgr : public CTreeViewWidgetMgr
// void calcFristRsrcID()const;
RsrcID fMPOBtnRsrcID;

//private:
//void ChangeResourceID();

};


Expand Down Expand Up @@ -102,26 +99,94 @@ bool16 MPOLnchTVWidgetMgr::ApplyDataToWidget(const NodeID& node,
if( (textControlData== nil)) {
break;
}
MPOLnchHelper helper;
MPOLnchHelper helper;

textControlData->SetString(listName);
if (listName == helper.GetScriptFile(0)) {


IControlView* runView = widgetList->FindWidget(kMPOLnchListElementEyeballWidgetID);
if (listName.Contains(helper.GetNodeName(0),0)) {
runView->SetRsrcID(kMPOLnchMPOBtnIconRsrcID) ;
}else if (listName.Contains(helper.GetNodeName(1),0)) {
runView->SetRsrcID(kMPOLnchNUMBtnIconRsrcID) ;

}else if (listName.Contains(helper.GetNodeName(2),0)) {
runView->SetRsrcID(kMPOLnchCLSTYBtnIconRsrcID );

}else if (listName.Contains(helper.GetNodeName(3),0)) {
runView->SetRsrcID(kMPOLnchFCBtnIconRsrcID);
}else if (listName.Contains(helper.GetNodeName(4),0)) {
runView->SetRsrcID(kMPOLnchIFBtnIconRsrcID);
}else if (listName.Contains(helper.GetNodeName(5),0)) {
runView->SetRsrcID(kMPOLnchLNKBtnIconRsrcID);
}else if (listName.Contains(helper.GetNodeName(6),0)) {
runView->SetRsrcID(kMPOLnchIMGBtnIconRsrcID) ;
}else if (listName.Contains(helper.GetNodeName(7),0)) {
runView->SetRsrcID(kMPOLnchCLXMLBtnIconRsrcID) ;
}else if (listName.Contains(helper.GetNodeName(8),0)) {
runView->SetRsrcID(kMPOLnchCKEYBtnIconRsrcID );
}else if (listName.Contains(helper.GetNodeName(9),0)) {
runView->SetRsrcID(kMPOLnchCPAPBtnIconRsrcID);
}else if (listName.Contains(helper.GetNodeName(10),0)) {
runView->SetRsrcID(kMPOLnchCXXXBtnIconRsrcID );
}else if (listName.Contains(helper.GetNodeName(11),0)) {
runView->SetRsrcID(kMPOLnchCMXDBtnIconRsrcID);
}else if (listName.Contains(helper.GetNodeName(12),0)) {
runView->SetRsrcID(kMPOLnchQCKBtnIconRsrcID);
}else{}


runView->SetRsrcID(kMPOLnchMPOBtnIconRsrcID);
runView->Invalidate();
InterfacePtr<IControlView> panelView(widgetList, UseDefaultIID());
panelView->Invalidate();
}

//runView->Invalidate();
// InterfacePtr<IControlView> panelView(widgetList, UseDefaultIID());
// panelView->Invalidate();


} while (false);

return kTrue;
}



//void MPOLnchTVWidgetMgr::ChangeResourceID()
//void MPOLnchTVWidgetMgr::ChangeResourceID(IPanelControlData* widgetList)const
//{
//
// //InterfacePtr<IPanelControlData>
// //panelControlData(
// //Utils<IPalettePanelUtils>()->QueryPanelByWidgetID(kMPOLnchPanelWidgetID));
//
// //ASSERT(panelControlData);
//
// //if(!panelControlData) {
// // return;
// //}
//
//
// //IControlView* runView = widgetList->FindWidget(kMPOLnchListElementEyeballWidgetID);
// //ASSERT(runView);
// //if(!runView) {
//// return;
//// }
//
// this->calcFristRsrcID();
// runView->Invalidate();
//
// InterfacePtr<IControlView> panelView(widgetList, UseDefaultIID());
// ASSERT(panelView);
// //if(!panelView) {
//// return;
//// }
// panelView->Invalidate();
//
//
//
//}

//void MPOLnchTVWidgetMgr::calcFristRsrcID()const
//{
// //fCurrPictureRsrcID++;
// //if(fCurrPictureRsrcID > kPicIcoLastPictureRsrcID) {
// fMPOBtnRsrcID = kMPOLnchMPOBtnIconRsrcID;
// //}
//}

36 changes: 36 additions & 0 deletions MPOLnchpng.fr
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,40 @@ resource PNGR(kMPOLnchUIPanelIconRollRsrcID) "panelicon_p.png"

resource PNGA(kMPOLnchMPOBtnIconRsrcID) "mpo.png"
resource PNGR(kMPOLnchMPOBtnIconRollRsrcID) "mpoR.png"

resource PNGA(kMPOLnchNUMBtnIconRsrcID) "num.png"
resource PNGR(kMPOLnchNUMBtnIconRollRsrcID) "numR.png"

resource PNGA(kMPOLnchCLSTYBtnIconRsrcID) "clstyles.png"
resource PNGR(kMPOLnchCLSTYBtnIconRollRsrcID) "clstylesR.png"

resource PNGA(kMPOLnchFCBtnIconRsrcID) "findchange.png"
resource PNGR(kMPOLnchFCBtnIconRollRsrcID) "findchangeR.png"

resource PNGA(kMPOLnchIFBtnIconRsrcID) "itemfinder.png"
resource PNGR(kMPOLnchIFBtnIconRollRsrcID) "itemfinderR.png"

resource PNGA(kMPOLnchLNKBtnIconRsrcID) "lnk.png"
resource PNGR(kMPOLnchLNKBtnIconRollRsrcID) "lnkR.png"

resource PNGA(kMPOLnchIMGBtnIconRsrcID) "img.png"
resource PNGR(kMPOLnchIMGBtnIconRollRsrcID) "imgR.png"

resource PNGA(kMPOLnchCLXMLBtnIconRsrcID) "clearxmlstr.png"
resource PNGR(kMPOLnchCLXMLBtnIconRollRsrcID) "clearxmlstrR.png"

resource PNGA(kMPOLnchCKEYBtnIconRsrcID) "c_key.png"
resource PNGR(kMPOLnchCKEYBtnIconRollRsrcID) "c_keyR.png"

resource PNGA(kMPOLnchCPAPBtnIconRsrcID) "c_paper.png"
resource PNGR(kMPOLnchCPAPBtnIconRollRsrcID) "c_paperR.png"

resource PNGA(kMPOLnchCXXXBtnIconRsrcID) "c_xxx.png"
resource PNGR(kMPOLnchCXXXBtnIconRollRsrcID) "c_xxxR.png"

resource PNGA(kMPOLnchCMXDBtnIconRsrcID) "c_mxdblk.png"
resource PNGR(kMPOLnchCMXDBtnIconRollRsrcID) "c_mxdblkR.png"

resource PNGA(kMPOLnchQCKBtnIconRsrcID) "quickey.png"
resource PNGR(kMPOLnchQCKBtnIconRollRsrcID) "quickeyR.png"
#endif
Binary file added c_key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added c_keyR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added c_mxdblk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added c_mxdblkR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added c_paper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added c_paperR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added c_xxx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added c_xxxR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added clearxmlstr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added clearxmlstrR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added clstyles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added clstylesR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cxxx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added findchange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added findchangeR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified help.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified helpR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added itemfinder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added itemfinderR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lnk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lnkR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified mpo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified mpoR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added num.png
Binary file added numR.png
Binary file added quickey.png
Binary file added quickeyR.png
4,204 changes: 2,891 additions & 1,313 deletions scriptelizedIcon_01.ai

Large diffs are not rendered by default.

Loading

0 comments on commit 5fc24fe

Please sign in to comment.