- void WxTreeView::SetColor(int l, int item)
- {
- int colorId=12;
- GetCtrl(l)->SetItemTextColour(item, wxColourDatabase().Find
- (crea::std2wx(mColorPalette[colorId])));
- GetCtrl(l)->SetItemState(item,wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED, wxLIST_STATE_SELECTED); /*
- int colorId=0;
- //Setting the color according to the parent
- if(l==0)
- {
- item.SetBackgroundColour
- (wxColourDatabase().Find
- (crea::std2wx(mColorPalette[colorId])));
- mColorMap.insert
- (NodeColorPair
- (*j,wxColourDatabase().Find
- (crea::std2wx(mColorPalette[colorId]))));
- if(colorId<64)
- {
- colorId++;
- }
- else
- {
- colorId=0;
- }
- }
- else if(l!=mLevelList.size()-1)
- {
- item.SetBackgroundColour(mColorMap[*i]);
- mColorMap.insert(NodeColorPair(*j,mColorMap[*i]));
- }
- else
- {
- item.SetBackgroundColour(mColorMap[*i]);
- }*/
- }
- //================================================================
- void WxTreeView::CreateColorPalette()
- {
- GimmickDebugMessage(6,"WxTreeView::CreateColorPalette");
- mColorPalette.push_back("WHITE");
- mColorPalette.push_back("LIGHT GREY");
- mColorPalette.push_back("AQUAMARINE");
- mColorPalette.push_back("MEDIUM FOREST GREEN");
- mColorPalette.push_back("INDIAN RED");
- mColorPalette.push_back("KHAKI");
- mColorPalette.push_back("ORANGE");
- mColorPalette.push_back("LIGHT BLUE");
- mColorPalette.push_back("LIGHT STEEL BLUE");
- mColorPalette.push_back("PINK");
- mColorPalette.push_back("PLUM");
- mColorPalette.push_back("PURPLE");
- mColorPalette.push_back("RED");
- mColorPalette.push_back("SEA GREEN");
- mColorPalette.push_back("SIENNA");
- mColorPalette.push_back("SKY BLUE");
- mColorPalette.push_back("SLATE BLUE");
- mColorPalette.push_back("SPRING GREEN");
- mColorPalette.push_back("TAN");
- mColorPalette.push_back("THISTLE");
- mColorPalette.push_back("TURQUOISE");
- mColorPalette.push_back("VIOLET");
- mColorPalette.push_back("VIOLET RED");
- mColorPalette.push_back("WHEAT");
- mColorPalette.push_back("YELLOW");
- mColorPalette.push_back("YELLOW GREEN");
- mColorPalette.push_back("BLUE");
- mColorPalette.push_back("BLUE VIOLET");
- mColorPalette.push_back("BROWN");
- mColorPalette.push_back("CADET BLUE");
- mColorPalette.push_back("CORAL");
- mColorPalette.push_back("CORNFLOWER BLUE");
- mColorPalette.push_back("CYAN");
- mColorPalette.push_back("DARK GREY");
- mColorPalette.push_back("DARK GREEN");
- mColorPalette.push_back("DARK OLIVE GREEN");
- mColorPalette.push_back("DARK ORCHID");
- mColorPalette.push_back("DARK SLATE BLUE");
- mColorPalette.push_back("DARK SLATE GREY");
- mColorPalette.push_back("DARK TURQUOISE");
- mColorPalette.push_back("FIREBRICK");
- mColorPalette.push_back("FOREST GREEN");
- mColorPalette.push_back("GOLD");
- mColorPalette.push_back("GOLDENROD");
- mColorPalette.push_back("GREY");
- mColorPalette.push_back("GREEN");
- mColorPalette.push_back("GREEN YELLOW");
- mColorPalette.push_back("LIME GREEN");
- mColorPalette.push_back("MAGENTA");
- mColorPalette.push_back("MAROON");
- mColorPalette.push_back("MEDIUM AQUAMARINE");
- mColorPalette.push_back("MEDIUM BLUE");
- mColorPalette.push_back("MEDIUM GOLDENROD");
- mColorPalette.push_back("MEDIUM ORCHID");
- mColorPalette.push_back("MEDIUM SEA GREEN");
- mColorPalette.push_back("MEDIUM SLATE BLUE");
- mColorPalette.push_back("MEDIUM SPRING GREEN");
- mColorPalette.push_back("MEDIUM TURQUOISE");
- mColorPalette.push_back("MEDIUM VIOLET RED");
- mColorPalette.push_back("MIDNIGHT BLUE");
- mColorPalette.push_back("NAVY");
- mColorPalette.push_back("ORANGE RED");
- mColorPalette.push_back("ORCHID, PALE GREEN");
- mColorPalette.push_back("STEEL BLUE");
- mColorPalette.push_back("BLACK");
-
-
- }