#define ID_BUTTON_CREATE_FOLDER 10310
#define ID_BUTTON_OPEN_CXX 10311
#define ID_BUTTON_OPEN_HXX 10312
+#define ID_BUTTON_OPEN_FOLDER 10313
+#define ID_BUTTON_OPEN_FILE 10314
+#define ID_BUTTON_OPEN_COMMAND 10315
#endif /* CREADEVMANAGERIDS_H_ */
--- /dev/null
+/* XPM */
+const static char * FdIcon[] = {
+"64 64 207 2",
+" c None",
+". c #1D242D",
+"+ c #1C232C",
+"@ c #1A212B",
+"# c #19212A",
+"$ c #192029",
+"% c #19202A",
+"& c #1A212A",
+"* c #141C25",
+"= c #131A24",
+"- c #202730",
+"; c #272E37",
+"> c #2B313A",
+", c #282F37",
+"' c #222931",
+") c #151C25",
+"! c #131B24",
+"~ c #4A5158",
+"{ c #A0A4A7",
+"] c #CFD0D2",
+"^ c #E6E7E8",
+"/ c #F1F2F2",
+"( c #E9EAEB",
+"_ c #D4D5D7",
+": c #A8ABAE",
+"< c #575D63",
+"[ c #151D26",
+"} c #1B222B",
+"| c #141B25",
+"1 c #777B81",
+"2 c #F6F7F7",
+"3 c #FFFFFF",
+"4 c #898C91",
+"5 c #161D26",
+"6 c #4C5158",
+"7 c #FBFBFC",
+"8 c #FDFDFD",
+"9 c #F4F4F5",
+"0 c #F1F1F2",
+"a c #565B62",
+"b c #141B24",
+"c c #A3A5AA",
+"d c #E1E1E3",
+"e c #898D92",
+"f c #4E535A",
+"g c #30373E",
+"h c #252C35",
+"i c #272D36",
+"j c #AAADB0",
+"k c #151C26",
+"l c #222831",
+"m c #D3D5D7",
+"n c #B0B2B5",
+"o c #252C34",
+"p c #030A15",
+"q c #232A33",
+"r c #272E36",
+"s c #D8D9DB",
+"t c #232A32",
+"u c #C6C8CA",
+"v c #0F1720",
+"w c #323940",
+"x c #929599",
+"y c #CACCCE",
+"z c #E9E9EA",
+"A c #F6F6F7",
+"B c #293038",
+"C c #2D343C",
+"D c #F3F3F4",
+"E c #52575F",
+"F c #5F646A",
+"G c #ECECED",
+"H c #52575E",
+"I c #2F353D",
+"J c #DADCDD",
+"K c #6D7177",
+"L c #FAFAFA",
+"M c #F9F9F9",
+"N c #F2F2F3",
+"O c #EEEFEF",
+"P c #EDEEEF",
+"Q c #EFEFF0",
+"R c #EEEEEF",
+"S c #2D333C",
+"T c #E2E3E4",
+"U c #D5D7D8",
+"V c #777B80",
+"W c #41474F",
+"X c #2C323B",
+"Y c #2A3139",
+"Z c #2B323A",
+"` c #30363E",
+" . c #2A313A",
+".. c #242A33",
+"+. c #242B33",
+"@. c #293039",
+"#. c #2A3039",
+"$. c #212830",
+"%. c #212831",
+"&. c #222932",
+"*. c #F1F1F1",
+"=. c #9B9FA2",
+"-. c #242B34",
+";. c #0F1620",
+">. c #181F28",
+",. c #B7B9BC",
+"'. c #171E27",
+"). c #FCFCFC",
+"!. c #52585F",
+"~. c #121922",
+"{. c #F2F3F3",
+"]. c #2B3139",
+"^. c #1E252E",
+"/. c #1F262F",
+"(. c #1F262E",
+"_. c #2D333B",
+":. c #262C35",
+"<. c #1E242D",
+"[. c #252B34",
+"}. c #BFC1C3",
+"|. c #F0F1F1",
+"1. c #292F38",
+"2. c #ECEDED",
+"3. c #F4F4F4",
+"4. c #B8BABD",
+"5. c #FEFEFE",
+"6. c #EAEBEB",
+"7. c #ECEDEE",
+"8. c #3A4048",
+"9. c #93969A",
+"0. c #CDCED0",
+"a. c #EBECEC",
+"b. c #EDEDEE",
+"c. c #9C9FA3",
+"d. c #EDEEEE",
+"e. c #FBFBFB",
+"f. c #EFF0F0",
+"g. c #B4B7B9",
+"h. c #C3C5C7",
+"i. c #232932",
+"j. c #9A9DA1",
+"k. c #D1D3D5",
+"l. c #B3B6B9",
+"m. c #B2B4B7",
+"n. c #C8C9CC",
+"o. c #393F47",
+"p. c #BCBEC1",
+"q. c #41474E",
+"r. c #8D9095",
+"s. c #C9CBCD",
+"t. c #62666D",
+"u. c #E8E9EA",
+"v. c #2F353E",
+"w. c #20272F",
+"x. c #363C44",
+"y. c #1F252E",
+"z. c #282E37",
+"A. c #DCDDDE",
+"B. c #73777C",
+"C. c #AAACB0",
+"D. c #E1E2E3",
+"E. c #262D36",
+"F. c #60656B",
+"G. c #D8D9DA",
+"H. c #1E252D",
+"I. c #373D45",
+"J. c #CBCDCF",
+"K. c #C7C8CB",
+"L. c #E0E1E2",
+"M. c #3C4249",
+"N. c #E7E8E9",
+"O. c #3B4148",
+"P. c #5C6168",
+"Q. c #A9ABAF",
+"R. c #DADBDD",
+"S. c #656A70",
+"T. c #121923",
+"U. c #51575E",
+"V. c #F2F2F2",
+"W. c #B6B8BB",
+"X. c #B5B7BA",
+"Y. c #D8DADB",
+"Z. c #9B9EA2",
+"`. c #121A23",
+" + c #CED0D1",
+".+ c #AEB0B3",
+"++ c #75797F",
+"@+ c #40454E",
+"#+ c #2C333B",
+"$+ c #30363F",
+"%+ c #131A23",
+"&+ c #5C6167",
+"*+ c #F8F8F9",
+"=+ c #F7F7F7",
+"-+ c #444951",
+";+ c #929699",
+">+ c #F3F3F3",
+",+ c #6E7378",
+"'+ c #161E27",
+")+ c #5D6268",
+"!+ c #ABADB1",
+"~+ c #D6D6D8",
+"{+ c #EBECED",
+"]+ c #CDCFD0",
+"^+ c #9DA0A4",
+"/+ c #454B52",
+"(+ c #1A222B",
+" ",
+" ",
+" ",
+" ",
+" ",
+" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+" . . + @ # $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % & + . . ",
+" . . . * = - ; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > , ' ) = + . . ",
+" . + ! ~ { ] ^ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / ( _ : < [ } . ",
+" . . | 1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 5 + . ",
+" . . | 6 7 3 3 3 8 9 0 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 0 9 8 3 3 3 3 a = . . ",
+" . . b c 3 3 d e f g h i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i h g f e d 3 3 j k + . ",
+" . } l m 3 n o p 5 q r i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i r q 5 p o n 3 s t & . ",
+" . % , 9 u v w x y z / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / z y x w v u A B $ . ",
+" . $ C D E F G 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 G F H D C $ . ",
+" . $ I J K L 3 3 3 3 M N / / / O P Q / / / 0 P P R P P P P R P P 0 / / / Q P O / / / N M 3 3 3 3 L K J I $ . ",
+" . $ S T U 3 3 3 s V W X Y Z i ` .h ..i ...., B r +.r , @.I #.r $.- q %.+.B &.- r Y X W V s 3 3 3 U T S $ . ",
+" . $ > *.3 3 3 =.-.;.>.+ + + . . . . . + . . . . . . . . . . . . . . . . . . . . & $ $ 5 ;.-.=.3 3 3 *.> $ . ",
+" . $ > / 3 3 ,.* '.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + . . . . '.* ,.3 3 / > $ . ",
+" . $ > / 3 ).!.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + . . . . ~.!.).3 / > $ . ",
+" . $ > / 3 {.].+ . . . . . . . . . . . . . . . . ^./.(.^.^.^.^.. . . . . . . . . . . . . . . & _.{.3 / > $ . ",
+" . $ > / 3 / :.. . . . . . . . . . . . . . <.^.. . . . . . . . . . . . . . . . . . . . . . . } #./ 3 / > $ . ",
+" . $ > / 3 / :.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + > / 3 / > $ . ",
+" . $ > / 3 / [.. . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 }.. . . . . . . . . . . . . . . . 3 3 3 3 . + > / 3 / > $ . ",
+" . $ > / 3 |.[.. . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 }.. . . . . . . . . . . . . . . . 3 3 3 3 . + 1./ 3 / > $ . ",
+" . $ > / 3 O [.. . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 }.. . . . . . . . . . . . . . . . 3 3 3 3 . . i / 3 / > $ . ",
+" . $ > / 3 2.:.. . 3 3 3 3 3.3.3.3.3.3.3.3.3.3.3.4.. . . . . . . . . . . . . . . . 3 3 3 3 . . -./ 3 / > $ . ",
+" . $ > / 5.6.i + . 3 3 3 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 3 3 . . %./ 3 / > $ . ",
+" . $ > / 5.6.1.+ . 3 3 3 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 3 3 . . - / 3 / > $ . ",
+" . $ > / 5.6.1.+ . 3 3 3 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 3 3 . . - / 3 / > $ . ",
+" . $ > / 5.7.i + . 3 3 3 3 . . . . . . . . . . . . . . . . . . . . 8.9.0.a.L b._ c.3 3 3 3 . . - / 3 / > $ . ",
+" . $ > / 3 d.i . . 3 3 3 3 . . . . . . . . . . . . . . . . . . %.c.e.3 3 3 3 3 3 3 3 3 3 3 . . /./ 3 / > $ . ",
+" . $ > / 3 f.[.. . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 g.. . . . . . %.h.3 3 3 3 3 3 3 3 3 3 3 3 3 . . /./ 3 / > $ . ",
+" . $ > / 3 |.i.. . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 g.. . . . . . j.3 3 3 3 3 k.l.m.n.3.3 3 3 3 . . - |.3 / > $ . ",
+" . $ > / 3 / ..+ . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 g.. . . . . o.L 3 3 3 p.q.. . . . /.3 3 3 3 . . i.|.3 / > $ . ",
+" . $ > / 3 / i . . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 g.. . . . . r.3 3 3 0./.. . . . . . 3 3 3 3 . . ..f.3 / > $ . ",
+" . $ > / 3 / r + . 3 3 3 3 . . . . . . . . . . . . . . . . s.3 3 3 t.. . . . . . . 3 3 3 3 . . +.f.3 / > $ . ",
+" . $ > / 3 / i . . 3 3 3 3 . . . . . . . . . . . . . . . . u.3 3 3 v.. . . . . . . 3 3 3 3 . . i.f.3 / > $ . ",
+" . $ > / 3 / t . . 3 3 3 3 . . . . . . . . . . . . . . . . M 3 3 3 ' . . . . . . . 3 3 3 3 . . w.|.3 / > $ . ",
+" . $ > / 3 / ... . 3 3 3 3 . . . . . . . . . . . . . . . . |.3 3 3 x.. . . . . . . 3 3 3 3 . . y.|.3 / > $ . ",
+" . $ > / 3 / z.. . 3 3 3 3 . . . . . . . . . . . . . . . . A.3 3 3 B.. . . . . . . 3 3 3 3 . . . / 3 / > $ . ",
+" . $ > / 3 / B + . 3 3 3 3 . . . . . . . . . . . . . . . . C.3 3 3 D.#.. . . . . . 3 3 3 3 . . . / 3 / > $ . ",
+" . $ > / 3 / E.+ . 3 3 3 3 . . . . . . . . . . . . . . . . F.3 3 3 3 G.F.H.. . . I.3 3 3 3 . . /./ 3 / > $ . ",
+" . $ > / 3 / -.+ . 3 3 3 3 . . . . . . . . . . . . . . . . . J.3 3 3 3 3 ( s.K.L.3 3 3 3 3 . . %./ 3 / > $ . ",
+" . $ > / 3 / :.. . 3 3 3 3 . . . . . . . . . . . . . . . . . M.N.3 3 3 3 3 3 3 3 3 3 3 3 3 . . -./ 3 / > $ . ",
+" . $ > / 3 / :.. . 3 3 3 3 . . . . . . . . . . . . . . . . . . O.s.3 3 3 3 3 3 3 3 M 3 3 3 . . :./ 3 / > $ . ",
+" . $ > / 3 / [.. . 3 3 3 3 . . . . . . . . . . . . . . . . . . . H.P.Q.J.G 3.R.g.S.I.3 3 3 . . i / 3 / > $ . ",
+" . $ > / 3 / :.+ . . . . . . . . . . . . . . . . . . . . . . . . . . . + . . . . . . . . . . . z./ 3 / > $ . ",
+" . $ > / 3 {.> + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . } X {.3 / > $ . ",
+" . $ > / 3 ).H 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + T.U.).3 V.> $ . ",
+" . $ B 2.3 3 W.| } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + '.| X.3 3 z , % . ",
+" . & t Y.3 3 3 Z.&.& + + . . . . . . . . . . . . . . . . . . . . . . . + + } + . . . . + `.-.Z.3 3 3 +w.} . ",
+" . + 5 .+3 3 3 3 s ++@+-.^.. /.%.-.:.:.:.:.:.:.+.-.1.#+C C [.$.q :.:.i z.#.> i l /.. ^.$+++s 3 3 3 3 c.%+. . ",
+" . . %+&+3 3 3 3 3 3 *+/ / / / / / / / / / / / / |.P P P P |./ / / / / / / / / / / / / *+3 3 3 3 3 =+-+k . . ",
+" . + >.;+3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 >+,+= . . ",
+" . @ '+)+!+~+{+/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / N.]+^+/+= + . ",
+" . . + `.5 &.1.> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > z.- `.) . . . ",
+" . . + & % $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ # (++ . . ",
+" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+" ",
+" ",
+" ",
+" ",
+" "};
--- /dev/null
+/* XPM */
+const static char * FlIcon[] = {
+"64 64 180 2",
+" c None",
+". c #1D242D",
+"+ c #1C232C",
+"@ c #1A212B",
+"# c #19212A",
+"$ c #192029",
+"% c #19202A",
+"& c #1A212A",
+"* c #141C25",
+"= c #131A24",
+"- c #202730",
+"; c #272E37",
+"> c #2B313A",
+", c #282F37",
+"' c #222931",
+") c #151C25",
+"! c #131B24",
+"~ c #4A5158",
+"{ c #A0A4A7",
+"] c #CFD0D2",
+"^ c #E6E7E8",
+"/ c #F1F2F2",
+"( c #E9EAEB",
+"_ c #D4D5D7",
+": c #A8ABAE",
+"< c #575D63",
+"[ c #151D26",
+"} c #1B222B",
+"| c #141B25",
+"1 c #777B81",
+"2 c #F6F7F7",
+"3 c #FFFFFF",
+"4 c #898C91",
+"5 c #161D26",
+"6 c #4C5158",
+"7 c #FBFBFC",
+"8 c #FDFDFD",
+"9 c #F4F4F5",
+"0 c #F1F1F2",
+"a c #565B62",
+"b c #141B24",
+"c c #A3A5AA",
+"d c #E1E1E3",
+"e c #898D92",
+"f c #4E535A",
+"g c #30373E",
+"h c #252C35",
+"i c #272D36",
+"j c #AAADB0",
+"k c #151C26",
+"l c #222831",
+"m c #D3D5D7",
+"n c #B0B2B5",
+"o c #252C34",
+"p c #030A15",
+"q c #232A33",
+"r c #272E36",
+"s c #D8D9DB",
+"t c #232A32",
+"u c #C6C8CA",
+"v c #0F1720",
+"w c #323940",
+"x c #929599",
+"y c #CACCCE",
+"z c #E9E9EA",
+"A c #F6F6F7",
+"B c #293038",
+"C c #2D343C",
+"D c #F3F3F4",
+"E c #52575F",
+"F c #5F646A",
+"G c #ECECED",
+"H c #52575E",
+"I c #2F353D",
+"J c #DADCDD",
+"K c #6D7177",
+"L c #FAFAFA",
+"M c #F9F9F9",
+"N c #F2F2F3",
+"O c #EEEFEF",
+"P c #EDEEEF",
+"Q c #EFEFF0",
+"R c #EEEEEF",
+"S c #2D333C",
+"T c #E2E3E4",
+"U c #D5D7D8",
+"V c #777B80",
+"W c #41474F",
+"X c #2C323B",
+"Y c #2A3139",
+"Z c #2B323A",
+"` c #30363E",
+" . c #2A313A",
+".. c #242A33",
+"+. c #242B33",
+"@. c #293039",
+"#. c #2A3039",
+"$. c #212830",
+"%. c #212831",
+"&. c #222932",
+"*. c #F1F1F1",
+"=. c #9B9FA2",
+"-. c #242B34",
+";. c #0F1620",
+">. c #181F28",
+",. c #B7B9BC",
+"'. c #171E27",
+"). c #FCFCFC",
+"!. c #52585F",
+"~. c #121922",
+"{. c #F2F3F3",
+"]. c #2B3139",
+"^. c #1E252E",
+"/. c #1F262F",
+"(. c #1F262E",
+"_. c #2D333B",
+":. c #262C35",
+"<. c #1E242D",
+"[. c #868A8E",
+"}. c #252B34",
+"|. c #F0F1F1",
+"1. c #292F38",
+"2. c #ECEDED",
+"3. c #3C4249",
+"4. c #FEFEFE",
+"5. c #EAEBEB",
+"6. c #ECEDEE",
+"7. c #EDEEEE",
+"8. c #EFF0F0",
+"9. c #232932",
+"0. c #6D7278",
+"a. c #20272F",
+"b. c #1F252E",
+"c. c #282E37",
+"d. c #262D36",
+"e. c #2C333B",
+"f. c #9C9FA3",
+"g. c #2C323A",
+"h. c #464C53",
+"i. c #393F47",
+"j. c #DEDFE0",
+"k. c #74797E",
+"l. c #A6A9AC",
+"m. c #30363F",
+"n. c #2F353E",
+"o. c #DFE0E1",
+"p. c #FBFBFB",
+"q. c #E6E6E7",
+"r. c #C3C5C7",
+"s. c #83878C",
+"t. c #121923",
+"u. c #51575E",
+"v. c #F2F2F2",
+"w. c #B6B8BB",
+"x. c #B5B7BA",
+"y. c #D8DADB",
+"z. c #9B9EA2",
+"A. c #121A23",
+"B. c #CED0D1",
+"C. c #AEB0B3",
+"D. c #75797F",
+"E. c #40454E",
+"F. c #131A23",
+"G. c #5C6167",
+"H. c #F8F8F9",
+"I. c #F7F7F7",
+"J. c #444951",
+"K. c #929699",
+"L. c #F3F3F3",
+"M. c #6E7378",
+"N. c #161E27",
+"O. c #5D6268",
+"P. c #ABADB1",
+"Q. c #D6D6D8",
+"R. c #EBECED",
+"S. c #E7E8E9",
+"T. c #CDCFD0",
+"U. c #9DA0A4",
+"V. c #454B52",
+"W. c #1A222B",
+" ",
+" ",
+" ",
+" ",
+" ",
+" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+" . . + @ # $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % & + . . ",
+" . . . * = - ; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > , ' ) = + . . ",
+" . + ! ~ { ] ^ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / ( _ : < [ } . ",
+" . . | 1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 5 + . ",
+" . . | 6 7 3 3 3 8 9 0 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 0 9 8 3 3 3 3 a = . . ",
+" . . b c 3 3 d e f g h i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i h g f e d 3 3 j k + . ",
+" . } l m 3 n o p 5 q r i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i r q 5 p o n 3 s t & . ",
+" . % , 9 u v w x y z / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / z y x w v u A B $ . ",
+" . $ C D E F G 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 G F H D C $ . ",
+" . $ I J K L 3 3 3 3 M N / / / O P Q / / / 0 P P R P P P P R P P 0 / / / Q P O / / / N M 3 3 3 3 L K J I $ . ",
+" . $ S T U 3 3 3 s V W X Y Z i ` .h ..i ...., B r +.r , @.I #.r $.- q %.+.B &.- r Y X W V s 3 3 3 U T S $ . ",
+" . $ > *.3 3 3 =.-.;.>.+ + + . . . . . + . . . . . . . . . . . . . . . . . . . . & $ $ 5 ;.-.=.3 3 3 *.> $ . ",
+" . $ > / 3 3 ,.* '.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + . . . . '.* ,.3 3 / > $ . ",
+" . $ > / 3 ).!.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + . . . . ~.!.).3 / > $ . ",
+" . $ > / 3 {.].+ . . . . . . . . . . . . . . . . ^./.(.^.^.^.^.. . . . . . . . . . . . . . . & _.{.3 / > $ . ",
+" . $ > / 3 / :.. . . . . . . . . . . . . . <.^.. . . . . . . . . . . . . . . . . . . . . . . } #./ 3 / > $ . ",
+" . $ > / 3 / :.. . . . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 [.. . . . . 3 3 3 3 3 . . . . . . . + > / 3 / > $ . ",
+" . $ > / 3 / }.. . . . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 [.. . . . . 3 3 3 3 3 . . . . . . . + > / 3 / > $ . ",
+" . $ > / 3 |.}.. . . . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 [.. . . . . 3 3 3 3 3 . . . . . . . + 1./ 3 / > $ . ",
+" . $ > / 3 O }.. . . . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 [.. . . . . 3 3 3 3 3 . . . . . . . . i / 3 / > $ . ",
+" . $ > / 3 2.:.. . . . 3 3 3 3 3 F F F F F F F F F F F F 3.. . . . . 3 3 3 3 3 . . . . . . . . -./ 3 / > $ . ",
+" . $ > / 4.5.i + . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . 3 3 3 3 3 . . . . . . . . %./ 3 / > $ . ",
+" . $ > / 4.5.1.+ . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . 3 3 3 3 3 . . . . . . . . - / 3 / > $ . ",
+" . $ > / 4.5.1.+ . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . 3 3 3 3 3 . . . . . . . . - / 3 / > $ . ",
+" . $ > / 4.6.i + . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . 3 3 3 3 3 . . . . . . . . - / 3 / > $ . ",
+" . $ > / 3 7.i . . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . 3 3 3 3 3 . . . . . . . . /./ 3 / > $ . ",
+" . $ > / 3 8.}.. . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . 3 3 3 3 3 . . . . . . . . /./ 3 / > $ . ",
+" . $ > / 3 |.9.. . . . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0.. . . . . . 3 3 3 3 3 . . . . . . . . - |.3 / > $ . ",
+" . $ > / 3 / ..+ . . . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0.. . . . . . 3 3 3 3 3 . . . . . . . . 9.|.3 / > $ . ",
+" . $ > / 3 / i . . . . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0.. . . . . . 3 3 3 3 3 . . . + . . . . ..8.3 / > $ . ",
+" . $ > / 3 / r + . . . 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0.. . . . . . 3 3 3 3 3 . . + . . . . . +.8.3 / > $ . ",
+" . $ > / 3 / i . . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . 3 3 3 3 3 . . . . . . . . 9.8.3 / > $ . ",
+" . $ > / 3 / t . . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . 3 3 3 3 3 . . . . . . . . a.|.3 / > $ . ",
+" . $ > / 3 / ... . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . 3 3 3 3 3 . . . . . . . . b.|.3 / > $ . ",
+" . $ > / 3 / c.. . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . 3 3 3 3 3 . . . . . . . . . / 3 / > $ . ",
+" . $ > / 3 / B + . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . 3 3 3 3 3 . . . . . . . . . / 3 / > $ . ",
+" . $ > / 3 / d.+ . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . 3 3 3 3 3 e.. . . . . . . /./ 3 / > $ . ",
+" . $ > / 3 / -.+ . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . 8 3 3 3 3 f.g.%.h.i.. . . %./ 3 / > $ . ",
+" . $ > / 3 / :.. . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . j.3 3 3 3 3 3 ).3 k.. . . -./ 3 / > $ . ",
+" . $ > / 3 / :.. . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . l.3 3 3 3 3 3 3 3 k.. . . :./ 3 / > $ . ",
+" . $ > / 3 / }.. . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . m.5.3 3 3 3 3 3 3 k.. . . i / 3 / > $ . ",
+" . $ > / 3 / :.+ . . . 3 3 3 3 3 . . . . . . . . . . . . . . . . . . . n.: o.p.N q.r.s.g.. . . c./ 3 / > $ . ",
+" . $ > / 3 {.> + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . } X {.3 / > $ . ",
+" . $ > / 3 ).H 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + t.u.).3 v.> $ . ",
+" . $ B 2.3 3 w.| } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + '.| x.3 3 z , % . ",
+" . & t y.3 3 3 z.&.& + + . . . . . . . . . . . . . . . . . . . . . . . + + } + . . . . + A.-.z.3 3 3 B.a.} . ",
+" . + 5 C.3 3 3 3 s D.E.-.^.. /.%.-.:.:.:.:.:.:.+.-.1.e.C C }.$.q :.:.i c.#.> i l /.. ^.m.D.s 3 3 3 3 f.F.. . ",
+" . . F.G.3 3 3 3 3 3 H./ / / / / / / / / / / / / |.P P P P |./ / / / / / / / / / / / / H.3 3 3 3 3 I.J.k . . ",
+" . + >.K.3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 L.M.= . . ",
+" . @ N.O.P.Q.R./ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / S.T.U.V.= + . ",
+" . . + A.5 &.1.> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > c.- A.) . . . ",
+" . . + & % $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ # W.+ . . ",
+" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+" ",
+" ",
+" ",
+" ",
+" "};
modelCDMAppli::~modelCDMAppli()
{
- for (int i = 0; i < this->applications.size(); i++)
- {
- if(this->applications[i] != NULL)
- {
- delete this->applications[i];
- this->applications[i] = NULL;
- }
- }
}
bool modelCDMAppli::CreateApplication(
#include "modelCDMFile.h"
+#include <fstream>
#include <creaWx.h>
#include <wx/dir.h>
this->path = path;
this->type = wxDIR_FILES;
+
+ std::ifstream in(path.c_str(), std::ifstream::in | std::ifstream::binary);
+ in.seekg(0, std::ifstream::end);
+ this->length = in.tellg();
+
}
modelCDMFile::~modelCDMFile()
this->children.clear();
this->level = level;
this->CMakeLists = NULL;
+ this->length = 0;
std::vector<std::string> words;
std::string delimiters;
modelCDMFolder::~modelCDMFolder()
{
+ this->folders.clear();
+ this->CMakeLists = NULL;
for (int i = 0; i < this->children.size(); i++)
{
if(this->children[i] != NULL)
this->children[i] = NULL;
}
}
+ this->children.clear();
}
bool modelCDMFolder::CreateFolder(const std::string& name, std::string*& result,
//TODO: implement method
return true;
}
+
+bool
+modelCDMFolder::HasCMakeLists()
+{
+ //TODO: implement method
+ return true;
+}
bool OpenCMakeListsFile(std::string* & result);
virtual const bool Refresh(std::string*& result);
+ bool HasCMakeLists();
private:
std::vector<modelCDMFolder*> folders;
modelCDMCMakeListsFile* CMakeLists;
return false;
}
+const int& modelCDMIProjectTreeNode::GetLength()
+{
+ return this->length;
+}
+
const bool modelCDMIProjectTreeNode::OpenInFileExplorer(std::string*& result) const
{
//TODO: implement method
const unsigned char& GetType() const;
const int& GetLevel() const;
const std::vector<modelCDMIProjectTreeNode*>& GetChildren() const;
+ const int& GetLength();
void SetId(const wxTreeItemId& id);
void SortChildren();
void SetChildren(const std::vector<modelCDMIProjectTreeNode*>& children);
std::string name;
unsigned char type;
int level;
+ int length;
std::vector<modelCDMIProjectTreeNode*> children;
};
#include "modelCDMLib.h"
+#include <fstream>
+
#include "CDMUtilities.h"
#include "creaWx.h"
#include "wx/dir.h"
std::string pathFixed(CDMUtilities::fixPath(path));
this->libraries.clear();
- wxDir dir(crea::std2wx((pathFixed).c_str()));
- if (dir.IsOpened())
- {
- wxString fileName;
- bool cont = dir.GetFirst(&fileName, wxEmptyString, wxDIR_DIRS);
- while (cont)
- {
- std::string stdfileName = crea::wx2std(fileName);
-
- modelCDMLibrary* library = new modelCDMLibrary(pathFixed + "/" + stdfileName, this->level + 1);
- this->libraries.push_back(library);
- this->children.push_back(library);
-
- cont = dir.GetNext(&fileName);
- }
-
- }
- this->SortChildren();
-}
-
-modelCDMLib::~modelCDMLib()
-{
- for (int i = 0; i < this->libraries.size(); i++)
+ wxDir dir(crea::std2wx((pathFixed).c_str()));
+ if (dir.IsOpened())
{
- if(this->libraries[i] != NULL)
+ wxString fileName;
+ bool cont = dir.GetFirst(&fileName, wxEmptyString, wxDIR_DIRS);
+ while (cont)
{
- delete this->libraries[i];
- this->libraries[i] = NULL;
+ std::string stdfileName = crea::wx2std(fileName);
+
+ modelCDMLibrary* library = new modelCDMLibrary(pathFixed + "/" + stdfileName, this->level + 1);
+ this->libraries.push_back(library);
+ this->children.push_back(library);
+
+ cont = dir.GetNext(&fileName);
}
+
}
+ this->SortChildren();
+}
+
+modelCDMLib::~modelCDMLib()
+{
}
-bool modelCDMLib::CreateLibrary(
+modelCDMIProjectTreeNode* modelCDMLib::CreateLibrary(
const std::string& name,
std::string*& result,
const std::string& path
)
{
- //TODO: implement method
- return true;
+ //copy template library folder with new name
+ std::string copyCommand = "cp -r " + this->path + "/template_lib " + this->path + "/" + name;
+ if(system(copyCommand.c_str()))
+ {
+ result = new std::string("An error occurred while running '" + copyCommand + "'.");
+ return NULL;
+ }
+ //TODO: set name of library in CMakeLists inside copied folder
+ std::string line;
+ std::ifstream in((this->path + "/" + name + "/CMakeLists.txt").c_str());
+ if( !in.is_open())
+ {
+ result = new std::string("CMakeLists.txt file failed to open.");
+ return NULL;
+ }
+ std::ofstream out((this->path + "/" + name + "/CMakeLists.txt.tmp").c_str());
+ while (getline(in, line))
+ {
+ if(line == "SET ( LIBRARY_NAME MyLib )")
+ line = "SET ( LIBRARY_NAME " + name + " )";
+ out << line << std::endl;
+ }
+ in.close();
+ out.close();
+ //delete old file and rename new file
+ std::string renameCommand = "mv " + this->path + "/" + name + "/CMakeLists.txt.tmp " + this->path + "/" + name + "/CMakeLists.txt";
+ if(system(renameCommand.c_str()))
+ {
+ result = new std::string("An error occurred while running '" + renameCommand + "'.");
+ return NULL;
+ }
+
+ //add library to model
+ modelCDMLibrary* library = new modelCDMLibrary(this->path + "/" + name, this->level + 1);
+ this->libraries.push_back(library);
+ this->children.push_back(library);
+
+ result = new std::string(this->path + "/" + name);
+ return library;
}
bool modelCDMLib::OpenCMakeListsFile(std::string*& result)
modelCDMLib(const std::string& path, const int& level = 1);
~modelCDMLib();
- bool CreateLibrary(
+ modelCDMIProjectTreeNode* CreateLibrary(
const std::string& name,
std::string*& result,
const std::string& path = "/"
if (system (command.c_str()))
{
- result = new std::string("An error occured while running '" + command + "'.");
+ result = new std::string("An error occurred while running '" + command + "'.");
return false;
}
modelCDMPackage::~modelCDMPackage()
{
- for (int i = 0; i < this->blackBoxes.size(); i++)
- {
- if(this->blackBoxes[i] != NULL)
- {
- delete this->blackBoxes[i];
- this->blackBoxes[i] = NULL;
- }
- }
}
const std::string& modelCDMPackage::GetNamePackage() const
#include <iostream>
#include <vector>
+#include <algorithm>
#include <fstream>
#include "CDMUtilities.h"
modelCDMProject::~modelCDMProject()
{
- for (int i = 0; i < this->children.size(); i++)
- {
- if(this->children[i] != NULL)
- {
- delete this->children[i];
- this->children[i] = NULL;
- }
- }
}
const std::string& modelCDMProject::GetNameProject() const
return true;
}
-bool modelCDMProject::CreatePackage(
+modelCDMIProjectTreeNode* modelCDMProject::CreatePackage(
const std::string& name,
std::string*& result,
const std::string& authors,
)
{
//TODO: implement method
- return true;
+ return NULL;
}
-bool modelCDMProject::CreateLibrary(
+modelCDMIProjectTreeNode* modelCDMProject::CreateLibrary(
const std::string& name,
std::string*& result,
const std::string& path
)
{
- //TODO: implement method
- return true;
+ if(this->lib != NULL)
+ {
+ return this->lib->CreateLibrary(name, result);
+ }
+ result = new std::string("there is no lib folder in this project.");
+ return NULL;
}
-bool modelCDMProject::CreateApplication(
+modelCDMIProjectTreeNode* modelCDMProject::CreateApplication(
const std::string& name,
std::string*& result,
const std::string& path
)
{
//TODO: implement method
- return true;
+ return NULL;
}
-bool modelCDMProject::CreateBlackBox(
+modelCDMIProjectTreeNode* modelCDMProject::CreateBlackBox(
const std::string& name,
const std::string& package,
const std::string& authors,
)
{
//TODO: implement method
- return true;
+ return NULL;
}
bool modelCDMProject::OpenCMakeListsFile(std::string*& result)
const bool modelCDMProject::Refresh(std::string*& result)
{
- //TODO: implement method
+
+ //open makelists file
+ //TODO: set pathMakeLists for windows
+ std::string pathMakeLists = this->path + "/CMakeLists.txt";
+
+ std::ifstream confFile;
+ confFile.open((pathMakeLists).c_str());
+
+ std::string word;
+ while(confFile.is_open() && !confFile.eof())
+ {
+ //std::cout << "leyendo " << word << std::endl;
+ //get project name
+ std::getline(confFile,word,'(');
+ std::vector<std::string> wordBits;
+ CDMUtilities::splitter::split(wordBits,word," (\n",CDMUtilities::splitter::no_empties);
+
+ if(wordBits[wordBits.size()-1] == "PROJECT")
+ {
+ std::getline(confFile,word,')');
+ std::vector<std::string> nameBits;
+ CDMUtilities::splitter::split(nameBits, word, " ", CDMUtilities::splitter::no_empties);
+
+ this->name = this->nameProject = "";
+ for (int i = 0; i < nameBits.size(); i++)
+ {
+ if(i != 0)
+ this->name += " ";
+ this->name += nameBits[i];
+ }
+ this->nameProject = this->name;
+
+ }
+
+
+ if(wordBits[wordBits.size()-1] == "SET")
+ {
+ //get project version
+ std::getline(confFile,word,')');
+ CDMUtilities::splitter::split(wordBits, word, " ", CDMUtilities::splitter::no_empties);
+ if(wordBits[0] == "PROJECT_MAJOR_VERSION")
+ {
+ version = wordBits[1];
+ }
+ if(wordBits[0] == "PROJECT_MINOR_VERSION")
+ {
+ version += "." + wordBits[1];
+ }
+ if(wordBits[0] == "PROJECT_BUILD_VERSION")
+ {
+ version += "." + wordBits[1];
+ }
+
+ //get project versionDate
+ if(wordBits[0] == "PROJECT_VERSION_DATE")
+ {
+ std::vector<std::string> versionBits;
+ CDMUtilities::splitter::split(versionBits, wordBits[1], "\"", CDMUtilities::splitter::no_empties);
+ versionDate = versionBits[0];
+ }
+ }
+ }
+ confFile.close();
+
+ this->type = wxDIR_DIRS;
+ this->level = 0;
+
+ std::vector<bool> checked(this->children.size(), false);
+ std::vector<bool> checkedPackages(this->packages.size(), false);
+
+ //check all folders
+ wxDir dir(crea::std2wx((this->path).c_str()));
+ if (dir.IsOpened())
+ {
+ wxString fileName;
+ bool cont = dir.GetFirst(&fileName, wxEmptyString, wxDIR_DIRS);
+ while (cont)
+ {
+ std::string stdfileName = crea::wx2std(fileName);
+
+ //if appli, create appli
+ if(stdfileName == "appli")
+ {
+ if (this->appli == NULL)
+ {
+ this->appli = new modelCDMAppli(this->path + "/appli", this->level + 1);
+ this->children.push_back(this->appli);
+ }
+ else
+ {
+ int pos = std::find(this->children.begin(), this->children.end(), this->appli) - this->children.begin();
+ checked[pos] = true;
+ if(!this->appli->Refresh(result))
+ return false;
+ }
+ }
+ //if lib, create lib
+ else if(stdfileName == "lib")
+ {
+ if (this->lib == NULL)
+ {
+ this->lib = new modelCDMLib(this->path + "/lib", this->level + 1);
+ this->children.push_back(this->lib);
+ }
+ else
+ {
+ int pos = std::find(this->children.begin(), this->children.end(), this->lib) - this->children.begin();
+ checked[pos] = true;
+ if(!this->lib->Refresh(result))
+ return false;
+ }
+
+ }
+ //if package , create package
+ else if(stdfileName.size() > 9 && stdfileName.substr(0,5) == "bbtk_" && stdfileName.substr(stdfileName.size()-4,4) == "_PKG")
+ {
+ std::string packageName = stdfileName.substr(5, stdfileName.size()-9);
+ bool found = false;
+ for (int i = 0;!found && i < this->packages.size(); i++)
+ {
+ if (this->packages[i]->GetName() == packageName)
+ {
+ found = true;
+ int pos = std::find(this->children.begin(), this->children.end(), this->packages[i]) - this->children.begin();
+ checked[pos] = true;
+ checkedPackages[i] = true;
+ if(!this->packages[i]->Refresh(result))
+ return false;
+ }
+ }
+ if(!found)
+ {
+ modelCDMPackage* package = new modelCDMPackage(this->path + "/" + stdfileName, this->level + 1);
+ this->packages.push_back(package);
+ this->children.push_back(package);
+ }
+
+ }
+ //if is an unknown folder, create folder
+ else
+ {
+ bool found = false;
+ for (int i = 0; !found && i < this->children.size(); i++)
+ {
+ if (this->children[i]->GetName() == stdfileName)
+ {
+ found = true;
+ checked[i] = true;
+ if(!this->children[i]->Refresh(result))
+ return false;
+ }
+ }
+
+ if(!found)
+ {
+ modelCDMFolder* folder = new modelCDMFolder(this->path + "/" + stdfileName, this->level + 1);
+ this->children.push_back(folder);
+ }
+ }
+
+ cont = dir.GetNext(&fileName);
+ }
+
+ cont = dir.GetFirst(&fileName, wxEmptyString, wxDIR_FILES);
+ while (cont)
+ {
+ std::string stdfileName = crea::wx2std(fileName);
+
+ //if CMakeLists, create CMakeLists
+ if(stdfileName == "CMakeLists.txt")
+ {
+ if (this->CMakeLists == NULL)
+ {
+ this->CMakeLists = new modelCDMCMakeListsFile(this->path + "/" + stdfileName, this->level + 1);
+ this->children.push_back(this->CMakeLists);
+ }
+ else
+ {
+ int pos = std::find(this->children.begin(), this->children.end(), this->CMakeLists) - this->children.begin();
+ checked[pos] = true;
+ if(!this->CMakeLists->Refresh(result))
+ return false;
+ }
+ }
+ //if is an unknown file, create file
+ else
+ {
+ bool found = false;
+ for (int i = 0; i <!found && this->children.size(); i++)
+ {
+ if (this->children[i]->GetName() == stdfileName)
+ {
+ found = true;
+ checked[i] = true;
+ if(!this->children[i]->Refresh(result))
+ return false;
+ }
+ }
+
+ if(!found)
+ {
+ modelCDMFile* file = new modelCDMFile(this->path + "/" + stdfileName, this->level + 1);
+ this->children.push_back(file);
+ }
+ }
+
+ cont = dir.GetNext(&fileName);
+ }
+ }
+
+ for (int i = 0; i < checkedPackages.size(); i++)
+ {
+ if(!checkedPackages[i])
+ {
+ this->packages.erase(this->packages.begin()+i);
+ checkedPackages.erase(checkedPackages.begin()+i);
+ i--;
+ }
+ }
+ for (int i = 0; i < checked.size(); i++)
+ {
+ if(!checked[i])
+ {
+ delete this->children[i];
+ this->children.erase(this->children.begin()+i);
+ checked.erase(checked.begin()+i);
+ i--;
+ }
+ }
+ this->SortChildren();
return true;
}
bool SetVersion(const std::string& version, std::string*& result);
bool SetBuildPath(const std::string& path, std::string*& result);
- bool CreatePackage(
+ modelCDMIProjectTreeNode* CreatePackage(
const std::string& name,
std::string*& result,
const std::string& authors = "info-dev",
const std::string& version = "1.0.0",
const std::string& description = "no description"
);
- bool CreateLibrary(
+ modelCDMIProjectTreeNode* CreateLibrary(
const std::string& name,
std::string*& result,
const std::string& path = "/lib"
);
- bool CreateApplication(
+ modelCDMIProjectTreeNode* CreateApplication(
const std::string& name,
std::string*& result,
const std::string& path = "/appli"
);
- bool CreateBlackBox(
+ modelCDMIProjectTreeNode* CreateBlackBox(
const std::string& name,
const std::string& package = "", //if empty converts into "/bbtk_*projectName*_PKG"
const std::string& authors = "unknown",
*/
/*
- * wxCDMLibraryDescriptionPanel.cpp
+ * wxCDMBlackBoxDescriptionPanel.cpp
*
* Created on: Nov 27, 2012
* Author: Daniel Felipe Gonzalez Obando
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------
+ */
+
+/*
+ * wxCDMCMakeListsDescriptionPanel.cpp
+ *
+ * Created on: Nov 27, 2012
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#include "wxCDMCMakeListsDescriptionPanel.h"
+
+#include "creaDevManagerIds.h"
+#include "images/CMIcon.xpm"
+
+BEGIN_EVENT_TABLE(wxCDMCMakeListsDescriptionPanel, wxPanel)
+EVT_MENU(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMCMakeListsDescriptionPanel::OnBtnOpenInEditor)
+END_EVENT_TABLE()
+
+wxCDMCMakeListsDescriptionPanel::wxCDMCMakeListsDescriptionPanel(
+ wxWindow* parent,
+ modelCDMCMakeListsFile* makefile,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style
+)
+{
+ wxCDMCMakeListsDescriptionPanel::Create(parent, makefile, id, caption, pos, size, style);
+}
+
+wxCDMCMakeListsDescriptionPanel::~wxCDMCMakeListsDescriptionPanel()
+{
+}
+
+bool wxCDMCMakeListsDescriptionPanel::Create(
+ wxWindow* parent,
+ modelCDMCMakeListsFile* makefile,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style
+)
+{
+ wxPanel::Create(parent, id, pos, size, style);
+ this->cMakeLists = makefile;
+ CreateControls();
+ return TRUE;
+}
+
+void wxCDMCMakeListsDescriptionPanel::CreateControls()
+{
+ wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
+
+ //Welcome
+ sizer->Add(new wxStaticText(this, -1, _("File")),0, wxALIGN_CENTER, 0);
+
+ //Image
+ sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(CMIcon)),0, wxALIGN_CENTER, 0);
+
+ //File Name
+ sizer->Add(new wxStaticText(this, -1, crea::std2wx("CMake Configuration File (CMakeLists.txt)")), 0, wxALIGN_CENTER, 0);
+
+ //Actions
+ wxStaticBox* actionsBox = new wxStaticBox(this, -1, _T("&Actions"));
+ wxStaticBoxSizer* actionsBoxInnerSizer = new wxStaticBoxSizer(actionsBox, wxVERTICAL);
+ sizer -> Add(actionsBoxInnerSizer, 1, wxEXPAND | wxALL, 20);
+
+ actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit in file editor")), 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
+
+ //Assign sizer
+ actionsBoxInnerSizer->SetSizeHints(this);
+
+ SetSizer(sizer);
+ sizer->SetSizeHints(this);
+}
+
+void wxCDMCMakeListsDescriptionPanel::OnBtnOpenInEditor(wxCommandEvent& event)
+{
+ //TODO: implement method
+ std::cerr << "Event OnBtnOpenInEditor not implemented" << std::endl;
+ event.Skip();
+ event.StopPropagation();
+}
+
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------
+ */
+
+/*
+ * wxCDMCMakeListsDescriptionPanel.h
+ *
+ * Created on: Nov 27, 2012
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#ifndef WXCDMCMAKELISTSDESCRIPTIONPANEL_H_
+#define WXCDMCMAKELISTSDESCRIPTIONPANEL_H_
+
+#include <creaWx.h>
+#include <wx/panel.h>
+
+#include "modelCDMCMakeListsFile.h"
+
+class wxCDMCMakeListsDescriptionPanel : public wxPanel
+{
+ DECLARE_EVENT_TABLE()
+public:
+ wxCDMCMakeListsDescriptionPanel(
+ wxWindow* parent,
+ modelCDMCMakeListsFile* makefile,
+ wxWindowID id = -1,
+ const wxString& caption = _("Description Frame"),
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE
+ );
+
+ ~wxCDMCMakeListsDescriptionPanel();
+
+ bool Create(
+ wxWindow* parent,
+ modelCDMCMakeListsFile* blackBox,
+ wxWindowID id = -1,
+ const wxString& caption = _("Description Frame"),
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE
+ );
+
+ void CreateControls();
+
+private:
+ modelCDMCMakeListsFile* cMakeLists;
+
+ //handlers
+protected:
+ void OnBtnOpenInEditor(wxCommandEvent& event);
+};
+
+#endif /* WXCDMCMAKELISTSDESCRIPTIONPANEL_H_ */
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------
+ */
+
+/*
+ * wxCDMBlackBoxDescriptionPanel.cpp
+ *
+ * Created on: Nov 27, 2012
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#include "wxCDMFileDescriptionPanel.h"
+
+#include<sstream>
+
+#include "creaDevManagerIds.h"
+#include "images/FlIcon.xpm"
+
+BEGIN_EVENT_TABLE(wxCDMFileDescriptionPanel, wxPanel)
+EVT_MENU(ID_BUTTON_OPEN_FOLDER, wxCDMFileDescriptionPanel::OnBtnOpenContainingFolder)
+EVT_MENU(ID_BUTTON_OPEN_COMMAND, wxCDMFileDescriptionPanel::OnBtnOpenWithCommand)
+END_EVENT_TABLE()
+
+wxCDMFileDescriptionPanel::wxCDMFileDescriptionPanel(
+ wxWindow* parent,
+ modelCDMFile* file,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style
+)
+{
+ wxCDMFileDescriptionPanel::Create(parent, file, id, caption, pos, size, style);
+}
+
+wxCDMFileDescriptionPanel::~wxCDMFileDescriptionPanel()
+{
+}
+
+bool wxCDMFileDescriptionPanel::Create(
+ wxWindow* parent,
+ modelCDMFile* file,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style
+)
+{
+ wxPanel::Create(parent, id, pos, size, style);
+ this->file = file;
+ CreateControls();
+ return TRUE;
+}
+
+void wxCDMFileDescriptionPanel::CreateControls()
+{
+ wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
+
+ //Welcome
+ sizer->Add(new wxStaticText(this, -1, _("File")),0, wxALIGN_CENTER, 0);
+
+ //Image
+ sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(FlIcon)),0, wxALIGN_CENTER, 0);
+
+ //BlackBox Name
+ sizer->Add(new wxStaticText(this, -1, crea::std2wx(this->file->GetName())),0, wxALIGN_CENTER, 0);
+
+ //BlackBox Properties
+ wxStaticBox* propertiesBox = new wxStaticBox(this, -1, _T("&Properties"));
+ wxStaticBoxSizer* propertiesBoxInnerSizer = new wxStaticBoxSizer(propertiesBox, wxVERTICAL);
+
+ wxFlexGridSizer* flexGridSizer = new wxFlexGridSizer(4, 2, 9, 15);
+
+ wxStaticText *pLocation = new wxStaticText(this, -1, wxT("Location"));
+ wxStaticText *pLength = new wxStaticText(this, -1, wxT("File Length"));
+
+ wxTextCtrl *pLocationtc = new wxTextCtrl(this, -1, crea::std2wx(this->file->GetPath()));
+ int lgth = this->file->GetLength();
+ std::stringstream ss;
+ ss << lgth;
+ std::string lgths = ss.str();
+ wxTextCtrl *pLengthtc = new wxTextCtrl(this, -1, crea::std2wx(lgths));
+
+ flexGridSizer->Add(pLocation, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+ flexGridSizer->Add(pLocationtc, 1, wxEXPAND);
+ flexGridSizer->Add(pLength, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+ flexGridSizer->Add(pLengthtc, 1, wxEXPAND);
+
+ propertiesBoxInnerSizer -> Add(flexGridSizer, 0, wxEXPAND);
+ sizer -> Add(propertiesBoxInnerSizer, 1, wxEXPAND | wxALL, 20);
+
+
+ //Actions
+ wxStaticBox* actionsBox = new wxStaticBox(this, -1, _T("&Actions"));
+ wxStaticBoxSizer* actionsBoxInnerSizer = new wxStaticBoxSizer(actionsBox, wxVERTICAL);
+ sizer -> Add(actionsBoxInnerSizer, 1, wxEXPAND | wxALL, 20);
+
+ actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_OPEN_FOLDER, _T("Open in File Explorer")), 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
+ actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_OPEN_COMMAND, _T("Open with a command")), 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
+
+ //Assign sizer
+ actionsBoxInnerSizer->SetSizeHints(this);
+
+ SetSizer(sizer);
+ sizer->SetSizeHints(this);
+}
+
+void wxCDMFileDescriptionPanel::OnBtnOpenContainingFolder(wxCommandEvent& event)
+{
+ //TODO: implement method
+ std::cerr << "Event OnBtnOpenContainingFolder not implemented" << std::endl;
+ event.Skip();
+}
+
+void wxCDMFileDescriptionPanel::OnBtnOpenWithCommand(wxCommandEvent& event)
+{
+ //TODO: implement method
+ std::cerr << "Event OnBtnOpenWithCommand not implemented" << std::endl;
+ event.Skip();
+}
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------
+ */
+
+/*
+ * wxCDMFileDescriptionPanel.h
+ *
+ * Created on: Nov 27, 2012
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#ifndef WXCDMFILEDESCRIPTIONPANEL_H_
+#define WXCDMFILEDESCRIPTIONPANEL_H_
+
+#include <creaWx.h>
+#include <wx/panel.h>
+
+#include "modelCDMFile.h"
+
+class wxCDMFileDescriptionPanel : public wxPanel
+{
+ DECLARE_EVENT_TABLE()
+public:
+ wxCDMFileDescriptionPanel(
+ wxWindow* parent,
+ modelCDMFile* file,
+ wxWindowID id = -1,
+ const wxString& caption = _("Description Frame"),
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE
+ );
+
+ ~wxCDMFileDescriptionPanel();
+
+ bool Create(
+ wxWindow* parent,
+ modelCDMFile* file,
+ wxWindowID id = -1,
+ const wxString& caption = _("Description Frame"),
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE
+ );
+
+ void CreateControls();
+
+private:
+ modelCDMFile* file;
+
+ //handlers
+protected:
+ void OnBtnOpenContainingFolder(wxCommandEvent& event);
+ void OnBtnOpenWithCommand(wxCommandEvent& event);
+
+};
+
+#endif /* WXCDMBLACKBOXDESCRIPTIONPANEL_H_ */
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------
+ */
+
+/*
+ * wxCDMFolderDescriptionPanel.cpp
+ *
+ * Created on: Nov 27, 2012
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#include "wxCDMFolderDescriptionPanel.h"
+
+#include "creaDevManagerIds.h"
+#include "images/FdIcon.xpm"
+
+BEGIN_EVENT_TABLE(wxCDMFolderDescriptionPanel, wxPanel)
+EVT_MENU(ID_BUTTON_OPEN_FOLDER, wxCDMFolderDescriptionPanel::OnBtnOpenInExplorer)
+EVT_MENU(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMFolderDescriptionPanel::OnBtnEditCMakeLists)
+END_EVENT_TABLE()
+
+wxCDMFolderDescriptionPanel::wxCDMFolderDescriptionPanel(
+ wxWindow* parent,
+ modelCDMFolder* folder,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style
+)
+{
+ wxCDMFolderDescriptionPanel::Create(parent, folder, id, caption, pos, size, style);
+}
+
+wxCDMFolderDescriptionPanel::~wxCDMFolderDescriptionPanel()
+{
+}
+
+bool wxCDMFolderDescriptionPanel::Create(
+ wxWindow* parent,
+ modelCDMFolder* folder,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style
+)
+{
+ wxPanel::Create(parent, id, pos, size, style);
+ this->folder = folder;
+ CreateControls();
+ return TRUE;
+}
+
+void wxCDMFolderDescriptionPanel::CreateControls()
+{
+ wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
+
+ //Welcome
+ sizer->Add(new wxStaticText(this, -1, _("Folder")),0, wxALIGN_CENTER, 0);
+
+ //Image
+ sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(FdIcon)),0, wxALIGN_CENTER, 0);
+
+ //Welcome
+ sizer->Add(new wxStaticText(this, -1, crea::std2wx(this->folder->GetName())),0, wxALIGN_CENTER, 0);
+
+ //Actions
+ wxStaticBox* actionsBox = new wxStaticBox(this, -1, _T("&Actions"));
+ wxStaticBoxSizer* actionsBoxInnerSizer = new wxStaticBoxSizer(actionsBox, wxVERTICAL);
+ sizer -> Add(actionsBoxInnerSizer, 1, wxEXPAND | wxALL, 20);
+
+ actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_OPEN_FOLDER, _T("Open in File Explorer")), 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
+ if(this->folder->HasCMakeLists())
+ {
+ actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File")), 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
+ }
+
+ //Assign sizer
+ actionsBoxInnerSizer->SetSizeHints(this);
+
+ SetSizer(sizer);
+ sizer->SetSizeHints(this);
+}
+
+void wxCDMFolderDescriptionPanel::OnBtnOpenInExplorer(wxCommandEvent& event)
+{
+ //TODO: implement method
+ std::cerr << "Event OnBtnOpenInExplorer not implemented" << std::endl;
+ event.Skip();
+}
+
+void wxCDMFolderDescriptionPanel::OnBtnEditCMakeLists(wxCommandEvent& event)
+{
+ //TODO: implement method
+ std::cerr << "Event OnBtnEditCMakeLists not implemented" << std::endl;
+ event.Skip();
+}
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------
+ */
+
+/*
+ * wxCDMFolderDescriptionPanel.h
+ *
+ * Created on: Dic 3, 2012
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#ifndef WXCDMFOLDERDESCRIPTIONPANEL_H_
+#define WXCDMFOLDERDESCRIPTIONPANEL_H_
+
+#include <creaWx.h>
+#include <wx/panel.h>
+
+#include "modelCDMFolder.h"
+
+class wxCDMFolderDescriptionPanel : public wxPanel
+{
+ DECLARE_EVENT_TABLE()
+public:
+ wxCDMFolderDescriptionPanel(
+ wxWindow* parent,
+ modelCDMFolder* folder,
+ wxWindowID id = -1,
+ const wxString& caption = _("Description Frame"),
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE
+ );
+
+ ~wxCDMFolderDescriptionPanel();
+
+ bool Create(
+ wxWindow* parent,
+ modelCDMFolder* folder,
+ wxWindowID id = -1,
+ const wxString& caption = _("Description Frame"),
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE
+ );
+
+ void CreateControls();
+
+private:
+ modelCDMFolder* folder;
+
+ //handlers
+protected:
+ void OnBtnEditCMakeLists(wxCommandEvent& event);
+ void OnBtnOpenInExplorer(wxCommandEvent& event);
+
+};
+
+#endif /* WXCDMLIBDESCRIPTIONPANEL_H_ */
#include <creaWx.h>
#include "wx/treectrl.h"
+#include "wx/treebase.h"
#include "CDMUtilities.h"
#include "creaDevManagerIds.h"
#include "wxCDMLibraryDescriptionPanel.h"
#include "wxCDMPackageDescriptionPanel.h"
#include "wxCDMBlackBoxDescriptionPanel.h"
+#include "wxCDMCMakeListsDescriptionPanel.h"
+#include "wxCDMFolderDescriptionPanel.h"
+#include "wxCDMFileDescriptionPanel.h"
#include "wxCDMProjectActionsPanel.h"
#include "wxCDMNewProjectDialog.h"
EVT_BUTTON(ID_BUTTON_NEWPROJECT, wxCDMMainFrame::OnMenuNewProject)
EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCDMMainFrame::OnMenuOpenProject)
EVT_TREE_SEL_CHANGED(ID_TREE_PROJECTS, wxCDMMainFrame::OnTreeSelectionChanged)
+EVT_COMMAND(wxID_ANY, wxEVT_DISPLAY_CHANGED, wxCDMMainFrame::OnCreationComplete)
END_EVENT_TABLE()
wxCDMMainFrame::wxCDMMainFrame(
return TRUE;
}
+void wxCDMMainFrame::RefreshProject()
+{
+ std::string* result;
+ std::cout << "refreshing project" << std::endl;
+ this->model->RefreshProject(result);
+ std::cout << "rebuilding project tree" << std::endl;
+ this->tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
+}
+
void wxCDMMainFrame::CreateMenus()
{
wxMenuBar* menuBar = new wxMenuBar;
}
void wxCDMMainFrame::OnMenuCloseProject(wxCommandEvent& event)
{
+ std::cout << "closing project" << std::endl;
std::string* result;
if(!this->model->CloseProject(result))
{
std::cout << "error closing project: " << *result << std::endl;
wxMessageBox( crea::std2wx(result->c_str()), wxT("Close Project - Error"), wxICON_ERROR);
}
+
tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
if(this->panel_Properties != NULL)
//delete old view
if(this->panel_Properties!= NULL)
{
+ auiManager.DetachPane(this->panel_Properties);
this->panel_Properties->Hide();
this->panel_Properties->Destroy();
- auiManager.DetachPane(this->panel_Properties);
-
}
+
//set new view
this->panel_Properties = description;
auiManager.AddPane(panel_Properties, wxCENTER, wxT("Properties"));
event.Skip();
return;
}
- //TODO: CMakeLists
- //TODO: folder
+ //CMakeLists
+ modelCDMCMakeListsFile* elementCMakeLists = dynamic_cast<modelCDMCMakeListsFile*>(element);
+ if(elementCMakeLists != NULL)
+ {
+ //create element description
+ wxCDMCMakeListsDescriptionPanel* description = new wxCDMCMakeListsDescriptionPanel(
+ this,
+ elementCMakeLists,
+ ID_WINDOW_PROPERTIES,
+ wxT("Description Panel"),
+ wxDefaultPosition,
+ wxSize(300, 400),
+ 0
+ );
+ //delete old view
+ if(this->panel_Properties!= NULL)
+ {
+ this->panel_Properties->Hide();
+ this->panel_Properties->Destroy();
+ auiManager.DetachPane(this->panel_Properties);
+
+ }
+ //set new view
+ this->panel_Properties = description;
+ auiManager.AddPane(panel_Properties, wxCENTER, wxT("Properties"));
+ auiManager.Update();
+ event.Skip();
+ return;
+ }
+ //folder
+ modelCDMFolder* elementFolder = dynamic_cast<modelCDMFolder*>(element);
+ if(elementFolder != NULL)
+ {
+ //create element description
+ wxCDMFolderDescriptionPanel* description = new wxCDMFolderDescriptionPanel(
+ this,
+ elementFolder,
+ ID_WINDOW_PROPERTIES,
+ wxT("Description Panel"),
+ wxDefaultPosition,
+ wxSize(300, 400),
+ 0
+ );
+ //delete old view
+ if(this->panel_Properties!= NULL)
+ {
+ this->panel_Properties->Hide();
+ this->panel_Properties->Destroy();
+ auiManager.DetachPane(this->panel_Properties);
+
+ }
+ //set new view
+ this->panel_Properties = description;
+ auiManager.AddPane(panel_Properties, wxCENTER, wxT("Properties"));
+ auiManager.Update();
+ event.Skip();
+ return;
+ }
//TODO: file
- //TODO: main
+ modelCDMFile* elementFile = dynamic_cast<modelCDMFile*>(element);
+ if(elementFile != NULL)
+ {
+ //create element description
+ wxCDMFileDescriptionPanel* description = new wxCDMFileDescriptionPanel(
+ this,
+ elementFile,
+ ID_WINDOW_PROPERTIES,
+ wxT("Description Panel"),
+ wxDefaultPosition,
+ wxSize(300, 400),
+ 0
+ );
+ //delete old view
+ if(this->panel_Properties!= NULL)
+ {
+ this->panel_Properties->Hide();
+ this->panel_Properties->Destroy();
+ auiManager.DetachPane(this->panel_Properties);
+
+ }
+ //set new view
+ this->panel_Properties = description;
+ auiManager.AddPane(panel_Properties, wxCENTER, wxT("Properties"));
+ auiManager.Update();
+ event.Skip();
+ return;
+ }
+
+ //main if not any
//create element description
wxCDMMainDescriptionPanel* description = new wxCDMMainDescriptionPanel(
this,
return;
}
+
+void wxCDMMainFrame::OnCreationComplete(wxCommandEvent& event)
+{
+ std::cout << "inMainFrame " << event.GetInt() << std::endl;
+ this->tree_Projects->SelectItem(event.GetInt());
+ event.Skip();
+}
long style = wxDEFAULT_FRAME_STYLE
);
+ void RefreshProject();
+
protected:
void CreateMenus();
void CreateControls();
//Tree
void OnTreeSelectionChanged(wxTreeEvent& event);
+
+ //PropertiesPanel
+ void OnCreationComplete(wxCommandEvent& event);
};
#endif
#include "wxCDMProjectDescriptionPanel.h"
+#include "wxCDMMainFrame.h"
+
#include "creaDevManagerIds.h"
#include "images/PrIcon.xpm"
BEGIN_EVENT_TABLE(wxCDMProjectDescriptionPanel, wxPanel)
-EVT_MENU(ID_BUTTON_CREATE_PACKAGE, wxCDMProjectDescriptionPanel::OnBtnCreatePackage)
-EVT_MENU(ID_BUTTON_CREATE_BLACKBOX, wxCDMProjectDescriptionPanel::OnBtnCreateBlackBox)
-EVT_MENU(ID_BUTTON_CREATE_LIBRARY, wxCDMProjectDescriptionPanel::OnBtnCreateLibrary)
-EVT_MENU(ID_BUTTON_CREATE_APPLICATION, wxCDMProjectDescriptionPanel::OnBtnCreateApplication)
-EVT_MENU(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMProjectDescriptionPanel::OnBtnEditCMakeLists)
+EVT_BUTTON(ID_BUTTON_CREATE_PACKAGE, wxCDMProjectDescriptionPanel::OnBtnCreatePackage)
+EVT_BUTTON(ID_BUTTON_CREATE_BLACKBOX, wxCDMProjectDescriptionPanel::OnBtnCreateBlackBox)
+EVT_BUTTON(ID_BUTTON_CREATE_LIBRARY, wxCDMProjectDescriptionPanel::OnBtnCreateLibrary)
+EVT_BUTTON(ID_BUTTON_CREATE_APPLICATION, wxCDMProjectDescriptionPanel::OnBtnCreateApplication)
+EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMProjectDescriptionPanel::OnBtnEditCMakeLists)
+EVT_COMMAND(wxID_ANY, wxEVT_DISPLAY_CHANGED, wxCDMProjectDescriptionPanel::OnCreationComplete)
END_EVENT_TABLE()
wxCDMProjectDescriptionPanel::wxCDMProjectDescriptionPanel(
void wxCDMProjectDescriptionPanel::OnBtnCreateLibrary(wxCommandEvent& event)
{
- //TODO: implement method
+ //implement method
std::cerr << "Event OnBtnCreatePackage not implemented" << std::endl;
+ wxString libraryName = wxGetTextFromUser(
+ _T("Enter the new library name"),
+ _T("New Library - creaDevManager"),
+ _T("")
+ );
+ std::string* result;
+ modelCDMIProjectTreeNode* library = this->project->CreateLibrary(crea::wx2std(libraryName),result);
+ if(library == NULL)
+ {
+ wxMessageBox(crea::std2wx(*result),_T("New Library - Error!"),wxOK | wxICON_ERROR);
+ event.Skip();
+ return;
+ }
+ wxMessageBox(crea::std2wx("Library successfully created."),_T("New Library - Success!"),wxOK | wxICON_INFORMATION);
+
+ //send event instead of calling parent to avoid crashing
+ ((wxCDMMainFrame*)this->GetParent())->RefreshProject();
+
+ wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
+ newEvent->SetInt(library->GetId());
+ wxPostEvent(this->GetParent(), *newEvent);
event.Skip();
}
std::cerr << "Event OnBtnCreatePackage not implemented" << std::endl;
event.Skip();
}
+
+void wxCDMProjectDescriptionPanel::OnCreationComplete(wxCommandEvent& event)
+{
+ std::cout << "catched" << std::endl;
+
+}
{
DECLARE_EVENT_TABLE()
public:
+
wxCDMProjectDescriptionPanel(
wxWindow* parent,
modelCDMProject* project,
void OnBtnCreateLibrary(wxCommandEvent& event);
void OnBtnCreateApplication(wxCommandEvent& event);
void OnBtnEditCMakeLists(wxCommandEvent& event);
-
+ void OnCreationComplete(wxCommandEvent& event);
};
#endif /* WXCDMPROJECTDESCRIPTIONPANEL_H_ */
);
void BuildTree(std::map< wxTreeItemId, modelCDMIProjectTreeNode* >& modelElements, modelCDMProject* tree = NULL);
+
private:
void BuildTree(const std::vector<modelCDMIProjectTreeNode*>& tree, std::map< wxTreeItemId, modelCDMIProjectTreeNode* >& modelElements, wxTreeItemId parent);
};