You can subscribe to this list here.
| 2005 |
Jan
(98) |
Feb
(101) |
Mar
(60) |
Apr
(38) |
May
(26) |
Jun
|
Jul
|
Aug
(159) |
Sep
(78) |
Oct
(31) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(6) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(8) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Emilien K. <cur...@us...> - 2005-04-04 12:20:23
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20743/include/wxDevCenter Modified Files: DocView.h Log Message: Quelques ajouts sur l'API des documents à actions. Quelques ajouts dans la liaisons du document à actions avec l'exécuteur de commandes pour simplifier l'API. Index: DocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/DocView.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** DocView.h 4 Apr 2005 08:11:19 -0000 1.11 --- DocView.h 4 Apr 2005 12:20:00 -0000 1.12 *************** *** 231,235 **** void SetModifiedFlag(bool bFlag); /** Le document a-t-il été modifié ?*/ ! bool GetModifiedFlag()const; /** Fixe le chemin du document.*/ --- 231,235 ---- void SetModifiedFlag(bool bFlag); /** Le document a-t-il été modifié ?*/ ! virtual bool GetModifiedFlag()const; /** Fixe le chemin du document.*/ *************** *** 283,287 **** /** Prétraitement du document avant écriture des données dans une archive. * A dériver pour sauvegarder les données du document dans le fichier. ! * Note : la fonction de base force enregistre les données depuis le fichier spécifié via la fonction SaveDocument modifie le drapeau de modification. * @return Retourne false si l'enregistrement du document a échouée.*/ virtual bool OnSaveDocument(FilePath strDocumentPath); --- 283,287 ---- /** Prétraitement du document avant écriture des données dans une archive. * A dériver pour sauvegarder les données du document dans le fichier. ! * Note : la fonction de base enregistre les données depuis le fichier spécifié via la fonction SaveDocument modifie le drapeau de modification. * @return Retourne false si l'enregistrement du document a échouée.*/ virtual bool OnSaveDocument(FilePath strDocumentPath); *************** *** 685,694 **** --- 685,717 ---- wxCommandProcessor m_CommandProcessor; + /** Surcharge du processus de sauvegarde. + * Utilisée pour fixer le SaveFlag de l'exécuteur de commandes.*/ + virtual bool OnSaveDocument(FilePath strDocumentPath); + public: ActionDocument(int maxCommands = -1); virtual ~ActionDocument(); + + /** Le document a-t-il été modifié ?*/ + virtual bool GetModifiedFlag()const{return m_CommandProcessor.IsDirty();} + /** Retourne l'exécuteur de commandes.*/ wxCommandProcessor& GetCommandProcessor(){return m_CommandProcessor;} + + /** Ajoute une action. + * A joute et exécute l'action. + * @param action Action à ajouter.*/ + virtual bool Do(wxCommand *command, bool storeIt = true){return m_CommandProcessor.Submit(command, storeIt);} + /** Teste si la dernière action peut être annulée.*/ + virtual bool CanUndo(){return m_CommandProcessor.CanUndo();} + /** Annule la dernière action.*/ + virtual bool Undo(){return m_CommandProcessor.Undo();} + /** Teste si la dernière action annullée peut être ré-exécutée.*/ + virtual bool CanRedo(){return m_CommandProcessor.CanRedo();} + /** Ré-exécute la dernière action.*/ + virtual bool Redo(){return m_CommandProcessor.Redo();} + /** Efface la liste des actions a annuler.*/ + virtual void ClearCommands(){return m_CommandProcessor.ClearCommands();} }; |
|
From: Emilien K. <cur...@us...> - 2005-04-04 10:26:09
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20642/src Modified Files: Application.cpp MainFrame.cpp Log Message: Changement mineurs de positionnement initial des workbars. Index: Application.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Application.cpp 4 Apr 2005 08:11:22 -0000 1.21 --- Application.cpp 4 Apr 2005 10:25:53 -0000 1.22 *************** *** 46,64 **** using namespace wxDevCenter; - - class TestBar : public WorkBar - { - DECLARE_DYNAMIC_CLASS(TestBar); - public: - virtual bool Create(wxWindow* parent) - { - WorkBar::Create(parent); - new wxButton(this, 6000, wxT("Blablabla")); - return true; - } - }; - - IMPLEMENT_DYNAMIC_CLASS(TestBar, WorkBar) - BEGIN_EVENT_TABLE(Application, wxApp) EVT_MENU(wxID_EXIT, Application::OnExitMenu) --- 46,49 ---- *************** *** 66,70 **** - bool Application::OnInit(void) { --- 51,54 ---- *************** *** 110,116 **** wxGetApp().GetWorkBarManager().RegisterFrame(m_pMainFrame); - // Test des worksbars. - m_WorkBarManager.RegisterWorkBar(CLASSINFO(TestBar), "tchock !", ""); - // Lance l'application. return true; --- 94,97 ---- Index: MainFrame.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/MainFrame.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** MainFrame.cpp 4 Apr 2005 08:11:23 -0000 1.13 --- MainFrame.cpp 4 Apr 2005 10:25:53 -0000 1.14 *************** *** 467,474 **** pWorkBar->Create(this); // drop in some bars ! cbDimInfo sizes( 160, 220, // when docked horizontally ! 220, 160, // when docked vertically ! 160, 220, // when floated FALSE, // the bar is not fixed-size 4, // vertical gap (bar border) --- 467,476 ---- pWorkBar->Create(this); + wxSize sz = pWorkBar->GetMinSize(); + // drop in some bars ! cbDimInfo sizes( sz.x, sz.y, // when docked horizontally ! sz.x, sz.y, // when docked vertically ! sz.x, sz.y, // when floated FALSE, // the bar is not fixed-size 4, // vertical gap (bar border) |
|
From: Emilien K. <cur...@us...> - 2005-04-04 09:18:48
|
Update of /cvsroot/wxdevcenter/StdPlugin/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30960/src Modified Files: BitmapDocView.cpp Controls.cpp StdPlugin.cpp Log Message: Passage de la barre de gestion des couleurs de la vue d'édition de bitmaps en workbar. Index: Controls.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/Controls.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Controls.cpp 23 Feb 2005 09:16:46 -0000 1.7 --- Controls.cpp 4 Apr 2005 09:18:30 -0000 1.8 *************** *** 154,157 **** --- 154,158 ---- wxCommandEvent evt(wxEVT_COMMAND_TEXT_UPDATED, GetId()); evt.SetString(GetLabel()); + evt.SetClientData(&col); GetParent()->ProcessEvent(evt); } Index: BitmapDocView.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/BitmapDocView.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** BitmapDocView.cpp 16 Mar 2005 14:26:35 -0000 1.21 --- BitmapDocView.cpp 4 Apr 2005 09:18:30 -0000 1.22 *************** *** 21,24 **** --- 21,270 ---- ////////////////////////////////////////////////////////////////////// + // Global data and definitions. + ////////////////////////////////////////////////////////////////////// + + + int g_NbDefaultColor = 8*11; + wxColor g_DefaultPalette[WXDC_BITMAP_PALETTE_SIZE] = { + wxColour(000, 000, 000), wxColour(128, 000, 000), wxColour(000, 128, 000), wxColour(128, 128, 000), + wxColour(000, 000, 128), wxColour(128, 000, 128), wxColour(000, 128, 128), wxColour(192, 192, 192), + + wxColour(128, 128, 128), wxColour(255, 000, 000), wxColour(000, 255, 000), wxColour(255, 255, 000), + wxColour(000, 000, 255), wxColour(255, 000, 255), wxColour(000, 255, 255), wxColour(255, 255, 255), + + wxColour( 38, 38, 38), wxColour( 76, 76, 76), wxColour(102, 102, 102), wxColour(128, 128, 128), + wxColour(153, 153, 153), wxColour(178, 178, 178), wxColour(204, 204, 204), wxColour(230, 230, 230), + + wxColour( 76, 000, 000), wxColour(127, 000, 000), wxColour(178, 000, 000), wxColour(229, 000, 000), + wxColour(255, 25, 25), wxColour(255, 76, 76), wxColour(255, 127, 127), wxColour(255, 178, 178), + + wxColour( 76, 57, 000), wxColour(127, 95, 000), wxColour(178, 133, 000), wxColour(229, 172, 000), + wxColour(255, 197, 25), wxColour(255, 210, 76), wxColour(255, 223, 127), wxColour(255, 255, 178), + + wxColour( 38, 76, 000), wxColour( 63, 127, 000), wxColour( 89, 178, 102), wxColour(114, 229, 000), + wxColour(140, 255, 025), wxColour(165, 255, 076), wxColour(191, 255, 127), wxColour(216, 255, 178), + + wxColour(000, 76, 19), wxColour(000, 127, 31), wxColour(000, 178, 44), wxColour(000, 229, 57), + wxColour( 25, 255, 82), wxColour( 76, 255, 121), wxColour(127, 255, 159), wxColour(178, 255, 197), + + wxColour(000, 76, 76), wxColour(000, 127, 127), wxColour(000, 178, 178), wxColour(000, 229, 229), + wxColour( 25, 255, 255), wxColour( 76, 255, 255), wxColour(127, 255, 255), wxColour(178, 255, 255), + + wxColour(000, 19, 76), wxColour(000, 31, 127), wxColour(000, 44, 178), wxColour(000, 57, 229), + wxColour( 25, 82, 255), wxColour( 76, 121, 255), wxColour(127, 159, 255), wxColour(178, 197, 255), + + wxColour( 38, 000, 76), wxColour( 63, 000, 127), wxColour( 89, 000, 178), wxColour(114, 000, 228), + wxColour(140, 25, 255), wxColour(165, 76, 255), wxColour(191, 127, 255), wxColour(216, 178, 255), + + wxColour( 76, 000, 57), wxColour(127, 000, 95), wxColour(178, 000, 133), wxColour(229, 000, 172), + wxColour(255, 25, 197), wxColour(255, 76, 210), wxColour(255, 127, 223), wxColour(255, 178, 235) + }; + + + #define IDM_VIEW_CENTER 6000 + #define IDM_VIEW_EXTRASCROLL 6001 + + #define ID_BITMAP_CTRL 101 + #define ID_PANEL_CTRL 102 + #define ID_TOOL_CTRL 103 + #define ID_PEN_CTRL 104 + + #define ID_TOOL_NONE (IDM_VIEW_MIN + 200) + #define ID_TOOL_HANDDRAW (IDM_VIEW_MIN + 201) + #define ID_TOOL_SPRAY (IDM_VIEW_MIN + 202) + #define ID_TOOL_LINE (IDM_VIEW_MIN + 203) + #define ID_TOOL_RECT (IDM_VIEW_MIN + 204) + #define ID_TOOL_ELLIPSE (IDM_VIEW_MIN + 205) + #define ID_TOOL_RRECT (IDM_VIEW_MIN + 206) + #define ID_TOOL_SELECTION (IDM_VIEW_MIN + 207) + #define ID_TOOL_SELALL (IDM_VIEW_MIN + 208) + #define ID_TOOL_SELMOVE (IDM_VIEW_MIN + 209) + #define ID_TOOL_SELREMOVE (IDM_VIEW_MIN + 210) + #define ID_TOOL_SELCUT (IDM_VIEW_MIN + 211) + #define ID_TOOL_SELCOPY (IDM_VIEW_MIN + 212) + #define ID_TOOL_SELPASTE (IDM_VIEW_MIN + 213) + #define ID_TOOL_SIZEALL (IDM_VIEW_MIN + 214) + + #define ID_TOOL_FIRST ID_TOOL_NONE + #define ID_TOOL_LAST ID_TOOL_SIZEALL + + #define ID_PEN_SIZE (IDM_VIEW_MIN + 250) + #define ID_PEN_SOLID (IDM_VIEW_MIN + 260) + #define ID_PEN_TRANSPARENT (IDM_VIEW_MIN + 261) + #define ID_PEN_DOT (IDM_VIEW_MIN + 262) + #define ID_PEN_LONG_DASH (IDM_VIEW_MIN + 263) + #define ID_PEN_SHORT_DASH (IDM_VIEW_MIN + 264) + #define ID_PEN_DOT_DASH (IDM_VIEW_MIN + 265) + + #define ID_PEN_STYLE_FIRST ID_PEN_SOLID + #define ID_PEN_STYLE_LAST ID_PEN_DOT_DASH + + #define ID_COLOR_CURSOR_LEFT 301 + #define ID_COLOR_CURSOR_RIGHT 302 + #define ID_COLOR_SLIDER_RED 303 + #define ID_COLOR_SLIDER_GREEN 304 + #define ID_COLOR_SLIDER_BLUE 305 + #define ID_COLOR_HTML 306 + + #define ID_COLOR_PALETTE_START 310 + #define ID_COLOR_PALETTE_END (ID_COLOR_PALETTE_START+WXDC_BITMAP_PALETTE_SIZE) + + + ////////////////////////////////////////////////////////////////////// + // BitmapWorkBar + ////////////////////////////////////////////////////////////////////// + + IMPLEMENT_DYNAMIC_CLASS(BitmapWorkBar, WorkBar) + + BEGIN_EVENT_TABLE(BitmapWorkBar, WorkBar) + EVT_COMMAND_RANGE(ID_COLOR_PALETTE_START, ID_COLOR_PALETTE_END, wxEVT_COMMAND_LEFT_CLICK, BitmapWorkBar::OnColorPaletteLeftClick) + EVT_COMMAND_RANGE(ID_COLOR_PALETTE_START, ID_COLOR_PALETTE_END, wxEVT_COMMAND_RIGHT_CLICK, BitmapWorkBar::OnColorPaletteRightClick) + + EVT_COMMAND_LEFT_CLICK(ID_COLOR_CURSOR_LEFT, BitmapWorkBar::OnColorLeftClick) + EVT_COMMAND_LEFT_CLICK(ID_COLOR_CURSOR_RIGHT, BitmapWorkBar::OnColorRightClick) + + EVT_TEXT(ID_COLOR_SLIDER_RED, BitmapWorkBar::OnSliderSpinTextChanged) + EVT_TEXT(ID_COLOR_SLIDER_GREEN, BitmapWorkBar::OnSliderSpinTextChanged) + EVT_TEXT(ID_COLOR_SLIDER_BLUE, BitmapWorkBar::OnSliderSpinTextChanged) + END_EVENT_TABLE() + + + bool BitmapWorkBar::Create(wxWindow* parent) + { + if(!WorkBar::Create(parent)) + return false; + + Show(false); + + wxSizer *pGlobalSizer = new wxBoxSizer(wxVERTICAL), + *pHSizer; + + // Liste de couleurs + pHSizer = new wxGridSizer(WXDC_BITMAP_PALETTE_HEIGHT, WXDC_BITMAP_PALETTE_WIDTH, 0, 0); + for(int i=0; i<WXDC_BITMAP_PALETTE_SIZE; i++) + { + m_pColourArray[i] = new wxColourCtrl(this, ID_COLOR_PALETTE_START+i, wxColour(255, 0, 0), wxDefaultPosition, wxSize(-1, 32), wxCOL_PICK_ON_DBLCLIC|wxSUNKEN_BORDER); + pHSizer->Add(m_pColourArray[i], 1, wxGROW); + pHSizer->SetItemMinSize(i, 16, 16); + if(i<g_NbDefaultColor) + m_pColourArray[i]->SetColour(g_DefaultPalette[i]); + } + pGlobalSizer->Add(pHSizer, 0, wxGROW); + + pGlobalSizer->AddSpacer(8); + + + // Deux boutons curseur + pHSizer = new wxBoxSizer(wxHORIZONTAL); + m_pColourLeftButton = new wxColourCtrl(this, ID_COLOR_CURSOR_LEFT, wxColour(255, 0, 0), wxDefaultPosition, wxSize(-1, 32), wxCOL_PICK_ON_DBLCLIC|wxSUNKEN_BORDER); + m_pColourRightButton = new wxColourCtrl(this, ID_COLOR_CURSOR_RIGHT, wxColour(0, 255, 0), wxDefaultPosition, wxSize(-1, 32), wxCOL_PICK_ON_DBLCLIC|wxSTATIC_BORDER); + pHSizer->Add(m_pColourLeftButton, 1, wxALL, 2); + pHSizer->Add(m_pColourRightButton, 1, wxALL, 2); + pHSizer->SetItemMinSize((size_t)0, -1, 32); + pHSizer->SetItemMinSize((size_t)1, -1, 32); + pGlobalSizer->Add(pHSizer, 0, wxGROW); + + pGlobalSizer->AddSpacer(8); + + + // SlideSpin + m_pRedSSC = new wxSliderSpinCtrl(this, ID_COLOR_SLIDER_RED, 0, 0, 255); + m_pGreenSSC = new wxSliderSpinCtrl(this, ID_COLOR_SLIDER_GREEN, 0, 0, 255); + m_pBlueSSC = new wxSliderSpinCtrl(this, ID_COLOR_SLIDER_BLUE, 0, 0, 255); + + m_pRedSSC->SetBackgroundColour(wxColour(255, 192, 192)); + m_pGreenSSC->SetBackgroundColour(wxColour(192, 255, 192)); + m_pBlueSSC->SetBackgroundColour(wxColour(192, 192, 255)); + + pGlobalSizer->Add(m_pRedSSC, 0, wxGROW|wxALL, 4); + pGlobalSizer->Add(m_pGreenSSC, 0, wxGROW|wxALL, 4); + pGlobalSizer->Add(m_pBlueSSC, 0, wxGROW|wxALL, 4); + + // Couleur HTML + m_pHTMLColor = new wxTextCtrl(this, ID_COLOR_HTML, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY); + pHSizer = new wxBoxSizer(wxHORIZONTAL); + pHSizer->Add(new wxStaticText(this, -1, WXDC_BITMAP_LABEL_HTML), 0, wxALIGN_CENTER_VERTICAL); + pHSizer->Add(m_pHTMLColor, 1, wxGROW); + pGlobalSizer->Add(pHSizer, 0, wxGROW|wxALL, 4); + + SetSizerAndFit(pGlobalSizer); + + SetRightColor(wxColour(255, 255, 255)); + SetLeftColor(wxColour(0, 0, 0)); + + Show(true); + return true; + } + + + // Interception du changement de controle de couleur actif sur bouton gauche. + void BitmapWorkBar::OnColorPaletteLeftClick(wxCommandEvent& event) + { + wxColourCtrl *pCol = m_pColourArray[event.GetId()-ID_COLOR_PALETTE_START]; + SetLeftColor(pCol->GetColour()); + } + + // Interception du changement de controle de couleur actif sur bouton droit. + void BitmapWorkBar::OnColorPaletteRightClick(wxCommandEvent& event) + { + wxColourCtrl *pCol = m_pColourArray[event.GetId()-ID_COLOR_PALETTE_START]; + SetRightColor(pCol->GetColour()); + } + + // Interception du click sur le bouton gauche. + void BitmapWorkBar::OnColorLeftClick(wxCommandEvent& WXUNUSED(event)) + { + SetActiveColorCtrl(m_pColourLeftButton); + } + + // Interception du click sur le bouton droit. + void BitmapWorkBar::OnColorRightClick(wxCommandEvent& WXUNUSED(event)) + { + SetActiveColorCtrl(m_pColourRightButton); + } + + // Fixe la couleur gauche. + void BitmapWorkBar::SetLeftColor(wxColour col) + { + m_pColourLeftButton->SetColour(col); + SetActiveColorCtrl(m_pColourLeftButton); + } + + // Fixe la couleur droite. + void BitmapWorkBar::SetRightColor(wxColour col) + { + m_pColourRightButton->SetColour(col); + SetActiveColorCtrl(m_pColourRightButton); + } + + // Fixe le controle de couleur actif. + void BitmapWorkBar::SetActiveColorCtrl(wxColourCtrl* pColor) + { + m_pColourSelected = pColor; + + wxColour col = pColor->GetColour(); + + m_pRedSSC->SetValue(col.Red()); + m_pGreenSSC->SetValue(col.Green()); + m_pBlueSSC->SetValue(col.Blue()); + + m_pHTMLColor->SetValue(wxString::Format(wxT("%02X%02X%02X"), (int)col.Red(), (int)col.Green(), (int)col.Blue())); + } + + // Intercepte le changement de couleur des wxSliderSpinCtrl. + void BitmapWorkBar::OnSliderSpinTextChanged(wxCommandEvent& WXUNUSED(event)) + { + wxColor col((unsigned char)m_pRedSSC->GetValue(), + (unsigned char)m_pGreenSSC->GetValue(), + (unsigned char)m_pBlueSSC->GetValue()); + m_pColourSelected->SetColour(col); + m_pHTMLColor->SetValue(wxString::Format(wxT("%02X%02X%02X"), (int)col.Red(), (int)col.Green(), (int)col.Blue())); + } + + + + + + ////////////////////////////////////////////////////////////////////// // BitmapDocument ////////////////////////////////////////////////////////////////////// *************** *** 27,30 **** --- 273,280 ---- IMPLEMENT_DYNAMIC_CLASS(BitmapDocument, wxDevCenter::Document) + BEGIN_EVENT_TABLE(BitmapDocument, wxDevCenter::Document) + END_EVENT_TABLE() + + BitmapDocument::BitmapDocument(): Document() *************** *** 245,296 **** ////////////////////////////////////////////////////////////////////// - #define IDM_VIEW_CENTER 6000 - #define IDM_VIEW_EXTRASCROLL 6001 - - #define ID_BITMAP_CTRL 101 - #define ID_PANEL_CTRL 102 - #define ID_TOOL_CTRL 103 - #define ID_PEN_CTRL 104 - - #define ID_TOOL_NONE (IDM_VIEW_MIN + 200) - #define ID_TOOL_HANDDRAW (IDM_VIEW_MIN + 201) - #define ID_TOOL_SPRAY (IDM_VIEW_MIN + 202) - #define ID_TOOL_LINE (IDM_VIEW_MIN + 203) - #define ID_TOOL_RECT (IDM_VIEW_MIN + 204) - #define ID_TOOL_ELLIPSE (IDM_VIEW_MIN + 205) - #define ID_TOOL_RRECT (IDM_VIEW_MIN + 206) - #define ID_TOOL_SELECTION (IDM_VIEW_MIN + 207) - #define ID_TOOL_SELALL (IDM_VIEW_MIN + 208) - #define ID_TOOL_SELMOVE (IDM_VIEW_MIN + 209) - #define ID_TOOL_SELREMOVE (IDM_VIEW_MIN + 210) - #define ID_TOOL_SELCUT (IDM_VIEW_MIN + 211) - #define ID_TOOL_SELCOPY (IDM_VIEW_MIN + 212) - #define ID_TOOL_SELPASTE (IDM_VIEW_MIN + 213) - #define ID_TOOL_SIZEALL (IDM_VIEW_MIN + 214) - - #define ID_TOOL_FIRST ID_TOOL_NONE - #define ID_TOOL_LAST ID_TOOL_SIZEALL - - #define ID_PEN_SIZE (IDM_VIEW_MIN + 250) - #define ID_PEN_SOLID (IDM_VIEW_MIN + 260) - #define ID_PEN_TRANSPARENT (IDM_VIEW_MIN + 261) - #define ID_PEN_DOT (IDM_VIEW_MIN + 262) - #define ID_PEN_LONG_DASH (IDM_VIEW_MIN + 263) - #define ID_PEN_SHORT_DASH (IDM_VIEW_MIN + 264) - #define ID_PEN_DOT_DASH (IDM_VIEW_MIN + 265) - - #define ID_PEN_STYLE_FIRST ID_PEN_SOLID - #define ID_PEN_STYLE_LAST ID_PEN_DOT_DASH - - #define ID_COLOR_CURSOR_LEFT 301 - #define ID_COLOR_CURSOR_RIGHT 302 - #define ID_COLOR_SLIDER_RED 303 - #define ID_COLOR_SLIDER_GREEN 304 - #define ID_COLOR_SLIDER_BLUE 305 - #define ID_COLOR_HTML 306 - - #define ID_COLOR_PALETTE_START 310 - #define ID_COLOR_PALETTE_END (ID_COLOR_PALETTE_START+WXDC_BITMAP_PALETTE_SIZE) - IMPLEMENT_DYNAMIC_CLASS(BitmapView, View) --- 495,498 ---- *************** *** 306,322 **** EVT_EXTMOUSE_LEFT_END_DRAG(ID_BITMAP_CTRL, BitmapView::OnLeftDragEnd) - EVT_COMMAND_RANGE(ID_COLOR_PALETTE_START, ID_COLOR_PALETTE_END, wxEVT_COMMAND_LEFT_CLICK, BitmapView::OnColorPaletteLeftClick) - EVT_COMMAND_RANGE(ID_COLOR_PALETTE_START, ID_COLOR_PALETTE_END, wxEVT_COMMAND_RIGHT_CLICK, BitmapView::OnColorPaletteRightClick) - EVT_COLOUR(ID_COLOR_CURSOR_LEFT, BitmapView::OnSelLeftColourChanged) EVT_COLOUR(ID_COLOR_CURSOR_RIGHT, BitmapView::OnSelRightColourChanged) - EVT_COMMAND_LEFT_CLICK(ID_COLOR_CURSOR_LEFT, BitmapView::OnColorLeftClick) - EVT_COMMAND_LEFT_CLICK(ID_COLOR_CURSOR_RIGHT, BitmapView::OnColorRightClick) - - EVT_TEXT(ID_COLOR_SLIDER_RED, BitmapView::OnSliderSpinTextChanged) - EVT_TEXT(ID_COLOR_SLIDER_GREEN, BitmapView::OnSliderSpinTextChanged) - EVT_TEXT(ID_COLOR_SLIDER_BLUE, BitmapView::OnSliderSpinTextChanged) - EVT_UPDATE_UI_RANGE(ID_TOOL_FIRST, ID_TOOL_LAST, BitmapView::OnUpdateTools) EVT_TOOL_RANGE(ID_TOOL_FIRST, ID_TOOL_LAST, BitmapView::OnTool) --- 508,514 ---- *************** *** 334,339 **** View(), m_BVD(BVD_NONE), - m_pColourLeftButton(NULL), - m_pColourRightButton(NULL), m_ptSel(wxDefaultPosition) { --- 526,529 ---- *************** *** 389,404 **** wxSizer *pGlobalSizer = new wxBoxSizer(wxHORIZONTAL), *pToolSizer = new wxBoxSizer(wxVERTICAL); - wxPanel* pPanel = CreateColourBar(); pGlobalSizer->Add(m_pBitmapCtrl, 1, wxGROW); - pToolSizer->Add(pPanel, 0, wxGROW); - pToolSizer->SetItemMinSize((size_t)0, 172, -1); - pToolSizer->Add(CreateToolBar(), 0, wxGROW); ! pToolSizer->SetItemMinSize((size_t)1, 172, 82); pToolSizer->Add(CreatePenBar(), 0, wxGROW); ! pToolSizer->SetItemMinSize((size_t)2, 172, -1); --- 579,590 ---- wxSizer *pGlobalSizer = new wxBoxSizer(wxHORIZONTAL), *pToolSizer = new wxBoxSizer(wxVERTICAL); pGlobalSizer->Add(m_pBitmapCtrl, 1, wxGROW); pToolSizer->Add(CreateToolBar(), 0, wxGROW); ! pToolSizer->SetItemMinSize((size_t)0, 172, 82); pToolSizer->Add(CreatePenBar(), 0, wxGROW); ! pToolSizer->SetItemMinSize((size_t)0, 172, -1); *************** *** 407,514 **** SetSizerAndFit(pGlobalSizer); - - SetRightColor(wxColour(255, 255, 255)); - SetLeftColor(wxColour(0, 0, 0)); - - return true; } - int g_NbDefaultColor = 8*11; - wxColor g_DefaultPalette[WXDC_BITMAP_PALETTE_SIZE] = { - wxColour(000, 000, 000), wxColour(128, 000, 000), wxColour(000, 128, 000), wxColour(128, 128, 000), - wxColour(000, 000, 128), wxColour(128, 000, 128), wxColour(000, 128, 128), wxColour(192, 192, 192), - - wxColour(128, 128, 128), wxColour(255, 000, 000), wxColour(000, 255, 000), wxColour(255, 255, 000), - wxColour(000, 000, 255), wxColour(255, 000, 255), wxColour(000, 255, 255), wxColour(255, 255, 255), - - wxColour( 38, 38, 38), wxColour( 76, 76, 76), wxColour(102, 102, 102), wxColour(128, 128, 128), - wxColour(153, 153, 153), wxColour(178, 178, 178), wxColour(204, 204, 204), wxColour(230, 230, 230), - - wxColour( 76, 000, 000), wxColour(127, 000, 000), wxColour(178, 000, 000), wxColour(229, 000, 000), - wxColour(255, 25, 25), wxColour(255, 76, 76), wxColour(255, 127, 127), wxColour(255, 178, 178), - - wxColour( 76, 57, 000), wxColour(127, 95, 000), wxColour(178, 133, 000), wxColour(229, 172, 000), - wxColour(255, 197, 25), wxColour(255, 210, 76), wxColour(255, 223, 127), wxColour(255, 255, 178), - - wxColour( 38, 76, 000), wxColour( 63, 127, 000), wxColour( 89, 178, 102), wxColour(114, 229, 000), - wxColour(140, 255, 025), wxColour(165, 255, 076), wxColour(191, 255, 127), wxColour(216, 255, 178), - - wxColour(000, 76, 19), wxColour(000, 127, 31), wxColour(000, 178, 44), wxColour(000, 229, 57), - wxColour( 25, 255, 82), wxColour( 76, 255, 121), wxColour(127, 255, 159), wxColour(178, 255, 197), - - wxColour(000, 76, 76), wxColour(000, 127, 127), wxColour(000, 178, 178), wxColour(000, 229, 229), - wxColour( 25, 255, 255), wxColour( 76, 255, 255), wxColour(127, 255, 255), wxColour(178, 255, 255), - - wxColour(000, 19, 76), wxColour(000, 31, 127), wxColour(000, 44, 178), wxColour(000, 57, 229), - wxColour( 25, 82, 255), wxColour( 76, 121, 255), wxColour(127, 159, 255), wxColour(178, 197, 255), - - wxColour( 38, 000, 76), wxColour( 63, 000, 127), wxColour( 89, 000, 178), wxColour(114, 000, 228), - wxColour(140, 25, 255), wxColour(165, 76, 255), wxColour(191, 127, 255), wxColour(216, 178, 255), - - wxColour( 76, 000, 57), wxColour(127, 000, 95), wxColour(178, 000, 133), wxColour(229, 000, 172), - wxColour(255, 25, 197), wxColour(255, 76, 210), wxColour(255, 127, 223), wxColour(255, 178, 235) - }; - - - - // Création de la barre de couleurs. - wxPanel* BitmapView::CreateColourBar() - { - wxPanel *pPanel = new wxPanel(this, ID_PANEL_CTRL); - wxSizer *pGlobalSizer = new wxBoxSizer(wxVERTICAL), - *pHSizer; - - // Liste de couleurs - pHSizer = new wxGridSizer(WXDC_BITMAP_PALETTE_HEIGHT, WXDC_BITMAP_PALETTE_WIDTH, 0, 0); - for(int i=0; i<WXDC_BITMAP_PALETTE_SIZE; i++) - { - m_pColourArray[i] = new wxColourCtrl(pPanel, ID_COLOR_PALETTE_START+i, wxColour(255, 0, 0), wxDefaultPosition, wxSize(-1, 32), wxCOL_PICK_ON_DBLCLIC|wxSUNKEN_BORDER); - pHSizer->Add(m_pColourArray[i], 1, wxGROW); - pHSizer->SetItemMinSize(i, 16, 16); - if(i<g_NbDefaultColor) - m_pColourArray[i]->SetColour(g_DefaultPalette[i]); - } - pGlobalSizer->Add(pHSizer, 0, wxGROW); - - pGlobalSizer->AddSpacer(8); - - - // Deux boutons curseur - pHSizer = new wxBoxSizer(wxHORIZONTAL); - m_pColourLeftButton = new wxColourCtrl(pPanel, ID_COLOR_CURSOR_LEFT, wxColour(255, 0, 0), wxDefaultPosition, wxSize(-1, 32), wxCOL_PICK_ON_DBLCLIC|wxSUNKEN_BORDER); - m_pColourRightButton = new wxColourCtrl(pPanel, ID_COLOR_CURSOR_RIGHT, wxColour(0, 255, 0), wxDefaultPosition, wxSize(-1, 32), wxCOL_PICK_ON_DBLCLIC|wxSTATIC_BORDER); - pHSizer->Add(m_pColourLeftButton, 1, wxALL, 2); - pHSizer->Add(m_pColourRightButton, 1, wxALL, 2); - pHSizer->SetItemMinSize((size_t)0, -1, 32); - pHSizer->SetItemMinSize((size_t)1, -1, 32); - pGlobalSizer->Add(pHSizer, 0, wxGROW); - - pGlobalSizer->AddSpacer(8); - - - // SlideSpin - m_pRedSSC = new wxSliderSpinCtrl(pPanel, ID_COLOR_SLIDER_RED, 0, 0, 255); - m_pGreenSSC = new wxSliderSpinCtrl(pPanel, ID_COLOR_SLIDER_GREEN, 0, 0, 255); - m_pBlueSSC = new wxSliderSpinCtrl(pPanel, ID_COLOR_SLIDER_BLUE, 0, 0, 255); - - m_pRedSSC->SetBackgroundColour(wxColour(255, 192, 192)); - m_pGreenSSC->SetBackgroundColour(wxColour(192, 255, 192)); - m_pBlueSSC->SetBackgroundColour(wxColour(192, 192, 255)); - - pGlobalSizer->Add(m_pRedSSC, 0, wxGROW|wxALL, 4); - pGlobalSizer->Add(m_pGreenSSC, 0, wxGROW|wxALL, 4); - pGlobalSizer->Add(m_pBlueSSC, 0, wxGROW|wxALL, 4); - - // Couleur HTML - m_pHTMLColor = new wxTextCtrl(pPanel, ID_COLOR_HTML, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY); - pHSizer = new wxBoxSizer(wxHORIZONTAL); - pHSizer->Add(new wxStaticText(pPanel, -1, WXDC_BITMAP_LABEL_HTML), 0, wxALIGN_CENTER_VERTICAL); - pHSizer->Add(m_pHTMLColor, 1, wxGROW); - pGlobalSizer->Add(pHSizer, 0, wxGROW|wxALL, 4); - - pPanel->SetSizerAndFit(pGlobalSizer); - return pPanel; - } // Création de la barre d'outil. --- 593,599 ---- *************** *** 618,702 **** - // Interception du changement de controle de couleur actif sur bouton gauche. - void BitmapView::OnColorPaletteLeftClick(wxCommandEvent& event) - { - wxColourCtrl *pCol = m_pColourArray[event.GetId()-ID_COLOR_PALETTE_START]; - SetLeftColor(pCol->GetColour()); - } - - // Interception du changement de controle de couleur actif sur bouton droit. - void BitmapView::OnColorPaletteRightClick(wxCommandEvent& event) - { - wxColourCtrl *pCol = m_pColourArray[event.GetId()-ID_COLOR_PALETTE_START]; - SetRightColor(pCol->GetColour()); - } - - // Interception du click sur le bouton gauche. - void BitmapView::OnColorLeftClick(wxCommandEvent& WXUNUSED(event)) - { - SetActiveColorCtrl(m_pColourLeftButton); - } - - // Interception du click sur le bouton droit. - void BitmapView::OnColorRightClick(wxCommandEvent& WXUNUSED(event)) - { - SetActiveColorCtrl(m_pColourRightButton); - } - - // Fixe la couleur gauche. - void BitmapView::SetLeftColor(wxColour col) - { - m_pColourLeftButton->SetColour(col); - SetActiveColorCtrl(m_pColourLeftButton); - m_Pen.SetColour(col); - } - - // Fixe la couleur droite. - void BitmapView::SetRightColor(wxColour col) - { - m_pColourRightButton->SetColour(col); - SetActiveColorCtrl(m_pColourRightButton); - m_Brush.SetColour(col); - } - - // Fixe le controle de couleur actif. - void BitmapView::SetActiveColorCtrl(wxColourCtrl* pColor) - { - m_pColourSelected = pColor; - - wxColour col = pColor->GetColour(); - - m_pRedSSC->SetValue(col.Red()); - m_pGreenSSC->SetValue(col.Green()); - m_pBlueSSC->SetValue(col.Blue()); - - m_pHTMLColor->SetValue(wxString::Format(wxT("%02X%02X%02X"), (int)col.Red(), (int)col.Green(), (int)col.Blue())); - } - - // Intercepte le changement de couleur des wxSliderSpinCtrl. - void BitmapView::OnSliderSpinTextChanged(wxCommandEvent& WXUNUSED(event)) - { - wxColor col((unsigned char)m_pRedSSC->GetValue(), - (unsigned char)m_pGreenSSC->GetValue(), - (unsigned char)m_pBlueSSC->GetValue()); - m_pColourSelected->SetColour(col); - m_pHTMLColor->SetValue(wxString::Format(wxT("%02X%02X%02X"), (int)col.Red(), (int)col.Green(), (int)col.Blue())); - } // Intercepte le changement de couleur de la sélection gauche. ! void BitmapView::OnSelLeftColourChanged(wxCommandEvent& WXUNUSED(event)) { ! if(m_pColourLeftButton) ! m_Pen.SetColour(m_pColourLeftButton->GetColour()); } // Intercepte le changement de couleur de la sélection droite. ! void BitmapView::OnSelRightColourChanged(wxCommandEvent& WXUNUSED(event)) { ! if(m_pColourRightButton) ! m_Brush.SetColour(m_pColourLeftButton->GetColour()); } - // Création de la barre de pinceau. wxPanel* BitmapView::CreatePenBar() --- 703,723 ---- // Intercepte le changement de couleur de la sélection gauche. ! void BitmapView::OnSelLeftColourChanged(wxCommandEvent& event) { ! wxColour* pCol = (wxColour*) event.GetClientData(); ! if(pCol!=NULL) ! m_Pen.SetColour(*pCol); } // Intercepte le changement de couleur de la sélection droite. ! void BitmapView::OnSelRightColourChanged(wxCommandEvent& event) { ! wxColour* pCol = (wxColour*) event.GetClientData(); ! if(pCol!=NULL) ! m_Brush.SetColour(*pCol); } // Création de la barre de pinceau. wxPanel* BitmapView::CreatePenBar() Index: StdPlugin.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/StdPlugin.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StdPlugin.cpp 4 Mar 2005 16:35:17 -0000 1.4 --- StdPlugin.cpp 4 Apr 2005 09:18:30 -0000 1.5 *************** *** 70,73 **** --- 70,76 ---- { LoadPreferences(); + + // Enregistrement de la WorkBar de dessin. + wxGetApp().GetWorkBarManager().RegisterWorkBar(CLASSINFO(BitmapWorkBar), "Bitmap colors", "Palette of colors for bitmap edition."); } |
|
From: Emilien K. <cur...@us...> - 2005-04-04 09:18:48
|
Update of /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30960/include/wxDevCenter/StdPlugin Modified Files: BitmapDocView.h Log Message: Passage de la barre de gestion des couleurs de la vue d'édition de bitmaps en workbar. Index: BitmapDocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/BitmapDocView.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** BitmapDocView.h 7 Mar 2005 15:23:53 -0000 1.16 --- BitmapDocView.h 4 Apr 2005 09:18:29 -0000 1.17 *************** *** 17,20 **** --- 17,21 ---- #include <wxDevCenter/DocView.h> + #include <wxDevCenter/WorkBar.h> #include <wxDevCenter/StdPlugin/BitmapCtrl.h> #include <wxDevCenter/StdPlugin/extmouse.h> *************** *** 40,47 **** --- 41,106 ---- + #define WXDC_BITMAP_PALETTE_WIDTH 8 + #define WXDC_BITMAP_PALETTE_HEIGHT 11 + #define WXDC_BITMAP_PALETTE_SIZE (WXDC_BITMAP_PALETTE_WIDTH*WXDC_BITMAP_PALETTE_HEIGHT) + + + + /** Work bar de manipulation des couleurs.*/ + class BitmapWorkBar : public wxDevCenter::WorkBar + { + DECLARE_DYNAMIC_CLASS(BitmapWorkBar); + DECLARE_EVENT_TABLE(); + protected: + /** Controle de couleur du bouton gauche.*/ + wxColourCtrl* m_pColourLeftButton; + /** Controle de couleur du bouton droit.*/ + wxColourCtrl* m_pColourRightButton; + + /** Tableau de couleurs utilisateurs.*/ + wxColourCtrl* m_pColourArray[WXDC_BITMAP_PALETTE_SIZE]; + + /** Controle de couleur actuellement sélectionné.*/ + wxColourCtrl* m_pColourSelected; + + /** SliderSpin rouge*/ + wxSliderSpinCtrl* m_pRedSSC; + /** SliderSpin vert*/ + wxSliderSpinCtrl* m_pGreenSSC; + /** SliderSpin bleu*/ + wxSliderSpinCtrl* m_pBlueSSC; + /** Entrée couleur HTML.*/ + wxTextCtrl* m_pHTMLColor; + + /** Interception du changement de controle de couleur actif sur bouton gauche.*/ + void OnColorPaletteLeftClick(wxCommandEvent& event); + /** Interception du changement de controle de couleur actif sur bouton droit.*/ + void OnColorPaletteRightClick(wxCommandEvent& event); + /** Interception du click sur le bouton gauche. */ + void OnColorLeftClick(wxCommandEvent& event); + /** Interception du click sur le bouton droit. */ + void OnColorRightClick(wxCommandEvent& event); + /** Fixe la couleur gauche.*/ + void SetLeftColor(wxColour col); + /** Fixe la couleur droite.*/ + void SetRightColor(wxColour col); + /** Fixe le controle de couleur actif.*/ + void SetActiveColorCtrl(wxColourCtrl* pColor); + /** Intercepte le changement de couleur des wxSliderSpinCtrl.*/ + void OnSliderSpinTextChanged(wxCommandEvent& event); + public: + virtual bool Create(wxWindow* parent); + }; + + + + + class BitmapDocument : public wxDevCenter::Document { + DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(BitmapDocument); protected: + /** Buffer de l'image.*/ wxBitmap m_Bmp; *************** *** 126,132 **** - #define WXDC_BITMAP_PALETTE_WIDTH 8 - #define WXDC_BITMAP_PALETTE_HEIGHT 11 - #define WXDC_BITMAP_PALETTE_SIZE (WXDC_BITMAP_PALETTE_WIDTH*WXDC_BITMAP_PALETTE_HEIGHT) --- 185,188 ---- *************** *** 157,203 **** wxBrush m_Brush; - - /** @name Contrôles de couleurs. - * @{ */ - /** Création de la barre de couleurs.*/ - wxPanel* CreateColourBar(); - /** Controle de couleur du bouton gauche.*/ - wxColourCtrl* m_pColourLeftButton; - /** Controle de couleur du bouton droit.*/ - wxColourCtrl* m_pColourRightButton; - /** Controle de couleur sélectionné pour édition aux sliders.*/ - wxColourCtrl* m_pColourSelected; - /** Tableau de couleurs utilisateurs.*/ - wxColourCtrl* m_pColourArray[WXDC_BITMAP_PALETTE_SIZE]; - /** SliderSpin rouge*/ - wxSliderSpinCtrl* m_pRedSSC; - /** SliderSpin vert*/ - wxSliderSpinCtrl* m_pGreenSSC; - /** SliderSpin bleu*/ - wxSliderSpinCtrl* m_pBlueSSC; - /** Entrée couleur HTML.*/ - wxTextCtrl* m_pHTMLColor; - /** Interception du changement de controle de couleur actif sur bouton gauche.*/ - void OnColorPaletteLeftClick(wxCommandEvent& event); - /** Interception du changement de controle de couleur actif sur bouton droit.*/ - void OnColorPaletteRightClick(wxCommandEvent& event); - /** Interception du click sur le bouton gauche. */ - void OnColorLeftClick(wxCommandEvent& event); - /** Interception du click sur le bouton droit. */ - void OnColorRightClick(wxCommandEvent& event); - /** Fixe la couleur gauche.*/ - void SetLeftColor(wxColour col); - /** Fixe la couleur droite.*/ - void SetRightColor(wxColour col); - /** Fixe le controle de couleur actif.*/ - void SetActiveColorCtrl(wxColourCtrl* pColor); - /** Intercepte le changement de couleur des wxSliderSpinCtrl.*/ - void OnSliderSpinTextChanged(wxCommandEvent& event); /** Intercepte le changement de couleur de la sélection gauche.*/ void OnSelLeftColourChanged(wxCommandEvent& event); /** Intercepte le changement de couleur de la sélection droite.*/ void OnSelRightColourChanged(wxCommandEvent& event); ! /** @}*/ ! /** @name Contrôles d'outils. --- 213,221 ---- wxBrush m_Brush; /** Intercepte le changement de couleur de la sélection gauche.*/ void OnSelLeftColourChanged(wxCommandEvent& event); /** Intercepte le changement de couleur de la sélection droite.*/ void OnSelRightColourChanged(wxCommandEvent& event); ! /** @name Contrôles d'outils. |
|
From: Emilien K. <cur...@us...> - 2005-04-04 08:11:35
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14919/src Modified Files: Application.cpp Document.cpp Frame.cpp MDIFrame.cpp MainFrame.cpp Log Message: Modifie le mécanisme de passage des messages remontants depuis la TopFrame par la vue. Index: Document.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Document.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Document.cpp 1 Apr 2005 20:52:21 -0000 1.6 --- Document.cpp 4 Apr 2005 08:11:22 -0000 1.7 *************** *** 244,253 **** ////////////////////////////////////////////////////////////////////// ! IMPLEMENT_DYNAMIC_CLASS2(wxDevCenter::ActionDocument, wxDevCenter::Document, wxDevCenter::wxCommandProcessor) ActionDocument::ActionDocument(int maxCommands): Document(), ! wxCommandProcessor(maxCommands) { } --- 244,253 ---- ////////////////////////////////////////////////////////////////////// ! IMPLEMENT_DYNAMIC_CLASS(wxDevCenter::ActionDocument, wxDevCenter::Document) ActionDocument::ActionDocument(int maxCommands): Document(), ! m_CommandProcessor(maxCommands) { } Index: Frame.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Frame.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Frame.cpp 1 Apr 2005 19:54:58 -0000 1.6 --- Frame.cpp 4 Apr 2005 08:11:23 -0000 1.7 *************** *** 83,105 **** BEGIN_EVENT_TABLE(wxDevCenter::TopFrame, wxFrame) - EVT_BUTTON(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_MENU(-1, TopFrame::ReprocessCommandEventToViewFrame) - - EVT_CHECKBOX(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_CHOICE(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_LISTBOX(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_LISTBOX_DCLICK(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_SLIDER(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_RADIOBOX(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_RADIOBUTTON(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_SCROLLBAR(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_VLBOX(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_COMBOBOX(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_TOOL(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_TOOL_RCLICKED(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_TOOL_ENTER(-1, TopFrame::ReprocessCommandEventToViewFrame) - EVT_CHECKLISTBOX(-1, TopFrame::ReprocessCommandEventToViewFrame) - - EVT_UPDATE_UI(-1, TopFrame::ReprocessUpdateUIEventToViewFrame) END_EVENT_TABLE() --- 83,86 ---- *************** *** 116,119 **** --- 97,122 ---- } + + // Surcharge le procédé d'exécution des évènements. + bool TopFrame::ProcessEvent(wxEvent& event) + { + static wxRecursionGuardFlag s_flag; + wxRecursionGuard guard(s_flag); + if(guard.IsInside()) + return wxFrame::ProcessEvent(event); + + wxEventType type = event.GetEventType(); + + if(GetViewFrame() && type!=wxEVT_CHILD_FOCUS) + { + if(GetViewFrame()->CanProcessEventFromParent()) + return GetViewFrame()->ProcessEventFromParent(event); + } + + return wxFrame::ProcessEvent(event); + } + + + // Insère le menu spécifique de la vue active. void TopFrame::InsertViewMenu(View* pView) *************** *** 145,171 **** } - // Redirige certains évènements sur la fenetre cadre contenant les vues. - void TopFrame::ReprocessCommandEventToViewFrame(wxCommandEvent& event) - { - // Prévient le rappel apres le passage des évènements dans la vue. - static wxRecursionGuardFlag s_flag; - wxRecursionGuard guard(s_flag); - event.Skip(); - if(guard.IsInside()) - return; - GetViewFrame()->ProcessEventFromParent(event); - } - - // Redirige certains évènements sur la fenetre cadre contenant les vues. - void TopFrame::ReprocessUpdateUIEventToViewFrame(wxUpdateUIEvent& event) - { - // Prévient le rappel apres le passage des évènements dans la vue. - static wxRecursionGuardFlag s_flag; - wxRecursionGuard guard(s_flag); - event.Skip(); - if(guard.IsInside()) - return; - GetViewFrame()->ProcessEventFromParent(event); - } ////////////////////////////////////////////////////////////////////// --- 148,151 ---- Index: Application.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Application.cpp 1 Apr 2005 19:54:58 -0000 1.20 --- Application.cpp 4 Apr 2005 08:11:22 -0000 1.21 *************** *** 61,64 **** --- 61,68 ---- IMPLEMENT_DYNAMIC_CLASS(TestBar, WorkBar) + BEGIN_EVENT_TABLE(Application, wxApp) + EVT_MENU(wxID_EXIT, Application::OnExitMenu) + END_EVENT_TABLE() + *************** *** 82,86 **** m_ConfigManager.CreateUserProfile(); - // Charge les plugins. LoadPlugins(); --- 86,89 ---- *************** *** 127,130 **** --- 130,148 ---- } + + // Interception de la demande de sortie de l'application. + void Application::OnExitMenu(wxCommandEvent& WXUNUSED(event)) + { + wxWindow* pWind = GetTopWindow(); + if(pWind!=NULL) + { + if(pWind->Close()) + { + pWind->Destroy(); + } + } + } + + Application::Application(void): wxApp(), *************** *** 442,449 **** for(unsigned int n=0; n<arFiles.GetCount(); n++) - { - wxLogDebug("Load icon : %s", arFiles[n].GetData()); IB.AddIcon(arFiles[n], wxBITMAP_TYPE_ANY); - } m_IconBundleCache[strIcon] = IB; --- 460,464 ---- Index: MDIFrame.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/MDIFrame.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MDIFrame.cpp 1 Apr 2005 19:54:58 -0000 1.4 --- MDIFrame.cpp 4 Apr 2005 08:11:23 -0000 1.5 *************** *** 207,215 **** // Redirige les évènements intercepté par la fenêtre cadre mère pour les rediriger vers les vues. ! void MDIFrame::ProcessEventFromParent(wxEvent& event) { wxWindow* pPage = GetCurrentPage(); if(pPage) ! pPage->ProcessEvent(event); } --- 207,223 ---- // Redirige les évènements intercepté par la fenêtre cadre mère pour les rediriger vers les vues. ! bool MDIFrame::ProcessEventFromParent(wxEvent& event) { wxWindow* pPage = GetCurrentPage(); if(pPage) ! return pPage->ProcessEvent(event); ! else ! return false; ! } ! ! // Teste si les évènements peuvent être redirigés vers les vues. ! bool MDIFrame::CanProcessEventFromParent() ! { ! return GetCurrentPage()!=NULL; } Index: MainFrame.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/MainFrame.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** MainFrame.cpp 1 Apr 2005 19:54:58 -0000 1.12 --- MainFrame.cpp 4 Apr 2005 08:11:23 -0000 1.13 *************** *** 58,63 **** // Definition des identifiants des menus standards : - #define IDM_APP_EXIT wxID_EXIT - #define IDM_FILE_NEW wxID_NEW #define IDM_FILE_OPEN wxID_OPEN --- 58,61 ---- *************** *** 104,108 **** EVT_VIEW_CHANGED(wxID_ANY, MainFrame::OnCurrentViewChanged) ! EVT_MENU(IDM_APP_EXIT , MainFrame::OnMenuExit) EVT_MENU(IDM_FILE_NEW , MainFrame::OnMenuFileNew) EVT_MENU(IDM_PROJECT_OPEN , MainFrame::OnMenuProjectOpen) --- 102,107 ---- EVT_VIEW_CHANGED(wxID_ANY, MainFrame::OnCurrentViewChanged) ! EVT_MENU(wxID_EXIT, MainFrame::OnMenuFileExit) ! EVT_MENU(IDM_FILE_NEW , MainFrame::OnMenuFileNew) EVT_MENU(IDM_PROJECT_OPEN , MainFrame::OnMenuProjectOpen) *************** *** 136,159 **** EVT_UPDATE_UI(IDM_WINDOW_CLOSE , MainFrame::OnUpdateWhenHasView) EVT_UPDATE_UI(IDM_WINDOW_CLOSEALL , MainFrame::OnUpdateWhenHasView) - - EVT_MENU(IDM_EDIT_UNDO , MainFrame::OnMenuViewCommand) - EVT_MENU(IDM_EDIT_REDO , MainFrame::OnMenuViewCommand) - EVT_MENU(IDM_EDIT_CUT , MainFrame::OnMenuViewCommand) - EVT_MENU(IDM_EDIT_COPY , MainFrame::OnMenuViewCommand) - EVT_MENU(IDM_EDIT_PASTE , MainFrame::OnMenuViewCommand) - EVT_MENU(IDM_EDIT_CLEAR , MainFrame::OnMenuViewCommand) - EVT_MENU(IDM_EDIT_FIND , MainFrame::OnMenuViewCommand) - EVT_MENU(IDM_EDIT_DUPLICATE , MainFrame::OnMenuViewCommand) - EVT_MENU(IDM_EDIT_SELECTALL , MainFrame::OnMenuViewCommand) - - EVT_UPDATE_UI(IDM_EDIT_UNDO , MainFrame::OnUpdateViewCommandUI) - EVT_UPDATE_UI(IDM_EDIT_REDO , MainFrame::OnUpdateViewCommandUI) - EVT_UPDATE_UI(IDM_EDIT_CUT , MainFrame::OnUpdateViewCommandUI) - EVT_UPDATE_UI(IDM_EDIT_COPY , MainFrame::OnUpdateViewCommandUI) - EVT_UPDATE_UI(IDM_EDIT_PASTE , MainFrame::OnUpdateViewCommandUI) - EVT_UPDATE_UI(IDM_EDIT_CLEAR , MainFrame::OnUpdateViewCommandUI) - EVT_UPDATE_UI(IDM_EDIT_FIND , MainFrame::OnUpdateViewCommandUI) - EVT_UPDATE_UI(IDM_EDIT_DUPLICATE , MainFrame::OnUpdateViewCommandUI) - EVT_UPDATE_UI(IDM_EDIT_SELECTALL , MainFrame::OnUpdateViewCommandUI) END_EVENT_TABLE() --- 135,138 ---- *************** *** 199,210 **** void MainFrame::OnClose(wxCloseEvent &event) { ! if(wxGetApp().GetDocManager().CloseAllDocuments()) ! { ! event.Skip(); ! } ! else event.Veto(); } --- 178,192 ---- + void MainFrame::OnMenuFileExit(wxCommandEvent& event) + { + event.Skip(); + } + void MainFrame::OnClose(wxCloseEvent &event) { ! if(!wxGetApp().GetDocManager().CloseAllDocuments()) event.Veto(); + else + Destroy(); } *************** *** 219,228 **** // Commandes des menus : - // Demande la fermeture de la fenetre - void MainFrame::OnMenuExit(wxCommandEvent& WXUNUSED(event)) - { - Close(); - } - // Ouvre un projet void MainFrame::OnMenuProjectOpen(wxCommandEvent& WXUNUSED(event)) --- 201,204 ---- *************** *** 385,389 **** pMenu->Append(IDM_PROJECT_CLOSE, WXDC_MENU_PROJECT_CLOSE); pMenu->AppendSeparator(); ! pMenu->Append(IDM_APP_EXIT, WXDC_MENU_APP_EXIT); pMenuBar->Append(pMenu, WXDC_MENU_FILES); --- 361,365 ---- pMenu->Append(IDM_PROJECT_CLOSE, WXDC_MENU_PROJECT_CLOSE); pMenu->AppendSeparator(); ! pMenu->Append(wxID_EXIT, WXDC_MENU_APP_EXIT); pMenuBar->Append(pMenu, WXDC_MENU_FILES); *************** *** 445,448 **** --- 421,425 ---- SetIcon(m_Icon); SetTitle(WXDC_NAME); + event.Skip(); } *************** *** 462,465 **** --- 439,443 ---- SetTitle(str); } + event.Skip(); } *************** *** 478,512 **** - ////////////////////////////////////////////////////////////////////// - // Fonctions d'interception des évènements dédiés à la vue active. - ////////////////////////////////////////////////////////////////////// - - void MainFrame::OnMenuViewCommandRange(wxCommandEvent& event) - { - View *pView = GetViewFrame()->GetActiveView(); - if(pView!=NULL) - pView->ProcessEvent(event); - } - - void MainFrame::OnMenuViewCommand(wxCommandEvent& event) - { - View *pView = GetViewFrame()->GetActiveView(); - if(pView!=NULL) - pView->ProcessEvent(event); - } - - void MainFrame::OnUpdateViewCommandRangeUI(wxUpdateUIEvent& event) - { - View *pView = GetViewFrame()->GetActiveView(); - if(pView!=NULL) - pView->ProcessEvent(event); - } - - void MainFrame::OnUpdateViewCommandUI(wxUpdateUIEvent& event) - { - View *pView = GetViewFrame()->GetActiveView(); - if(pView!=NULL) - pView->ProcessEvent(event); - } --- 456,459 ---- |
|
From: Emilien K. <cur...@us...> - 2005-04-04 08:11:34
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14919/include/wxDevCenter Modified Files: Application.h DocView.h Frame.h MDIFrame.h MainFrame.h Log Message: Modifie le mécanisme de passage des messages remontants depuis la TopFrame par la vue. Index: MDIFrame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/MDIFrame.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MDIFrame.h 1 Apr 2005 19:54:57 -0000 1.5 --- MDIFrame.h 4 Apr 2005 08:11:21 -0000 1.6 *************** *** 67,71 **** /** Redirige les évènements intercepté par la fenêtre cadre mère pour les rediriger vers les vues. * A surcharger pour fixer quel fenêtre fille intercepte les évènements.*/ ! virtual void ProcessEventFromParent(wxEvent& event); }; --- 67,73 ---- /** Redirige les évènements intercepté par la fenêtre cadre mère pour les rediriger vers les vues. * A surcharger pour fixer quel fenêtre fille intercepte les évènements.*/ ! virtual bool ProcessEventFromParent(wxEvent& event); ! /** Teste si les évènements peuvent être redirigés vers les vues.*/ ! virtual bool CanProcessEventFromParent(); }; Index: DocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/DocView.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DocView.h 1 Apr 2005 20:52:21 -0000 1.10 --- DocView.h 4 Apr 2005 08:11:19 -0000 1.11 *************** *** 677,689 **** * Les actions sont des objets de classes dérivées de wxCommand décrivant les données nécessaires à effectuer l'action et la l'annuler. */ ! class WXDC_DLL_BASE ActionDocument : public Document, public wxCommandProcessor { /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ ! DECLARE_DYNAMIC_CLASS(wxDevCenter::ActionDocument); public: ActionDocument(int maxCommands = -1); virtual ~ActionDocument(); ! }; --- 677,694 ---- * Les actions sont des objets de classes dérivées de wxCommand décrivant les données nécessaires à effectuer l'action et la l'annuler. */ ! class WXDC_DLL_BASE ActionDocument : public Document { /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ ! DECLARE_DYNAMIC_CLASS(wxDevCenter::ActionDocument); ! protected: ! /** Exécuteur de commandes.*/ ! wxCommandProcessor m_CommandProcessor; ! public: ActionDocument(int maxCommands = -1); virtual ~ActionDocument(); ! /** Retourne l'exécuteur de commandes.*/ ! wxCommandProcessor& GetCommandProcessor(){return m_CommandProcessor;} }; Index: MainFrame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/MainFrame.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MainFrame.h 1 Apr 2005 19:54:58 -0000 1.9 --- MainFrame.h 4 Apr 2005 08:11:21 -0000 1.10 *************** *** 84,93 **** /** Prépare le changement de vue active. * Nettoie la barre de menus, change le titre ... - * @see OnActiveViewChanging */ void OnCurrentViewChanging(ViewEvent &event); /** Finit le changement de vue active. * Reconstruit la barre de menus, change le titre ... - * @see OnActiveViewChanged */ void OnCurrentViewChanged(ViewEvent &event); --- 84,91 ---- *************** *** 114,121 **** * @{*/ void OnClose(wxCloseEvent &event); ! /** Evènement quitter l'application. Idem que OnClose. ! * @see OnClose ! * @see DocManager::CloseAllDocuments*/ ! void OnMenuExit(wxCommandEvent& event); /** Evènement Ouvrir un projet.*/ --- 112,117 ---- * @{*/ void OnClose(wxCloseEvent &event); ! ! void OnMenuFileExit(wxCommandEvent& event); /** Evènement Ouvrir un projet.*/ *************** *** 131,146 **** /** Evènement Ouvrir un document.*/ void OnMenuFileOpen(wxCommandEvent& event); - /** Evènement Ouvrir un document depuis un fichier.*/ - void OnMenuFileOpenFile(wxCommandEvent& event); - /** Evènement Ouvrir un document depuis un fichier du package du projet.*/ - void OnMenuFileOpenPack(wxCommandEvent& event); /** Evènement Sauver le document actif.*/ void OnMenuFileSave(wxCommandEvent& event); /** Evènement Enregistrer le document courant sous.*/ void OnMenuFileSaveAs(wxCommandEvent& event); - /** Evènement Enregistrer le document courant sous un fichier.*/ - void OnMenuFileSaveAsFile(wxCommandEvent& event); - /** Evènement Enregistrer le document courant dans un package.*/ - void OnMenuFileSaveAsPackage(wxCommandEvent& event); /** Evènement Fermer le document courant.*/ void OnMenuFileClose(wxCommandEvent& event); --- 127,134 ---- *************** *** 168,180 **** void OnUpdateWhenHasDoc(wxUpdateUIEvent& event); void OnUpdateWhenHasView(wxUpdateUIEvent& event); - - /** Evenements relatifs à la vue active.*/ - void OnMenuViewCommandRange(wxCommandEvent& event); - /** Evenement relatif à la vue active.*/ - void OnMenuViewCommand(wxCommandEvent& event); - /** Mise à jour des commandes relatives à la vue active.*/ - void OnUpdateViewCommandRangeUI(wxUpdateUIEvent& event); - /** Mise à jour d'une commande relative à la vue active.*/ - void OnUpdateViewCommandUI(wxUpdateUIEvent& event); /** @}*/ --- 156,159 ---- Index: Application.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Application.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Application.h 17 Mar 2005 14:37:41 -0000 1.10 --- Application.h 4 Apr 2005 08:11:18 -0000 1.11 *************** *** 63,66 **** --- 63,67 ---- class WXDC_DLL_BASE Application : public wxApp { + DECLARE_EVENT_TABLE() protected : /** Gestionnaire de projets.*/ *************** *** 87,90 **** --- 88,94 ---- /** Gestionnaire de configuration.*/ Configuration m_ConfigManager; + + /** Interception de la demande de sortie de l'application.*/ + void OnExitMenu(wxCommandEvent& event); public: /** @name Base Index: Frame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Frame.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Frame.h 1 Apr 2005 19:54:57 -0000 1.7 --- Frame.h 4 Apr 2005 08:11:21 -0000 1.8 *************** *** 154,163 **** void RemoveViewMenu(View* pView); ! /** Redirige certains évènements sur la fenetre cadre contenant les vues. ! * Permet à certains évènements déclenchés par les menus, les toolbars ou les workbars de se faire intercepter par les vues ou les documents.*/ ! void ReprocessCommandEventToViewFrame(wxCommandEvent& event); ! /** Redirige certains évènements sur la fenetre cadre contenant les vues. ! * Permet à certains évènements déclenchés par les menus, les toolbars ou les workbars de se faire intercepter par les vues ou les documents.*/ ! void ReprocessUpdateUIEventToViewFrame(wxUpdateUIEvent& event); public: --- 154,160 ---- void RemoveViewMenu(View* pView); ! /** Surcharge le procédé d'exécution des évènements.*/ ! virtual bool ProcessEvent(wxEvent& event); ! public: *************** *** 213,217 **** /** Redirige les évènements intercepté par la fenêtre cadre mère pour les rediriger vers les vues. * A surcharger pour fixer quel fenêtre fille intercepte les évènements.*/ ! virtual void ProcessEventFromParent(wxEvent& event)=0; }; --- 210,216 ---- /** Redirige les évènements intercepté par la fenêtre cadre mère pour les rediriger vers les vues. * A surcharger pour fixer quel fenêtre fille intercepte les évènements.*/ ! virtual bool ProcessEventFromParent(wxEvent& WXUNUSED(event)){return false;} ! /** Teste si les évènements peuvent être redirigés vers les vues.*/ ! virtual bool CanProcessEventFromParent(){return false;} }; |
|
From: Emilien K. <cur...@us...> - 2005-04-01 20:52:31
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14328/include/wxDevCenter Modified Files: DocView.h Log Message: Make ActionDocument use wxCommandProcessor/wxCommand interface. Index: DocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/DocView.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DocView.h 30 Mar 2005 20:12:13 -0000 1.9 --- DocView.h 1 Apr 2005 20:52:21 -0000 1.10 *************** *** 56,59 **** --- 56,60 ---- #include <wx/hashmap.h> #include <wx/dynarray.h> + #include <wx/cmdproc.h> #include <wxDevCenter/Manager.h> *************** *** 673,734 **** - - - /** Interface de description d'une action utilisateur. - * Classe interface decrivant une action utilisateur pouvant être annulée par une commande "Undo" - * et fournissant toutes les données pour permettre au document de revenir à l'état d'avant l'action. - */ - class WXDC_DLL_BASE Action : public wxObject - { - protected: - /** Code de référence du type d'action.*/ - unsigned int m_nCode; - public: - Action(unsigned int nCode); - /** Retourne le code de l'action.*/ - inline unsigned int GetCode()const{return m_nCode;} - /** Fixe le code de l'action.*/ - inline void SetCode(unsigned int nCode){m_nCode=nCode;} - }; - - /** Interface "document" implémentant des actions. ! * Interfaces pour les documents implémentants des actions et une pile d'actions pour le retour arrière "Undo". ! */ ! class WXDC_DLL_BASE ActionDocument : public Document { /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ DECLARE_DYNAMIC_CLASS(wxDevCenter::ActionDocument); - protected: - /** Définit le type tableau dynamique d'actions ActionArray.*/ - WX_DEFINE_USER_EXPORTED_ARRAY(Action*, ActionArray, class WXDC_DLL_BASE); - /** Tableau dynamique des actions.*/ - ActionArray m_ActionArray; - /** Taille maximale pour le tableau dynamique des fonctions.*/ - int m_iActionArrayMaxSize; public: ! ActionDocument(); virtual ~ActionDocument(); ! /** Fixe le nombre maximum d'annulation d'action possible. ! * Fixe la taille du tableau des dernières actions effectuées.*/ ! void SetUndoListSize(int iSize); ! /** Retourne le nombre maximum d'annulation d'action possible. ! * Retourne la taille du tableau des dernières actions effectuées.*/ ! int GetUndoListSize()const{return m_iActionArrayMaxSize;} ! /** Retourne le nombre d'annulations d'actions possibles. ! * Retourne le nombre d'actions contenues dans le tableau des dernières actions effectuées.*/ ! int GetUndoActionCount()const{return m_ActionArray.GetCount();} ! /** Annule la dernière action effectuée. ! * Restore l'état du document d'avant la dernière action. ! * La fonction de base supprime l'action de la liste mais ne rafraichit pas les vues attachées.*/ ! virtual void Undo(); ! protected: ! /** Retourne la dernière action effectuée si il y en a une.*/ ! Action* GetUndoAction(){return m_ActionArray.GetCount()==0?NULL:m_ActionArray[m_ActionArray.GetCount()-1];}// Retourne la dernière action. ! /** Ajoute une action. ! * Ajoute une action à la liste des dernières actions. ! * La fonction de base ne fait qu'ajouter l'action à la liste mais n'exécute pas cette action ni ne rafraichis les vues attachées.*/ ! void AddAction(Action *pAction); }; --- 674,689 ---- /** Interface "document" implémentant des actions. ! * Les actions sont des objets de classes dérivées de wxCommand décrivant les données nécessaires à effectuer l'action et la l'annuler. ! */ ! class WXDC_DLL_BASE ActionDocument : public Document, public wxCommandProcessor { /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ DECLARE_DYNAMIC_CLASS(wxDevCenter::ActionDocument); public: ! ActionDocument(int maxCommands = -1); virtual ~ActionDocument(); ! }; |
|
From: Emilien K. <cur...@us...> - 2005-04-01 20:52:31
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14328/src Modified Files: Document.cpp Log Message: Make ActionDocument use wxCommandProcessor/wxCommand interface. Index: Document.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Document.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Document.cpp 30 Mar 2005 20:12:15 -0000 1.5 --- Document.cpp 1 Apr 2005 20:52:21 -0000 1.6 *************** *** 244,258 **** ////////////////////////////////////////////////////////////////////// ! IMPLEMENT_DYNAMIC_CLASS(wxDevCenter::ActionDocument, wxDevCenter::Document) ! ! ! Action::Action(unsigned int nCode): ! m_nCode(nCode) ! { ! } ! ActionDocument::ActionDocument(): ! Document() { } --- 244,253 ---- ////////////////////////////////////////////////////////////////////// ! IMPLEMENT_DYNAMIC_CLASS2(wxDevCenter::ActionDocument, wxDevCenter::Document, wxDevCenter::wxCommandProcessor) ! ActionDocument::ActionDocument(int maxCommands): ! Document(), ! wxCommandProcessor(maxCommands) { } *************** *** 260,308 **** ActionDocument::~ActionDocument() { - while(m_ActionArray.GetCount()!=0) - { - delete m_ActionArray[0]; - m_ActionArray.RemoveAt(0); - } } - - // Fixe la taille de la liste des dernières actions. - void ActionDocument::SetUndoListSize(int iSize) - { - if(iSize!=-1) - { - while(iSize<(int)m_ActionArray.GetCount()) - { - delete m_ActionArray[0]; - m_ActionArray.RemoveAt(0); - } - m_ActionArray.Alloc(iSize); - } - else - m_iActionArrayMaxSize = iSize; - } - - // Annule la dernière action. - void ActionDocument::Undo() - { - int iLastAction; - - if(m_ActionArray.GetCount()>0) - { - iLastAction = m_ActionArray.GetCount()-1; - delete m_ActionArray[iLastAction]; - m_ActionArray.RemoveAt(iLastAction); - } - } - - // Ajoute une action à la liste des dernières actions. - void ActionDocument::AddAction(Action *pAction) - { - if(m_iActionArrayMaxSize==(int)m_ActionArray.GetCount()) - { - delete m_ActionArray[0]; - m_ActionArray.RemoveAt(0); - } - m_ActionArray.Add(pAction); - } - --- 255,257 ---- |
|
From: Emilien K. <cur...@us...> - 2005-04-01 20:52:31
|
Update of /cvsroot/wxdevcenter/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14328 Modified Files: CHANGELOG Log Message: Make ActionDocument use wxCommandProcessor/wxCommand interface. Index: CHANGELOG =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/CHANGELOG,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** CHANGELOG 1 Apr 2005 19:54:57 -0000 1.9 --- CHANGELOG 1 Apr 2005 20:52:20 -0000 1.10 *************** *** 4,7 **** --- 4,8 ---- CVS : ----- + - Make ActionDocument use wxCommandProcessor/wxCommand interface. - Make CommandEvent generated by TopFrame children (like WorkBar) pass by View before being processed by the application. - Make documents derivate from wxEvtHandler to use event table witch are plug to view event handler. |
|
From: Emilien K. <cur...@us...> - 2005-04-01 19:55:27
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12514/src Modified Files: Application.cpp Frame.cpp MDIFrame.cpp MainFrame.cpp Log Message: Make CommandEvent generated by TopFrame children (like WorkBar) pass by View before being processed by the application. Index: Frame.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Frame.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Frame.cpp 17 Mar 2005 16:18:37 -0000 1.5 --- Frame.cpp 1 Apr 2005 19:54:58 -0000 1.6 *************** *** 26,29 **** --- 26,31 ---- #include <wxDevCenter/DocView.h> + #include <wx/recguard.h> + using namespace wxDevCenter; *************** *** 78,86 **** --- 80,110 ---- ////////////////////////////////////////////////////////////////////// + IMPLEMENT_CLASS(TopFrame, wxFrame) + BEGIN_EVENT_TABLE(wxDevCenter::TopFrame, wxFrame) + EVT_BUTTON(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_MENU(-1, TopFrame::ReprocessCommandEventToViewFrame) + + EVT_CHECKBOX(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_CHOICE(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_LISTBOX(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_LISTBOX_DCLICK(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_SLIDER(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_RADIOBOX(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_RADIOBUTTON(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_SCROLLBAR(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_VLBOX(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_COMBOBOX(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_TOOL(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_TOOL_RCLICKED(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_TOOL_ENTER(-1, TopFrame::ReprocessCommandEventToViewFrame) + EVT_CHECKLISTBOX(-1, TopFrame::ReprocessCommandEventToViewFrame) + + EVT_UPDATE_UI(-1, TopFrame::ReprocessUpdateUIEventToViewFrame) END_EVENT_TABLE() TopFrame::TopFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style): wxFrame(NULL, -1, title, pos, size, style), + m_pViewFrame(NULL), m_iMenuSeparator(0), m_bHasViewMenu(false) *************** *** 121,124 **** --- 145,172 ---- } + // Redirige certains évènements sur la fenetre cadre contenant les vues. + void TopFrame::ReprocessCommandEventToViewFrame(wxCommandEvent& event) + { + // Prévient le rappel apres le passage des évènements dans la vue. + static wxRecursionGuardFlag s_flag; + wxRecursionGuard guard(s_flag); + event.Skip(); + if(guard.IsInside()) + return; + GetViewFrame()->ProcessEventFromParent(event); + } + + // Redirige certains évènements sur la fenetre cadre contenant les vues. + void TopFrame::ReprocessUpdateUIEventToViewFrame(wxUpdateUIEvent& event) + { + // Prévient le rappel apres le passage des évènements dans la vue. + static wxRecursionGuardFlag s_flag; + wxRecursionGuard guard(s_flag); + event.Skip(); + if(guard.IsInside()) + return; + GetViewFrame()->ProcessEventFromParent(event); + } + ////////////////////////////////////////////////////////////////////// // ViewFrame Index: Application.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Application.cpp 17 Mar 2005 16:18:37 -0000 1.19 --- Application.cpp 1 Apr 2005 19:54:58 -0000 1.20 *************** *** 54,58 **** { WorkBar::Create(parent); ! new wxButton(this, -1, wxT("Blablabla")); return true; } --- 54,58 ---- { WorkBar::Create(parent); ! new wxButton(this, 6000, wxT("Blablabla")); return true; } *************** *** 99,103 **** // Fixe le conteneur de vue par défaut du DocManager ! m_DocManager.m_pDefaultViewContainer = (wxWindow*) m_pMainFrame->m_pMDIFrame; // Affiche la fenetre principale. --- 99,103 ---- // Fixe le conteneur de vue par défaut du DocManager ! m_DocManager.m_pDefaultViewContainer = (wxWindow*) m_pMainFrame->GetViewFrame(); // Affiche la fenetre principale. Index: MDIFrame.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/MDIFrame.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MDIFrame.cpp 16 Mar 2005 14:27:37 -0000 1.3 --- MDIFrame.cpp 1 Apr 2005 19:54:58 -0000 1.4 *************** *** 109,116 **** View* MDIFrame::GetActiveView() { ! if(GetPageCount()==0 || GetSelection()<0) ! return (View*)NULL; ! else ! return (View*)GetPage(GetSelection()); } --- 109,113 ---- View* MDIFrame::GetActiveView() { ! return wxDynamicCast( GetCurrentPage(), View); } *************** *** 118,125 **** View* MDIFrame::GetView(int iView) { ! if(iView<0 || iView>=(int)GetPageCount()) ! return (View*)NULL; else ! return (View*)GetPage(iView); } --- 115,122 ---- View* MDIFrame::GetView(int iView) { ! if(iView>=0 && iView<(int)GetPageCount()) ! return wxDynamicCast(wxNotebook::GetPage(iView), View); else ! return NULL; } *************** *** 208,209 **** --- 205,215 ---- } + + // Redirige les évènements intercepté par la fenêtre cadre mère pour les rediriger vers les vues. + void MDIFrame::ProcessEventFromParent(wxEvent& event) + { + wxWindow* pPage = GetCurrentPage(); + if(pPage) + pPage->ProcessEvent(event); + } + Index: MainFrame.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/MainFrame.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MainFrame.cpp 30 Mar 2005 18:47:19 -0000 1.11 --- MainFrame.cpp 1 Apr 2005 19:54:58 -0000 1.12 *************** *** 94,97 **** --- 94,99 ---- + IMPLEMENT_CLASS(MainFrame, TopFrame) + BEGIN_EVENT_TABLE(MainFrame, TopFrame) EVT_CLOSE(MainFrame::OnClose) *************** *** 135,139 **** EVT_UPDATE_UI(IDM_WINDOW_CLOSEALL , MainFrame::OnUpdateWhenHasView) - EVT_MENU_RANGE(IDM_VIEW_MIN, IDM_VIEW_MAX , MainFrame::OnMenuViewCommandRange) EVT_MENU(IDM_EDIT_UNDO , MainFrame::OnMenuViewCommand) EVT_MENU(IDM_EDIT_REDO , MainFrame::OnMenuViewCommand) --- 137,140 ---- *************** *** 146,150 **** EVT_MENU(IDM_EDIT_SELECTALL , MainFrame::OnMenuViewCommand) - EVT_UPDATE_UI_RANGE(IDM_VIEW_MIN, IDM_VIEW_MAX, MainFrame::OnUpdateViewCommandRangeUI) EVT_UPDATE_UI(IDM_EDIT_UNDO , MainFrame::OnUpdateViewCommandUI) EVT_UPDATE_UI(IDM_EDIT_REDO , MainFrame::OnUpdateViewCommandUI) --- 147,150 ---- *************** *** 161,171 **** MainFrame::MainFrame(void): TopFrame(WXDC_NAME, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE|wxCLIP_CHILDREN), m_pGlobalSizer(NULL), ! m_pMDIFrame(NULL) { ! SetStatusBar(new StatusBar(this)); ! m_pMDIFrame = new MDIFrame(this, this, -1); ! m_pFrameLayout = new wxFrameLayout(this, m_pMDIFrame); m_pFrameLayout->SetUpdatesManager( new cbGCUpdatesMgr() ); --- 161,181 ---- MainFrame::MainFrame(void): TopFrame(WXDC_NAME, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE|wxCLIP_CHILDREN), + m_pFrameLayout(NULL), + m_WorkBarArray(), m_pGlobalSizer(NULL), ! m_Icon(), ! m_pMenuItemWorkBar(NULL) { ! // Création de la barre de status. ! SetStatusBar(new StatusBar(this)); ! // Création de la barre des menu puis réinitialisation de celle-ci ! BuildMenu(); ! ! // Création de la fenetre cadre cliente. ! MDIFrame* pChild = new MDIFrame(this, this, -1); ! SetViewFrame(pChild); ! ! m_pFrameLayout = new wxFrameLayout(this, pChild); m_pFrameLayout->SetUpdatesManager( new cbGCUpdatesMgr() ); *************** *** 176,182 **** m_pFrameLayout->AddPlugin( CLASSINFO( cbHintAnimationPlugin ) ); - // Création de la barre des menu puis réinitialisation de celle-ci - BuildMenu(); - // Chargement de l'icone de l'application. m_Icon = wxGetApp().LoadAppIcon("wxDevCenter", wxSize(16, 16)); --- 186,189 ---- *************** *** 251,255 **** void MainFrame::OnMenuFileSave(wxCommandEvent& WXUNUSED(event)) { ! wxGetApp().SaveDocument(m_pMDIFrame->GetActiveView()->GetDocument()); } --- 258,262 ---- void MainFrame::OnMenuFileSave(wxCommandEvent& WXUNUSED(event)) { ! wxGetApp().SaveDocument(GetViewFrame()->GetActiveView()->GetDocument()); } *************** *** 257,261 **** void MainFrame::OnMenuFileSaveAs(wxCommandEvent& WXUNUSED(event)) { ! wxGetApp().SaveDocument(m_pMDIFrame->GetActiveView()->GetDocument(), true); } --- 264,268 ---- void MainFrame::OnMenuFileSaveAs(wxCommandEvent& WXUNUSED(event)) { ! wxGetApp().SaveDocument(GetViewFrame()->GetActiveView()->GetDocument(), true); } *************** *** 263,267 **** void MainFrame::OnMenuFileClose(wxCommandEvent& WXUNUSED(event)) { ! View *pView = m_pMDIFrame->GetActiveView(); Document *pDoc; --- 270,274 ---- void MainFrame::OnMenuFileClose(wxCommandEvent& WXUNUSED(event)) { ! View *pView = GetViewFrame()->GetActiveView(); Document *pDoc; *************** *** 283,287 **** void MainFrame::OnMenuWindowClose(wxCommandEvent& WXUNUSED(event)) { ! wxGetApp().GetDocManager().CloseView(m_pMDIFrame->GetActiveView()); } --- 290,294 ---- void MainFrame::OnMenuWindowClose(wxCommandEvent& WXUNUSED(event)) { ! wxGetApp().GetDocManager().CloseView(GetViewFrame()->GetActiveView()); } *************** *** 289,293 **** void MainFrame::OnMenuWindowCloseAll(wxCommandEvent& WXUNUSED(event)) { ! m_pMDIFrame->CloseAllViews(); } --- 296,300 ---- void MainFrame::OnMenuWindowCloseAll(wxCommandEvent& WXUNUSED(event)) { ! GetViewFrame()->CloseAllViews(); } *************** *** 295,299 **** void MainFrame::OnMenuWindowClone(wxCommandEvent& WXUNUSED(event)) { ! View *pActiveView = m_pMDIFrame->GetActiveView(); if(pActiveView!=NULL) { --- 302,306 ---- void MainFrame::OnMenuWindowClone(wxCommandEvent& WXUNUSED(event)) { ! View *pActiveView = GetViewFrame()->GetActiveView(); if(pActiveView!=NULL) { *************** *** 307,311 **** void MainFrame::OnMenuWindowNew(wxCommandEvent& WXUNUSED(event)) { ! View *pActiveView = m_pMDIFrame->GetActiveView(); if(pActiveView!=NULL) { --- 314,318 ---- void MainFrame::OnMenuWindowNew(wxCommandEvent& WXUNUSED(event)) { ! View *pActiveView = GetViewFrame()->GetActiveView(); if(pActiveView!=NULL) { *************** *** 325,329 **** void MainFrame::OnMenuWindowNext(wxCommandEvent& WXUNUSED(event)) { ! m_pMDIFrame->ScrollView(true); } --- 332,336 ---- void MainFrame::OnMenuWindowNext(wxCommandEvent& WXUNUSED(event)) { ! GetViewFrame()->ScrollView(true); } *************** *** 331,335 **** void MainFrame::OnMenuWindowPrev(wxCommandEvent& WXUNUSED(event)) { ! m_pMDIFrame->ScrollView(false); } --- 338,342 ---- void MainFrame::OnMenuWindowPrev(wxCommandEvent& WXUNUSED(event)) { ! GetViewFrame()->ScrollView(false); } *************** *** 352,356 **** void MainFrame::OnUpdateWhenHasView(wxUpdateUIEvent& event) { ! event.Enable(m_pMDIFrame->GetViewCount()!=0); } --- 359,363 ---- void MainFrame::OnUpdateWhenHasView(wxUpdateUIEvent& event) { ! event.Enable(GetViewFrame()->GetViewCount()!=0); } *************** *** 422,428 **** void MainFrame::AddView(View *pView) { ! m_pMDIFrame->AddView(pView); } // La vue active VA changer void MainFrame::OnCurrentViewChanging(ViewEvent &event) --- 429,442 ---- void MainFrame::AddView(View *pView) { ! GetViewFrame()->AddView(pView); ! } ! ! // Retourne la fenetre cadre fille des vues. ! MDIFrame* MainFrame::GetViewFrame() ! { ! return wxDynamicCast( TopFrame::GetViewFrame(), MDIFrame); } + // La vue active VA changer void MainFrame::OnCurrentViewChanging(ViewEvent &event) *************** *** 470,497 **** void MainFrame::OnMenuViewCommandRange(wxCommandEvent& event) { ! View *pView = m_pMDIFrame->GetActiveView(); if(pView!=NULL) ! pView->GetEventHandler()->ProcessEvent(event); } void MainFrame::OnMenuViewCommand(wxCommandEvent& event) { ! View *pView = m_pMDIFrame->GetActiveView(); if(pView!=NULL) ! pView->GetEventHandler()->ProcessEvent(event); } void MainFrame::OnUpdateViewCommandRangeUI(wxUpdateUIEvent& event) { ! View *pView = m_pMDIFrame->GetActiveView(); if(pView!=NULL) ! pView->GetEventHandler()->ProcessEvent(event); } void MainFrame::OnUpdateViewCommandUI(wxUpdateUIEvent& event) { ! View *pView = m_pMDIFrame->GetActiveView(); if(pView!=NULL) ! pView->GetEventHandler()->ProcessEvent(event); } --- 484,511 ---- void MainFrame::OnMenuViewCommandRange(wxCommandEvent& event) { ! View *pView = GetViewFrame()->GetActiveView(); if(pView!=NULL) ! pView->ProcessEvent(event); } void MainFrame::OnMenuViewCommand(wxCommandEvent& event) { ! View *pView = GetViewFrame()->GetActiveView(); if(pView!=NULL) ! pView->ProcessEvent(event); } void MainFrame::OnUpdateViewCommandRangeUI(wxUpdateUIEvent& event) { ! View *pView = GetViewFrame()->GetActiveView(); if(pView!=NULL) ! pView->ProcessEvent(event); } void MainFrame::OnUpdateViewCommandUI(wxUpdateUIEvent& event) { ! View *pView = GetViewFrame()->GetActiveView(); if(pView!=NULL) ! pView->ProcessEvent(event); } |
|
From: Emilien K. <cur...@us...> - 2005-04-01 19:55:26
|
Update of /cvsroot/wxdevcenter/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12514 Modified Files: CHANGELOG Log Message: Make CommandEvent generated by TopFrame children (like WorkBar) pass by View before being processed by the application. Index: CHANGELOG =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/CHANGELOG,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CHANGELOG 30 Mar 2005 20:12:10 -0000 1.8 --- CHANGELOG 1 Apr 2005 19:54:57 -0000 1.9 *************** *** 4,7 **** --- 4,8 ---- CVS : ----- + - Make CommandEvent generated by TopFrame children (like WorkBar) pass by View before being processed by the application. - Make documents derivate from wxEvtHandler to use event table witch are plug to view event handler. - Work bar are registered into MainFrame to show them in "window" menu. |
|
From: Emilien K. <cur...@us...> - 2005-04-01 19:55:07
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12514/include/wxDevCenter Modified Files: Frame.h MDIFrame.h MainFrame.h Log Message: Make CommandEvent generated by TopFrame children (like WorkBar) pass by View before being processed by the application. Index: MDIFrame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/MDIFrame.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MDIFrame.h 16 Mar 2005 14:27:36 -0000 1.4 --- MDIFrame.h 1 Apr 2005 19:54:57 -0000 1.5 *************** *** 64,67 **** --- 64,72 ---- void ScrollView(bool bNext=true); bool CloseAllViews(); + + /** Redirige les évènements intercepté par la fenêtre cadre mère pour les rediriger vers les vues. + * A surcharger pour fixer quel fenêtre fille intercepte les évènements.*/ + virtual void ProcessEventFromParent(wxEvent& event); + }; Index: MainFrame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/MainFrame.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MainFrame.h 30 Mar 2005 18:47:06 -0000 1.8 --- MainFrame.h 1 Apr 2005 19:54:58 -0000 1.9 *************** *** 51,55 **** /** Déclare la table d'interception des évènements de fenêtres.*/ DECLARE_EVENT_TABLE(); ! protected: MainFrame(void); --- 51,56 ---- /** Déclare la table d'interception des évènements de fenêtres.*/ DECLARE_EVENT_TABLE(); ! /** Déclare les infos RTTI de la classe.*/ ! DECLARE_CLASS(MainFrame); protected: MainFrame(void); *************** *** 64,69 **** /** Sizer global. Sizer global pour le redimensionnement du contenu.*/ wxSizer *m_pGlobalSizer; - /** Conteneur des vues.*/ - MDIFrame *m_pMDIFrame; /** Icone générique de l'application.*/ --- 65,68 ---- *************** *** 191,194 **** --- 190,196 ---- void AddView(View *pView); + /** Retourne la fenetre cadre fille des vues.*/ + MDIFrame* GetViewFrame(); + /** @name Fonctions de manipulation des WorkFrame. * @{ */ Index: Frame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Frame.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Frame.h 17 Mar 2005 14:37:41 -0000 1.6 --- Frame.h 1 Apr 2005 19:54:57 -0000 1.7 *************** *** 35,41 **** { ! class TopFrame; ! class View; ! class WorkBar; BEGIN_DECLARE_EVENT_TYPES() --- 35,42 ---- { ! class WXDC_DLL_BASE TopFrame; ! class WXDC_DLL_BASE ViewFrame; ! class WXDC_DLL_BASE View; ! class WXDC_DLL_BASE WorkBar; BEGIN_DECLARE_EVENT_TYPES() *************** *** 50,54 **** private: /** Opérateur de copie. ! * @param event 2vènement à copier. * @return Référence de l'évènement courant. */ --- 51,55 ---- private: /** Opérateur de copie. ! * @param event Evènement à copier. * @return Référence de l'évènement courant. */ *************** *** 129,135 **** --- 130,140 ---- class WXDC_DLL_BASE TopFrame : public wxFrame { + DECLARE_CLASS(TopFrame); DECLARE_EVENT_TABLE() friend class MenuBar; protected: + /** Fenetre cadre fille contenant les vues.*/ + ViewFrame* m_pViewFrame; + /** Position d'insertion des menus spécifiques dans la barre des menus.*/ int m_iMenuSeparator; *************** *** 149,152 **** --- 154,164 ---- void RemoveViewMenu(View* pView); + /** Redirige certains évènements sur la fenetre cadre contenant les vues. + * Permet à certains évènements déclenchés par les menus, les toolbars ou les workbars de se faire intercepter par les vues ou les documents.*/ + void ReprocessCommandEventToViewFrame(wxCommandEvent& event); + /** Redirige certains évènements sur la fenetre cadre contenant les vues. + * Permet à certains évènements déclenchés par les menus, les toolbars ou les workbars de se faire intercepter par les vues ou les documents.*/ + void ReprocessUpdateUIEventToViewFrame(wxUpdateUIEvent& event); + public: /** Constructeur.*/ *************** *** 155,158 **** --- 167,176 ---- ~TopFrame(void); + /** Fixe la fenetre cadre fille des vues.*/ + void SetViewFrame(ViewFrame* pViewFrame){m_pViewFrame = pViewFrame;} + /** Retourne la fenetre cadre fille des vues.*/ + ViewFrame* GetViewFrame(){return m_pViewFrame;} + + /** Ajoute une fenetre comme barre de travail. * @param pWorkBar Adresse de la barre de travail. *************** *** 192,195 **** --- 210,217 ---- virtual void SetLabel(View *pView, wxString strLabel)=0; + + /** Redirige les évènements intercepté par la fenêtre cadre mère pour les rediriger vers les vues. + * A surcharger pour fixer quel fenêtre fille intercepte les évènements.*/ + virtual void ProcessEventFromParent(wxEvent& event)=0; }; |
|
From: Emilien K. <cur...@us...> - 2005-03-30 20:13:15
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14054/src Modified Files: Document.cpp Log Message: Make documents derivate from wxEvtHandler to use event table witch are plug to view event handler. Index: Document.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Document.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Document.cpp 16 Mar 2005 14:27:37 -0000 1.4 --- Document.cpp 30 Mar 2005 20:12:15 -0000 1.5 *************** *** 30,36 **** using namespace wxDevCenter; ! IMPLEMENT_DYNAMIC_CLASS(wxDevCenter::Document, wxObject) Document::Document(void): m_bIsDocumentModified(false) { --- 30,42 ---- using namespace wxDevCenter; ! IMPLEMENT_DYNAMIC_CLASS(wxDevCenter::Document, wxEvtHandler) ! ! BEGIN_EVENT_TABLE(Document, wxEvtHandler) ! END_EVENT_TABLE() ! ! Document::Document(void): + wxEvtHandler(), m_bIsDocumentModified(false) { *************** *** 114,117 **** --- 120,124 ---- pView->m_pDocument = this; m_ViewArray.Register(pView); + pView->PushEventHandler(this); } *************** *** 121,124 **** --- 128,132 ---- m_ViewArray.Unregister(pView); pView->m_pDocument = NULL; + pView->RemoveEventHandler(this); } |
|
From: Emilien K. <cur...@us...> - 2005-03-30 20:12:58
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14054/include/wxDevCenter Modified Files: DocView.h Log Message: Make documents derivate from wxEvtHandler to use event table witch are plug to view event handler. Index: DocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/DocView.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DocView.h 16 Mar 2005 14:27:36 -0000 1.8 --- DocView.h 30 Mar 2005 20:12:13 -0000 1.9 *************** *** 199,203 **** * Classe Interface de document à dériver pour créer des documents spécifiques. */ ! class WXDC_DLL_BASE Document : public wxObject, public InitializableInterface { friend class DocManager; --- 199,203 ---- * Classe Interface de document à dériver pour créer des documents spécifiques. */ ! class WXDC_DLL_BASE Document : public wxEvtHandler, public InitializableInterface { friend class DocManager; *************** *** 206,209 **** --- 206,211 ---- /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ DECLARE_DYNAMIC_CLASS(wxDevCenter::Document); + /** Déclaration de la table d'interception des évènements.*/ + DECLARE_EVENT_TABLE() protected: /** Pointeur vers le gestionnaire de document.*/ |
|
From: Emilien K. <cur...@us...> - 2005-03-30 20:12:58
|
Update of /cvsroot/wxdevcenter/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14054 Modified Files: CHANGELOG Log Message: Make documents derivate from wxEvtHandler to use event table witch are plug to view event handler. Index: CHANGELOG =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/CHANGELOG,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CHANGELOG 30 Mar 2005 18:47:05 -0000 1.7 --- CHANGELOG 30 Mar 2005 20:12:10 -0000 1.8 *************** *** 4,7 **** --- 4,8 ---- CVS : ----- + - Make documents derivate from wxEvtHandler to use event table witch are plug to view event handler. - Work bar are registered into MainFrame to show them in "window" menu. - FileSystemTreeCtrl now derivate events to FileSystems. Now FileSystems open documents instead of MainFrame. |
|
From: Emilien K. <cur...@us...> - 2005-03-30 18:48:42
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32192/include/wxDevCenter Modified Files: MainFrame.h WorkBar.h language.h Log Message: Enregistrement des workbar dans la MainFrame pour les afficher dans le menu "Window". Index: MainFrame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/MainFrame.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MainFrame.h 17 Mar 2005 17:51:24 -0000 1.7 --- MainFrame.h 30 Mar 2005 18:47:06 -0000 1.8 *************** *** 59,62 **** --- 59,65 ---- wxFrameLayout* m_pFrameLayout; + /** Liste des WorkBar attachée.*/ + ObjectManager<WorkBar> m_WorkBarArray; + /** Sizer global. Sizer global pour le redimensionnement du contenu.*/ wxSizer *m_pGlobalSizer; *************** *** 67,70 **** --- 70,76 ---- wxIcon m_Icon; + /** WorkBar choice menu.*/ + wxMenuItem* m_pMenuItemWorkBar; + // Redéfinition d'un DropTarget pour ouvrir les fichiers directement depuis un glisser/déposer.*/ class MainFrameDropTarget : public wxFileDropTarget *************** *** 97,106 **** /** Construit la barre de menus. Construit la barre de menus avec les menus spécifiques à l'application.*/ void BuildMenu(void); ! /** Evènement fermeture de fenêtre. ! * Est appelé quand l'utilisateur demande de fermer la fenêtre mère (x). ! * Demande de fermer tous les documents ouverts. ! * Pose un véto si l'utilisateur annule à la demande d'enregistrement d'un document. ! * @see DocManager::CloseAllDocuments ! */ /** @name Interception des évènements. --- 103,114 ---- /** Construit la barre de menus. Construit la barre de menus avec les menus spécifiques à l'application.*/ void BuildMenu(void); ! ! /** Reconstruit le menu des WorkBar.*/ ! void RebuildWorkBarMenu(); ! ! /** Intercepte la mise à jour des menus de workbar.*/ ! void OnUpdateWorkBarMenu(wxUpdateUIEvent& event); ! /** Intercepte un menu de workbar.*/ ! void OnWorkBarMenu(wxCommandEvent& event); /** @name Interception des évènements. *************** *** 183,188 **** --- 191,199 ---- void AddView(View *pView); + /** @name Fonctions de manipulation des WorkFrame. + * @{ */ virtual bool AddWorkBar(WorkBar* pWorkBar, wxString strName); virtual bool RemoveWorkBar(WorkBar* pWorkBar); + /** @} */ }; Index: WorkBar.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/WorkBar.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WorkBar.h 17 Mar 2005 16:18:37 -0000 1.3 --- WorkBar.h 30 Mar 2005 18:47:08 -0000 1.4 *************** *** 47,54 **** --- 47,63 ---- /** Adresse de l'objet aditionnel si utilisé.*/ wxObject* m_pExtraObject; + + /** Nom de la workbar.*/ + wxString m_strName; public: WorkBar(void); virtual ~WorkBar(void); + /** Acces sur le nom.*/ + void SetName(wxString strName){m_strName = strName;} + /** Acces sur le nom.*/ + wxString GetName()const{return m_strName;} + + /** Fonction de création effective de la fenetre. * @param Adresse de la fenetre parente.*/ Index: language.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/language.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** language.h 3 Mar 2005 16:20:27 -0000 1.7 --- language.h 30 Mar 2005 18:47:18 -0000 1.8 *************** *** 123,126 **** --- 123,127 ---- #define WXDC_MENU_WINDOW_PREV "Previous window\tCtrl+Shift+Tab" #define WXDC_MENU_WINDOW_NEXT "Next window\tCtrl+Tab" + #define WXDC_MENU_WINDOW_WORKBAR "Workbars" #define WXDC_MENU_HELP "Help" |
|
From: Emilien K. <cur...@us...> - 2005-03-30 18:47:54
|
Update of /cvsroot/wxdevcenter/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32192 Modified Files: CHANGELOG Log Message: Enregistrement des workbar dans la MainFrame pour les afficher dans le menu "Window". Index: CHANGELOG =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/CHANGELOG,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CHANGELOG 17 Mar 2005 17:52:59 -0000 1.6 --- CHANGELOG 30 Mar 2005 18:47:05 -0000 1.7 *************** *** 4,7 **** --- 4,8 ---- CVS : ----- + - Work bar are registered into MainFrame to show them in "window" menu. - FileSystemTreeCtrl now derivate events to FileSystems. Now FileSystems open documents instead of MainFrame. - Add file system work bar automounting. |
|
From: Emilien K. <cur...@us...> - 2005-03-30 18:47:39
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32192/src Modified Files: MainFrame.cpp WorkBar.cpp Log Message: Enregistrement des workbar dans la MainFrame pour les afficher dans le menu "Window". Index: WorkBar.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/WorkBar.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WorkBar.cpp 17 Mar 2005 16:18:38 -0000 1.3 --- WorkBar.cpp 30 Mar 2005 18:47:22 -0000 1.4 *************** *** 130,133 **** --- 130,134 ---- pBar->m_pAttachedWindow = &(m_FrameManager[nFrame]); pBar->m_pExtraObject = GetTemplate(nBar).GetExtraObject(); + pBar->SetName(GetTemplate(nBar).GetName()); if(!m_FrameManager[nFrame].AddWorkBar(pBar, GetTemplate(nBar).GetName())) DestroyObject(pBar); Index: MainFrame.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/MainFrame.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MainFrame.cpp 17 Mar 2005 17:51:24 -0000 1.10 --- MainFrame.cpp 30 Mar 2005 18:47:19 -0000 1.11 *************** *** 80,86 **** #define IDM_WINDOW_LAST 0x021F ! #define IDM_HELP_ABOUT 0x0300 ! #define IDM_HELP_INDEX 0x0301 ! #define IDM_HELP_CONTENT 0x0302 --- 80,91 ---- #define IDM_WINDOW_LAST 0x021F ! #define IDM_WINDOW_WORKBAR 0x0300 ! #define IDM_WINDOW_WORKBAR_FIRST 0x0301 ! #define IDM_WINDOW_WORKBAR_LAST 0x03FF ! ! #define IDM_HELP_ABOUT 0x0400 ! #define IDM_HELP_INDEX 0x0401 ! #define IDM_HELP_CONTENT 0x0402 ! *************** *** 115,118 **** --- 120,126 ---- EVT_MENU(IDM_HELP_ABOUT , MainFrame::OnMenuHelpAbout) + EVT_MENU_RANGE(IDM_WINDOW_WORKBAR_FIRST, IDM_WINDOW_WORKBAR_LAST, MainFrame::OnWorkBarMenu) + EVT_UPDATE_UI_RANGE(IDM_WINDOW_WORKBAR_FIRST, IDM_WINDOW_WORKBAR_LAST, MainFrame::OnUpdateWorkBarMenu) + EVT_UPDATE_UI(IDM_PROJECT_CLOSE , MainFrame::OnUpdateProjectClose) EVT_UPDATE_UI(IDM_FILE_CLOSE , MainFrame::OnUpdateWhenHasDoc) *************** *** 380,383 **** --- 388,393 ---- pMenu->Append(IDM_WINDOW_CLOSEALL, WXDC_MENU_WINDOW_CLOSEALL); pMenu->AppendSeparator(); + m_pMenuItemWorkBar = pMenu->Append(IDM_WINDOW_WORKBAR, WXDC_MENU_WINDOW_WORKBAR, new wxMenu); + pMenu->AppendSeparator(); pMenu->Append(IDM_WINDOW_NEXT, WXDC_MENU_WINDOW_NEXT); pMenu->Append(IDM_WINDOW_PREV, WXDC_MENU_WINDOW_PREV); *************** *** 397,400 **** --- 407,413 ---- SetMenuBar(pMenuBar); m_iMenuSeparator = 1; + + // Reconstruit le sous menu des workbars + RebuildWorkBarMenu(); } *************** *** 509,512 **** --- 522,527 ---- FALSE ); + m_WorkBarArray.Register(pWorkBar); + RebuildWorkBarMenu(); return true; } *************** *** 519,524 **** --- 534,579 ---- { m_pFrameLayout->RemoveBar(pBI); + m_WorkBarArray.Unregister(pWorkBar); + RebuildWorkBarMenu(); return true; } return false; } + + + // Reconstruit le menu des WorkBar. + void MainFrame::RebuildWorkBarMenu() + { + wxMenu *pMenu = m_pMenuItemWorkBar->GetSubMenu(); + if(pMenu) + { + while(pMenu->GetMenuItemCount()>0) + { + wxMenuItem* pChildItem = pMenu->FindItemByPosition(0); + pMenu->Destroy(pChildItem); + } + + for(unsigned int i=0; i<m_WorkBarArray.GetCount(); i++) + { + pMenu->Append(IDM_WINDOW_WORKBAR_FIRST+i, m_WorkBarArray.Item(i).GetName(), wxT(""), wxITEM_CHECK); + } + } + } + + // Intercepte la mise à jour des menus de workbar. + void MainFrame::OnUpdateWorkBarMenu(wxUpdateUIEvent& event) + { + cbBarInfo* pBI = m_pFrameLayout->FindBarByWindow((wxWindow*)&m_WorkBarArray.Item(event.GetId()-IDM_WINDOW_WORKBAR_FIRST)); + if(pBI) + event.Check( (pBI->mState&wxCBAR_HIDDEN ) == 0 ); + else + event.Enable(false); + } + + // Intercepte un menu de workbar. + void MainFrame::OnWorkBarMenu(wxCommandEvent& event) + { + cbBarInfo* pBI = m_pFrameLayout->FindBarByWindow((wxWindow*)&m_WorkBarArray.Item(event.GetId()-IDM_WINDOW_WORKBAR_FIRST)); + if(pBI) + m_pFrameLayout->InverseVisibility(pBI); + } \ No newline at end of file |
|
From: Emilien K. <cur...@us...> - 2005-03-17 17:53:16
|
Update of /cvsroot/wxdevcenter/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9660 Modified Files: CHANGELOG Log Message: Détournement des évènements des FileSystemTreeCtrl par les FileSystem. Maintenant, ce sont les FileSystem qui donnent l'ordre d'ouvrir les documents et plus la mainFrame. Index: CHANGELOG =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/CHANGELOG,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CHANGELOG 17 Mar 2005 16:57:18 -0000 1.5 --- CHANGELOG 17 Mar 2005 17:52:59 -0000 1.6 *************** *** 4,7 **** --- 4,8 ---- CVS : ----- + - FileSystemTreeCtrl now derivate events to FileSystems. Now FileSystems open documents instead of MainFrame. - Add file system work bar automounting. - Add work bar management. |
|
From: Emilien K. <cur...@us...> - 2005-03-17 17:51:39
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9288/src Modified Files: FileSystem.cpp FileSystemCtrl.cpp MainFrame.cpp Log Message: Détournement des évènements des FileSystemTreeCtrl par les FileSystem. Maintenant, ce sont les FileSystem qui donnent l'ordre d'ouvrir les documents et plus la mainFrame. Index: FileSystemCtrl.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/FileSystemCtrl.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FileSystemCtrl.cpp 16 Mar 2005 14:27:37 -0000 1.7 --- FileSystemCtrl.cpp 17 Mar 2005 17:51:24 -0000 1.8 *************** *** 86,89 **** --- 86,91 ---- m_strRootPath() { + if((m_pFileSystem!=NULL)&&(style&WXDC_FSTC_PROCESS_EVENT)!=0) + PushEventHandler(m_pFileSystem); SetImageList(m_pFileSystem->GetImageList(WXDC_SETUP_TREE_ICON_SIZE)); } *************** *** 99,103 **** --- 101,111 ---- { DeleteAllItems(); + // Retire l'ancien passage des évènements au système de fichier. + if((GetWindowStyle()&WXDC_FSTC_PROCESS_EVENT)!=0 && m_pFileSystem!=NULL) + PopEventHandler(false); m_pFileSystem = pFileSystem; + // Ajoute le nouveau passage des évènements au système de fichier. + if((GetWindowStyle()&WXDC_FSTC_PROCESS_EVENT)!=0) + PushEventHandler(m_pFileSystem); SetImageList(m_pFileSystem->GetImageList(WXDC_SETUP_TREE_ICON_SIZE)); } Index: FileSystem.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/FileSystem.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FileSystem.cpp 17 Mar 2005 16:18:37 -0000 1.3 --- FileSystem.cpp 17 Mar 2005 17:51:24 -0000 1.4 *************** *** 27,30 **** --- 27,32 ---- #include <wx/tokenzr.h> + #include <wx/dataobj.h> + #include <wx/dnd.h> using namespace wxDevCenter; *************** *** 65,69 **** --- 67,112 ---- + BEGIN_EVENT_TABLE(FileSystem, wxEvtHandler) + EVT_TREE_ITEM_ACTIVATED(wxID_ANY, FileSystem::OnItemActivate) + EVT_TREE_BEGIN_DRAG(wxID_ANY, FileSystem::OnItemDrag) + END_EVENT_TABLE() + // Interception de l'activation d'un évènement. + void FileSystem::OnItemActivate(wxTreeEvent& event) + { + FileSystemTreeCtrl* pTree = wxDynamicCast(event.GetEventObject(), FileSystemTreeCtrl); + + if(pTree!=NULL) // Si l'objet envoyeur est bien un FileSystemTreeCtrl + { + FileSystemTreeItemData* pItemData = (FileSystemTreeItemData*)pTree->GetItemData(event.GetItem()); + FilePath str = pItemData->GetPath(); + if(!pTree->GetFileSystem()->IsDirectory(str)) + wxGetApp().OpenDocument(str); + } + else + event.Skip(); + } + + // Interception d'un début de drag'n'drop. + void FileSystem::OnItemDrag(wxTreeEvent &event) + { + FileSystemTreeCtrl* pTree = wxDynamicCast(event.GetEventObject(), FileSystemTreeCtrl); + + if(pTree!=NULL) // Si l'objet envoyeur est bien un FileSystemTreeCtrl + { + FileSystemTreeItemData* pItemData = (FileSystemTreeItemData*) pTree->GetItemData(event.GetItem()); + FilePath str = pItemData->GetPath(); + if(!pTree->GetFileSystem()->IsDirectory(str)) + { + wxFileDataObject FileData; + FileData.AddFile(str); + wxDropSource dragSource(pTree); + dragSource.SetData(FileData); + dragSource.DoDragDrop(wxDrag_AllowMove); + } + } + else + event.Skip(); + } *************** *** 223,227 **** return false; if(bMountWorkBar) ! wxGetApp().GetWorkBarManager().RegisterWorkBar(CLASSINFO(FileSystemTreeWorkBar), wxT(""), wxT(""), pFileSystem); return true; } --- 266,270 ---- return false; if(bMountWorkBar) ! wxGetApp().GetWorkBarManager().RegisterWorkBar(CLASSINFO(FileSystemTreeWorkBar), pFileSystem->GetFileSystemName(), pFileSystem->GetProtocoleName(), pFileSystem); return true; } *************** *** 251,255 **** return false; ! m_pFSTreeCtrl = new FileSystemTreeCtrl(this, -1, (FileSystem*)m_pExtraObject); wxBoxSizer* pSizer = new wxBoxSizer(wxVERTICAL); pSizer->Add(m_pFSTreeCtrl, 1, wxGROW); --- 294,298 ---- return false; ! m_pFSTreeCtrl = new FileSystemTreeCtrl(this, -1, (FileSystem*)m_pExtraObject, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS|wxTR_ROW_LINES|wxTR_FULL_ROW_HIGHLIGHT|wxTR_ROW_LINES|wxTR_SINGLE|WXDC_FSTC_PROCESS_EVENT); wxBoxSizer* pSizer = new wxBoxSizer(wxVERTICAL); pSizer->Add(m_pFSTreeCtrl, 1, wxGROW); Index: MainFrame.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/MainFrame.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MainFrame.cpp 17 Mar 2005 16:18:38 -0000 1.9 --- MainFrame.cpp 17 Mar 2005 17:51:24 -0000 1.10 *************** *** 91,96 **** BEGIN_EVENT_TABLE(MainFrame, TopFrame) EVT_CLOSE(MainFrame::OnClose) - EVT_TREE_ITEM_ACTIVATED(wxID_ANY, MainFrame::OnFileSystemTreeCtrlItemActivate) - EVT_TREE_BEGIN_DRAG(wxID_ANY, MainFrame::OnFileSystemTreeCtrlItemDrag) EVT_STATUS_PANEL(MainFrame::OnStatusChange) --- 91,94 ---- *************** *** 444,487 **** ////////////////////////////////////////////////////////////////////// - // Intercepte les activations pour les arbres de systèmes de fichiers (dblclick) - void MainFrame::OnFileSystemTreeCtrlItemActivate(wxTreeEvent &event) - { - FileSystemTreeCtrl* pTree = wxDynamicCast(event.GetEventObject(), FileSystemTreeCtrl); - - if(pTree!=NULL) // Si l'objet envoyeur est bien un FileSystemTreeCtrl - { - FileSystemTreeItemData* pItemData = (FileSystemTreeItemData*)pTree->GetItemData(event.GetItem()); - FilePath str = pItemData->GetPath(); - if(!pTree->GetFileSystem()->IsDirectory(str)) - wxGetApp().OpenDocument(str); - } - else - event.Skip(); - } - - - /** Evènement début de drag'n'drop.*/ - void MainFrame::OnFileSystemTreeCtrlItemDrag(wxTreeEvent &event) - { - FileSystemTreeCtrl* pTree = wxDynamicCast(event.GetEventObject(), FileSystemTreeCtrl); - - if(pTree!=NULL) // Si l'objet envoyeur est bien un FileSystemTreeCtrl - { - FileSystemTreeItemData* pItemData = (FileSystemTreeItemData*) pTree->GetItemData(event.GetItem()); - FilePath str = pItemData->GetPath(); - if(!pTree->GetFileSystem()->IsDirectory(str)) - { - wxFileDataObject FileData; - FileData.AddFile(str); - wxDropSource dragSource(this); - dragSource.SetData(FileData); - dragSource.DoDragDrop(wxDrag_AllowMove); - } - } - else - event.Skip(); - } - - bool MainFrame::MainFrameDropTarget::OnDropFiles(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const wxArrayString& filenames) { --- 442,445 ---- |
|
From: Emilien K. <cur...@us...> - 2005-03-17 17:51:35
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9288/include/wxDevCenter Modified Files: FileSystem.h FileSystemCtrl.h MainFrame.h Log Message: Détournement des évènements des FileSystemTreeCtrl par les FileSystem. Maintenant, ce sont les FileSystem qui donnent l'ordre d'ouvrir les documents et plus la mainFrame. Index: FileSystemCtrl.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/FileSystemCtrl.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FileSystemCtrl.h 7 Mar 2005 15:23:02 -0000 1.7 --- FileSystemCtrl.h 17 Mar 2005 17:51:24 -0000 1.8 *************** *** 78,81 **** --- 78,84 ---- #define WXDC_FSTC_MODE_NORMAL 0x0007 + /** Demande au controle de faire passer les évènements au système de fichiers.*/ + #define WXDC_FSTC_PROCESS_EVENT 0x8000 + /** Controle d'arborescence gérant directement le contenu d'un système de fichier * @see wxDevCenter::FileSystem Index: MainFrame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/MainFrame.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MainFrame.h 17 Mar 2005 16:18:37 -0000 1.6 --- MainFrame.h 17 Mar 2005 17:51:24 -0000 1.7 *************** *** 107,115 **** * @{*/ void OnClose(wxCloseEvent &event); - /** Evènement activation d'un elément d'explorateur de fichier. - * Ouvre un nouveau document correspondant au fichier demandé.*/ - void OnFileSystemTreeCtrlItemActivate(wxTreeEvent &event); - /** Evènement début de drag'n'drop.*/ - void OnFileSystemTreeCtrlItemDrag(wxTreeEvent &event); /** Evènement quitter l'application. Idem que OnClose. * @see OnClose --- 107,110 ---- Index: FileSystem.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/FileSystem.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FileSystem.h 17 Mar 2005 16:18:37 -0000 1.5 --- FileSystem.h 17 Mar 2005 17:51:24 -0000 1.6 *************** *** 42,45 **** --- 42,47 ---- #include <wx/wfstream.h> #include <wx/image.h> + #include <wx/treectrl.h> + *************** *** 109,114 **** * @see UnixStandardFileSystem */ ! class WXDC_DLL_BASE FileSystem : public wxObject, public InitializableInterface { public: /** @name Propriétés générales. --- 111,117 ---- * @see UnixStandardFileSystem */ ! class WXDC_DLL_BASE FileSystem : public wxEvtHandler, public InitializableInterface { + DECLARE_EVENT_TABLE() public: /** @name Propriétés générales. *************** *** 199,202 **** --- 202,214 ---- */ static bool TestWildcard(FilePath strFile, wxString strWildcard); + + protected: + /** @name Interception de base des évènements des contrôles attachés. + * @{ */ + /** Interception de l'activation d'un évènement.*/ + void OnItemActivate(wxTreeEvent& event); + /** Interception d'un début de drag'n'drop.*/ + void OnItemDrag(wxTreeEvent &event); + /** @} */ }; |
|
From: Emilien K. <cur...@us...> - 2005-03-17 16:57:28
|
Update of /cvsroot/wxdevcenter/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29797 Modified Files: CHANGELOG Log Message: Automontage des WorkBar pour les FileSystem. Index: CHANGELOG =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/CHANGELOG,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CHANGELOG 16 Mar 2005 16:58:05 -0000 1.4 --- CHANGELOG 17 Mar 2005 16:57:18 -0000 1.5 *************** *** 4,7 **** --- 4,9 ---- CVS : ----- + - Add file system work bar automounting. + - Add work bar management. - Change managers to the new object management system. - Add ProjectType, an auto-regitered ProjectTemplate (like DocType). |
|
From: Emilien K. <cur...@us...> - 2005-03-17 16:18:48
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22044/src Modified Files: Application.cpp FileSystem.cpp Frame.cpp MainFrame.cpp WorkBar.cpp Log Message: Automontage des WorkBar pour les FileSystem. Index: Application.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Application.cpp 17 Mar 2005 14:37:41 -0000 1.18 --- Application.cpp 17 Mar 2005 16:18:37 -0000 1.19 *************** *** 92,96 **** // Initialise le gestionnaire de systèmes de fichiers m_pStandardFileSystem = new FileSystemStandard; ! m_FileSystemManager.Register(m_pStandardFileSystem); // Crée la fenetre principale --- 92,96 ---- // Initialise le gestionnaire de systèmes de fichiers m_pStandardFileSystem = new FileSystemStandard; ! m_FileSystemManager.Register(m_pStandardFileSystem, true); // Crée la fenetre principale *************** *** 104,108 **** m_pMainFrame->Show(true); ! // Test des worksbars. --- 104,109 ---- m_pMainFrame->Show(true); ! // Enregistre la fenêtre principale dans le WorkBarManager ! wxGetApp().GetWorkBarManager().RegisterFrame(m_pMainFrame); // Test des worksbars. Index: Frame.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Frame.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Frame.cpp 17 Mar 2005 14:37:42 -0000 1.4 --- Frame.cpp 17 Mar 2005 16:18:37 -0000 1.5 *************** *** 86,90 **** m_bHasViewMenu(false) { - wxGetApp().GetWorkBarManager().RegisterFrame(this); } --- 86,89 ---- Index: WorkBar.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/WorkBar.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WorkBar.cpp 17 Mar 2005 14:56:00 -0000 1.2 --- WorkBar.cpp 17 Mar 2005 16:18:38 -0000 1.3 *************** *** 86,92 **** // Désenregistre un type de barre. ! void WorkBarManager::UnregisterWorkBar(wxClassInfo* pClassInfo) { ! int i = Find(pClassInfo); if(i!=-1) { --- 86,92 ---- // Désenregistre un type de barre. ! void WorkBarManager::UnregisterWorkBar(wxClassInfo* pClassInfo, wxObject* pExtraObj) { ! int i = Find(pClassInfo, pExtraObj); if(i!=-1) { *************** *** 129,132 **** --- 129,133 ---- WorkBar* pBar = CreateObject(nBar); pBar->m_pAttachedWindow = &(m_FrameManager[nFrame]); + pBar->m_pExtraObject = GetTemplate(nBar).GetExtraObject(); if(!m_FrameManager[nFrame].AddWorkBar(pBar, GetTemplate(nBar).GetName())) DestroyObject(pBar); Index: FileSystem.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/FileSystem.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FileSystem.cpp 16 Mar 2005 14:27:37 -0000 1.2 --- FileSystem.cpp 17 Mar 2005 16:18:37 -0000 1.3 *************** *** 24,27 **** --- 24,28 ---- #include <wxDevCenter.h> #include <wxDevCenter/FileSystem.h> + #include <wxDevCenter/FileSystemCtrl.h> #include <wx/tokenzr.h> *************** *** 216,218 **** --- 217,260 ---- } + // Enregistre un système de fichier. + bool FileSystemManager::Register(FileSystem* pFileSystem, bool bMountWorkBar) + { + if(!InitializableObjectManager<FileSystem>::Register(pFileSystem)) + return false; + if(bMountWorkBar) + wxGetApp().GetWorkBarManager().RegisterWorkBar(CLASSINFO(FileSystemTreeWorkBar), wxT(""), wxT(""), pFileSystem); + return true; + } + + // Désenregistre un système de fichier. + bool FileSystemManager::Unregister(FileSystem* pFileSystem) + { + wxGetApp().GetWorkBarManager().UnregisterWorkBar(CLASSINFO(FileSystemTreeWorkBar), pFileSystem); + return InitializableObjectManager<FileSystem>::Unregister(pFileSystem); + } + + + ////////////////////////////////////////////////////////////////////// + // Barre de travail des systèmes de fichiers automontés. + ////////////////////////////////////////////////////////////////////// + + IMPLEMENT_DYNAMIC_CLASS(FileSystemTreeWorkBar, WorkBar); + + // Fonction de création effective de la fenetre. + bool FileSystemTreeWorkBar::Create(wxWindow* parent) + { + if(m_pExtraObject==NULL) + return false; + if(!m_pExtraObject->IsKindOf(CLASSINFO(FileSystem))) + return false; + if(!WorkBar::Create(parent)) + return false; + + m_pFSTreeCtrl = new FileSystemTreeCtrl(this, -1, (FileSystem*)m_pExtraObject); + wxBoxSizer* pSizer = new wxBoxSizer(wxVERTICAL); + pSizer->Add(m_pFSTreeCtrl, 1, wxGROW); + SetSizer(pSizer); + m_pFSTreeCtrl->OpenRoot(); + return true; + } Index: MainFrame.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/MainFrame.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MainFrame.cpp 17 Mar 2005 14:37:42 -0000 1.8 --- MainFrame.cpp 17 Mar 2005 16:18:38 -0000 1.9 *************** *** 156,169 **** TopFrame(WXDC_NAME, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE|wxCLIP_CHILDREN), m_pGlobalSizer(NULL), ! m_pMDIFrame(NULL), ! m_pStdFileSystemTree(NULL) { SetStatusBar(new StatusBar(this)); m_pMDIFrame = new MDIFrame(this, this, -1); - m_pStdFileSystemTree = new FileSystemTreeCtrl(this, -1, wxGetApp().GetStandardFileSystem()); - m_pStdFileSystemTree->OpenRoot(); - - m_pFrameLayout = new wxFrameLayout(this, m_pMDIFrame); m_pFrameLayout->SetUpdatesManager( new cbGCUpdatesMgr() ); --- 156,164 ---- TopFrame(WXDC_NAME, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE|wxCLIP_CHILDREN), m_pGlobalSizer(NULL), ! m_pMDIFrame(NULL) { SetStatusBar(new StatusBar(this)); m_pMDIFrame = new MDIFrame(this, this, -1); m_pFrameLayout = new wxFrameLayout(this, m_pMDIFrame); m_pFrameLayout->SetUpdatesManager( new cbGCUpdatesMgr() ); *************** *** 175,197 **** m_pFrameLayout->AddPlugin( CLASSINFO( cbHintAnimationPlugin ) ); - - - // drop in some bars - cbDimInfo sizes( 160, 220, // when docked horizontally - 220, 160, // when docked vertically - 160, 220, // when floated - FALSE, // the bar is not fixed-size - 4, // vertical gap (bar border) - 4 // horizontal gap (bar border) - ); - - m_pFrameLayout->AddBar( m_pStdFileSystemTree, // bar window - sizes, FL_ALIGN_LEFT, // alignment ( 0-top,1-bottom, etc) - 0, // insert into 0th row (vert. position) - 0, // offset from the start of row (in pixels) - "Standard File System", // name for reference in customization pop-ups - FALSE - ); - // Création de la barre des menu puis réinitialisation de celle-ci BuildMenu(); --- 170,173 ---- |
|
From: Emilien K. <cur...@us...> - 2005-03-17 16:18:47
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22044/include/wxDevCenter Modified Files: FileSystem.h MainFrame.h WorkBar.h Log Message: Automontage des WorkBar pour les FileSystem. Index: MainFrame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/MainFrame.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MainFrame.h 17 Mar 2005 14:37:41 -0000 1.5 --- MainFrame.h 17 Mar 2005 16:18:37 -0000 1.6 *************** *** 64,71 **** MDIFrame *m_pMDIFrame; - /** Explorateur de fichier standard. Contrôle arborescent explorant le système de fichier standard. - * @see FileSystem*/ - FileSystemTreeCtrl *m_pStdFileSystemTree; - /** Icone générique de l'application.*/ wxIcon m_Icon; --- 64,67 ---- Index: WorkBar.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/WorkBar.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WorkBar.h 17 Mar 2005 14:55:59 -0000 1.2 --- WorkBar.h 17 Mar 2005 16:18:37 -0000 1.3 *************** *** 31,35 **** class WXDC_DLL_BASE WorkBarManager; ! /** Classe de base des barres de travail. --- 31,35 ---- class WXDC_DLL_BASE WorkBarManager; ! class TopFrame; /** Classe de base des barres de travail. *************** *** 44,52 **** /** Fenêtre à laquelle la workbar est attachée.*/ TopFrame* m_pAttachedWindow; public: WorkBar(void); virtual ~WorkBar(void); ! /** Fonction de création effective de la fenetre.*/ virtual bool Create(wxWindow* parent){return wxPanel::Create(parent, -1);} }; --- 44,56 ---- /** Fenêtre à laquelle la workbar est attachée.*/ TopFrame* m_pAttachedWindow; + protected: + /** Adresse de l'objet aditionnel si utilisé.*/ + wxObject* m_pExtraObject; public: WorkBar(void); virtual ~WorkBar(void); ! /** Fonction de création effective de la fenetre. ! * @param Adresse de la fenetre parente.*/ virtual bool Create(wxWindow* parent){return wxPanel::Create(parent, -1);} }; *************** *** 101,109 **** * @param pClassInfo Infos RTTI de la barre. * @param strName Nom du type de barre. ! * @param strDescript Description.*/ void RegisterWorkBar(wxClassInfo* pClassInfo, wxString strName, wxString strDescript, wxObject* pExtraObj=NULL); /** Désenregistre un type de barre. ! * @param pClassInfo Info RTTI de la barre à désenregistrer.*/ ! void UnregisterWorkBar(wxClassInfo* pClassInfo); /** Cherche une barre. * @param pClassInfo Info RTTI de la barre à désenregistrer. --- 105,116 ---- * @param pClassInfo Infos RTTI de la barre. * @param strName Nom du type de barre. ! * @param strDescript Description. ! * @param pExtraObj Adresse de l'objet additionnel. ! */ void RegisterWorkBar(wxClassInfo* pClassInfo, wxString strName, wxString strDescript, wxObject* pExtraObj=NULL); /** Désenregistre un type de barre. ! * @param pClassInfo Info RTTI de la barre à désenregistrer. ! * @param pExtraObj Adresse de l'objet additionnel.*/ ! void UnregisterWorkBar(wxClassInfo* pClassInfo, wxObject* pExtraObj=NULL); /** Cherche une barre. * @param pClassInfo Info RTTI de la barre à désenregistrer. Index: FileSystem.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/FileSystem.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FileSystem.h 16 Mar 2005 14:27:36 -0000 1.4 --- FileSystem.h 17 Mar 2005 16:18:37 -0000 1.5 *************** *** 35,38 **** --- 35,39 ---- #include <wxDevCenter/Manager.h> #include <wxDevCenter/FileTools.h> + #include <wxDevCenter/WorkBar.h> #include <wx/dir.h> *************** *** 210,213 **** --- 211,224 ---- virtual ~FileSystemManager(); + /** Enregistre un système de fichier. + * @param pFileSystem Adresse du système de fichier. + * @param bMountWorkBar Demande si un WorkBar du système de fichier doit etre monté automatiquement. + */ + bool Register(FileSystem* pFileSystem, bool bMountWorkBar=false); + + /** Désenregistre un système de fichier. + * @param pFileSystem Adresse du système de fichier.*/ + bool Unregister(FileSystem* pFileSystem); + /** Retourne le système de fichier correspondant à un chemin de fichier. * @param strPath Chemin du fichier. *************** *** 223,226 **** --- 234,257 ---- }; + + class FileSystemTreeCtrl; + + /** WorkBar spécifique aux FileSystemTreeCtrl. + * Utilisé pour l'automontage de workbar de systèmez de fichiers.*/ + class WXDC_DLL_BASE FileSystemTreeWorkBar : public WorkBar + { + DECLARE_DYNAMIC_CLASS(FileSystemTreeWorkBar); + protected: + /** Arbre du système de fichier.*/ + FileSystemTreeCtrl* m_pFSTreeCtrl; + public: + FileSystemTreeWorkBar(void):WorkBar(){} + virtual ~FileSystemTreeWorkBar(void){} + + /** Fonction de création effective de la fenetre.*/ + virtual bool Create(wxWindow* parent); + }; + + } // Fin du namespace #endif |
|
From: Emilien K. <cur...@us...> - 2005-03-17 14:56:10
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3427/include/wxDevCenter Modified Files: WorkBar.h Log Message: Recherche d'un WorkBarTemplate via son ClassInfo et son objet additionnel. Index: WorkBar.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/WorkBar.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WorkBar.h 17 Mar 2005 14:40:12 -0000 1.1 --- WorkBar.h 17 Mar 2005 14:55:59 -0000 1.2 *************** *** 108,113 **** /** Cherche une barre. * @param pClassInfo Info RTTI de la barre à désenregistrer. * @return Numéro du patron de la barre, -1 si non trouvé.*/ ! int Find(const wxClassInfo* pClassInfo); /** @} */ --- 108,114 ---- /** Cherche une barre. * @param pClassInfo Info RTTI de la barre à désenregistrer. + * @param pExtraObj Adresse de l'objet additionnel. * @return Numéro du patron de la barre, -1 si non trouvé.*/ ! int Find(const wxClassInfo* pClassInfo, wxObject* pExtraObj=NULL); /** @} */ |