Add rayman2 source files
This commit is contained in:
20
Rayman_X/cpa/tempgrp/TAc/doc/Help/Act_Help.hpj
Normal file
20
Rayman_X/cpa/tempgrp/TAc/doc/Help/Act_Help.hpj
Normal file
@@ -0,0 +1,20 @@
|
||||
; This file is maintained by HCW. Do not modify this file directly.
|
||||
|
||||
[OPTIONS]
|
||||
HCW=0
|
||||
COMPRESS=12 Hall Zeck
|
||||
LCID=0x40c 0x0 0x0 ;Fran<61>ais - standard
|
||||
REPORT=Yes
|
||||
TITLE=Action Editor Help
|
||||
BMROOT=bmp
|
||||
BMROOT=shg
|
||||
HLP=.\Act_Help.hlp
|
||||
|
||||
[FILES]
|
||||
.\Help2.rtf
|
||||
|
||||
[WINDOWS]
|
||||
Test="Action Helper",(653,102,360,600),54020,(r13041663),(r12632256),f3
|
||||
|
||||
[CONFIG]
|
||||
BrowseButtons()
|
239
Rayman_X/cpa/tempgrp/TAc/doc/Help/Help2.rtf
Normal file
239
Rayman_X/cpa/tempgrp/TAc/doc/Help/Help2.rtf
Normal file
@@ -0,0 +1,239 @@
|
||||
{\rtf1\ansi \deff4\deflang1033{\fonttbl{\f4\froman\fcharset0\fprq2 Times New Roman;}{\f5\fswiss\fcharset0\fprq2 Arial;}{\f27\fnil\fcharset2\fprq2 Wingdings;}{\f33\fswiss\fcharset0\fprq2 Arial Black;}}
|
||||
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
|
||||
\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\widctlpar \f4\fs20\lang1036 \snext0 Normal;}{\*\cs10 \additive Default Paragraph Font;}{\s15\widctlpar \f4\fs20\lang1036
|
||||
\sbasedon0\snext15 footnote text;}{\s16\sa360\widctlpar \b\scaps\f33\fs40\expnd4\expndtw20\cf6\lang1036 \sbasedon0\snext16 Titre g\'e9n\'e9ral;}{\s17\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \sbasedon0\snext17 Titre Page;}{
|
||||
\s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 \sbasedon0\snext18 Puce ronde;}{\*\cs19 \additive\super \sbasedon10 footnote reference;}{\*\cs20 \additive\b\f4\fs24\cf6 \sbasedon10 Normal rouge;}{\*\cs21 \additive\b\f5\fs20 \sbasedon10
|
||||
R\'e9f\'e9rence;}}{\info{\author Marc Trabucato}{\operator Marc Trabucato}{\creatim\yr1997\mo2\dy21\hr17\min10}{\revtim\yr1997\mo4\dy29\hr18\min2}{\version3}{\edmins7}{\nofpages74}{\nofwords1891}{\nofchars10779}{\*\company UBI SOFT}{\vern57443}}
|
||||
\paperw11906\paperh16838\margl1417\margr1417\margt1417\margb1417 \deftab708\widowctrl\ftnbj\aenddoc\hyphhotz425\hyphcaps0\formshade \fet0\sectd \linex0\headery709\footery709\colsx709\endnhere {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}
|
||||
{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}
|
||||
{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9
|
||||
\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s16\sa360\keepn\widctlpar \b\scaps\f33\fs40\expnd4\expndtw20\cf6\lang1036 {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_PRESENTATION}K
|
||||
{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super K} Pr\'e9sentation}+{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super +} PAGE_010}${\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super $} Une Pr\'e9
|
||||
sentation}} \{bml UbiLogo.bmp\}L'editeur d'actions\line {\cs20\b0\scaps0\f4\fs16\uld\cf0 Auteur}{\cs20\b0\scaps0\v\f4\fs16\cf0 ID_AUTEUR}
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par Cet \'e9diteur permet de travailler sur :
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 les actions
|
||||
\par les \'e9tats
|
||||
\par les listes d\rquote activations.
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par Il est capable de cr\'e9er et de supprimer des actions dans une famille, de cr\'e9er, \'e9diter et supprimer des \'e9tats dans une action, ainsi que de d\'e9finir des listes d\rquote activations de zones.
|
||||
\par Il utilise les parties gauche et basse de l\rquote interface, et est constitu\'e9 des 6 boites dialogues suivantes\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} {\uldb la liste des familles}{\v ID_DLG_FAMILLE},
|
||||
\par {\b\f27\cf2 \'fc} {\uldb la liste des actions}{\v ID_DLG_ACTION} de la famille s\'e9lectionn\'e9e,
|
||||
\par {\b\f27\cf2 \'fc} {\uldb la liste des \'e9tats}{\v ID_DLG_ETAT} de l\rquote action s\'e9lectionn\'e9e,
|
||||
\par {\pntext\pard\plain\b\f27\fs20\cf2 \'fc\tab}\pard \s18\fi-283\li850\widctlpar\tx284{\*\pn \pnlvlblt\pnb1\pni0\pncf2\pnf27\pnfs20\pnstart1\pnindent283\pnhang{\pntxtb \'fc}}{\uldb le contenu}{\v ID_DLG_CONTENU} de l\rquote \'e9tat s\'e9lectionn\'e9
|
||||
\par {\pntext\pard\plain\b\f27\fs20\cf2 \'fc\tab}{\uldb les listes d\rquote activations de zones}{\v ID_DLG_ZALIST} associ\'e9es \'e0 l\rquote \'e9tat s\'e9lectionn\'e9.
|
||||
\par {\pntext\pard\plain\b\f27\fs20\cf2 \'fc\tab}{\uldb les activations de zones}{\v ID_DLG_ZA} de la famille s\'e9lectionn\'e9e.
|
||||
\par \pard\plain \s17\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_DLG_FAMILLE}+{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {
|
||||
\cs19\super +} PAGE_020}${\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super $} Liste des familles}} La liste des familles
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par Cette boite de dialogue permet de choisir la famille dont on veut modifier les actions et les \'e9tats.
|
||||
\par \pard\plain \s17\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_DLG_ACTION}+{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {
|
||||
\cs19\super +} PAGE_040}${\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super $} Liste des actions}} La liste des actions
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par \{bmc DlgAction2.shg\}
|
||||
\par
|
||||
\par La liste contient l\rquote ensemble des actions de la famille s\'e9lectionn\'e9e. Cette boite de dialogue permet de\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} cr\'e9er une action (bouton {\b\f5 New} ou touche \{bmc Inser.bmp\}),
|
||||
\par {\b\f27\cf2 \'fc} copier l\rquote action s\'e9l\'e9ctionn\'e9e (bouton {\b\f5 Copy}),
|
||||
\par {\b\f27\cf2 \'fc} renommer l\rquote action s\'e9lectionn\'e9e (bouton {\b\f5 Rename}),
|
||||
\par {\b\f27\cf2 \'fc} supprimer l\rquote action s\'e9lectionn\'e9e (bouton {\b\f5 Delete} ou touche \{bmc Suppr.bmp\}),
|
||||
\par {\b\f27\cf2 \'fc} supprimer toutes les actions de la famille (bouton {\b\f5 Delete All}).
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par Chacune des ces actions peut \'eatre effectu\'e9e en utilisant les boutons situ\'e9s au-dessus de la liste, ou en faisant appara\'eetre un {\uld menu contextuel}{\v ID_MENu_CONTEXTUEL} avec le bouton droit de la souris.
|
||||
\par
|
||||
\par
|
||||
\par {\cs20\b\fs28\ul\cf12 Remarques :}{\fs28\ul\cf12
|
||||
\par }\pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf16 \'c4} la suppression d\rquote une action entra\'eene la suppression de tous les \'e9tats de cette action.
|
||||
\par {\b\f27\cf16 \'c4} la copie d\rquote une action entra\'eene la copie de tous les \'e9tats de cette action, en conservant {\uld l\rquote enchainement des \'e9tats}{\v ID_COPIE_ACTION}.
|
||||
\par \pard\plain \s17\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_DLG_ETAT}+{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super +
|
||||
} PAGE_050}${\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super $} Liste des \'e9tats}} La liste des \'e9tats
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par \{bmc DlgEtat.shg\}
|
||||
\par
|
||||
\par La liste contient l\rquote ensemble des \'e9tats de l\rquote action s\'e9lectionn\'e9e. Cette boite de dialogue permet de\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} cr\'e9er un nouvel \'e9tat (bouton {\b\f5 New}),
|
||||
\par {\b\f27\cf2 \'fc} copier l\rquote \'e9tat s\'e9lectionn\'e9 (bouton {\b\f5 Copy}),
|
||||
\par {\b\f27\cf2 \'fc} renommer l\rquote \'e9tat s\'e9lectionn\'e9 (bouton {\b\f5 Rename}),
|
||||
\par {\b\f27\cf2 \'fc} supprimer l\rquote \'e9tat s\'e9lectionn\'e9 (bouton {\b\f5 Delete} ou touche \{bmc Suppr.bmp\}),
|
||||
\par {\b\f27\cf2 \'fc} supprimer tous les \'e9tats de l\rquote action courante (bouton {\b\f5 Delete All}),
|
||||
\par {\b\f27\cf2 \'fc} faire de l\rquote \'e9tat s\'e9lectionn\'e9 {\uld l\rquote \'e9tat par d\'e9faut}{\v ID_ETAT_DEFAUT} de l\rquote action courante (bouton {\b\f5 Default}),
|
||||
\par
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036 Chacune des ces actions peut \'eatre effectu\'e9e en utilisant les boutons situ\'e9s au-dessus de la liste, ou en faisant appara\'eetre un menu contextuel avec le bouton droit de la souris.
|
||||
\par Ce menu contextuel permet de plus de conna\'eetre {\uld l\rquote encha\'eenement des \'e9tats}{\v ID_ENCHAINEMENT_ETAT} \'e0 partir de l\rquote \'e9tat s\'e9lectionn\'e9.
|
||||
\par \pard\plain \s17\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_DLG_CONTENU}+{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {
|
||||
\cs19\super +} PAGE_060}${\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super $} Contenu d\rquote un \'e9tat}} Le contenu d\rquote un \'e9tat
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par \{bmc DlgContent.shg\}
|
||||
\par
|
||||
\par Cette boite de dialogue permet de d\'e9finir l\rquote ensemble des param\'e8tres d\rquote un \'e9tat. Il est ainsi possible de modifier\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} l\rquote animation de l\rquote \'e9tat,
|
||||
\par {\b\f27\cf2 \'fc} le nombre de r\'e9p\'e9tition de l\rquote \'e9tat,
|
||||
\par {\b\f27\cf2 \'fc} la vitesse d\rquote ex\'e9cution de l\rquote \'e9tat,
|
||||
\par {\b\f27\cf2 \'fc} la m\'e9canique de l\rquote \'e9tat,
|
||||
\par {\b\f27\cf2 \'fc} la liste des {\uld actions qui peuvent interrompre l\rquote \'e9tat}{\v ID_ACTION_INTERROMPANT}, en utilisant \'e9ventuellement un {\uld \'e9tat de transition}{\v ID_ETAT_TRANSITION}.
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par Pour faire interrompre un \'e9tat par une action, il faut faire appara\'eetre une croix (\{bmc croix.bmp\}) devant le nom de l\rquote action en cliquant devant ce nom, ou en utilisant la barre d\rquote espace lorsque l\rquote action est s\'e9lectionn\'e9
|
||||
e.
|
||||
\par Pour utiliser en plus un \'e9tat de transition, il faut s\'e9lectionner l\rquote action dans la liste des actions de la fen\'eatre, puis choisir cet \'e9tat dans la liste des \'e9tats possibles, sous la liste des noms des actions. Dans cette liste n
|
||||
\rquote apparaissent que les {\uld \'e9tats de transition}{\v ID_ETAT_TRANSITION} de l\rquote action s\'e9lectionn\'e9e au dessus.
|
||||
\par \pard\plain \s17\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_DLG_ZALIST}+{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {
|
||||
\cs19\super +} PAGE_070}${\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super $} Liste des activations de zones}} Les listes d\rquote activations de zones
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par \{bmc DlgZALis.shg\}
|
||||
\par
|
||||
\par Cette boite de dialogue permet de cr\'e9er et modifier {\uld les listes d\rquote activations de zones}{\v ID_ZALIST} de la famille s\'e9lectionn\'e9e.
|
||||
\par
|
||||
\par La premi\'e8re ComboBox (haut) permet de choisir la liste de noms de zones du type s\'e9lectionn\'e9 dont d\'e9rive la liste d\rquote activation que l\rquote on veut \'e9diter.
|
||||
\par
|
||||
\par La deuxi\'e8me ComboBox (milieu) permet de choisir la {\uld liste d\rquote activations de zones}{\v ID_ZALIST} que l\rquote on veut \'e9diter.
|
||||
\par
|
||||
\par Le bouton \ldblquote \~{\b\f5 ...}\~\rdblquote ouvre un menu qui permet de\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} cr\'e9er une nouvelle liste d\rquote activations de zones si le nom saisi dans la ComboBox est nouveau (bouton {\b\f5 Add}),
|
||||
\par {\b\f27\cf2 \'fc} renommer (bouton {\b\f5 Rename}) ou supprimer (bouton {\b\f5 Delete}) la liste si le nom est celui d\rquote une liste existante.
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par La troisi\'e8me ComboBox (bas) permet d\rquote \'e9diter l\rquote activation de zones associ\'e9e \'e0 l\rquote \'e9tat courant. (l\rquote activation s\'e9lectionn\'e9e devient alors l\rquote activation courante dans la {\uld boide de dialogue d\rquote
|
||||
\'e9dition des activations}{\v ID_BMP_DLG_ZA})
|
||||
\par
|
||||
\par Le bouton {\b\f5 Extend To Action} permet d\rquote associer l\rquote activation de zones s\'e9lectionn\'e9e \'e0 tous les \'e9tats de l\rquote action courante.
|
||||
\par
|
||||
\par Le bouton {\b\f5 Extend To Family} permet d\rquote associer l\rquote activation de zones s\'e9lectionn\'e9e \'e0 tous les \'e9tats de la famille courante.
|
||||
\par
|
||||
\par
|
||||
\par {\cs20\b\fs24\cf6 Rem\~:} Le nom de la liste doit \'eatre unique dans la famille.
|
||||
\par
|
||||
\par \pard\plain \s17\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_DLG_ZA}+{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super +}
|
||||
PAGE_080}} Les activations de zones
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par \{bmc DlgZA.shg\}
|
||||
\par
|
||||
\par Cette boite de dialogue permet de cr\'e9er et modifier les {\uld activations de zones}{\v ID_ZA} de la famille, activations de zones que l\rquote on pourra associer \'e0 des \'e9tats dans des listes d\rquote activations de zones.
|
||||
\par
|
||||
\par La premi\'e8re ComboBox (haut) permet de choisir la liste de noms de zones du type s\'e9lectionn\'e9 dont d\'e9rive la liste d\rquote activation que l\rquote on veut \'e9diter.
|
||||
\par
|
||||
\par La seconde ComboBox (bas) permet de choisir l{\uld \rquote activation de zones}{\v ID_ZALIST} que l\rquote on veut \'e9diter.
|
||||
\par
|
||||
\par Le bouton \ldblquote \~{\b\f5 ...}\~\rdblquote ouvre un menu qui permet de\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} cr\'e9er une nouvelle activation de zones si le nom saisi dans la ComboBox est nouveau (bouton {\b\f5 Add}),
|
||||
\par {\b\f27\cf2 \'fc} renommer (bouton {\b\f5 Rename}) ou supprimer (bouton {\b\f5 Delete}) la liste si le nom est celui d\rquote une activation existante.
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par Lorsqu\rquote une liste de noms est s\'e9lectionn\'e9e, ses noms apparaissent dans la liste.
|
||||
\par
|
||||
\par Lorsqu\rquote une activation est sont s\'e9lectionn\'e9e, il est possible d\rquote activer des zones en cliquant devant leur nom, une croix apparaissant alors en face de ce nom. Il est aussi possible de basculer l\rquote activation de la zone en la s\'e9
|
||||
lectionnant puis en utilisant la barre d\rquote espace.
|
||||
\par
|
||||
\par \pard\plain \s17\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_CREER_ACTION}} Cr\'e9ation d\rquote une action
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036 Pour cr\'e9er une action, il faut utiliser le bouton {\b\f5 New} situ\'e9 au dessus de {\uld la liste des actions}{\v ID_BMP_DLG_ACTION} sur la partie gauche de l\rquote \'e9cran
|
||||
\par
|
||||
\par {\cs20\b\fs24\cf6 Rem\~:} il est aussi possible de cr\'e9er une action en dupliquant une action existante en utilisant le bouton {\b\f5 Copy} situ\'e9 au dessus de {\uld la liste des actions}{\v ID_BMP_DLG_ACTION} sur la partie gauche de l\rquote \'e9cran
|
||||
|
||||
\par \pard\plain \s17\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_CREER_ETAT}} Cr\'e9ation d\rquote un \'e9tat
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par \{bmc DlgEtat.shg\}
|
||||
\par
|
||||
\par Il est possiblede cr\'e9er un \'e9tat en utilisant\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} le bouton {\b\f5 Copy} qui cr\'e9e une {\uld copie de l\rquote \'e9tat courant}{\v ID_COPIE_ETAT}\~,
|
||||
\par {\b\f27\cf2 \'fc} le bouton {\b\f5 New}, qui ouvre la boite de dialogue suivante.
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par \{bmc DlgNwSt.shg\}
|
||||
\par
|
||||
\par Cette boite de dialogue permet de saisir le nom du nouvel \'e9tat, et de choisir si l\rquote on veut cr\'e9er un \'e9tat normal ou un {\uld \'e9tat de transition}{\v ID_ETAT_TRANSITION}.
|
||||
\par Si le nom saisi n\rquote est pas {\uld valide}{\v ID_NOM_VALIDE}, un nom par d\'e9faut est affect\'e9 au nouvel \'e9tat.
|
||||
\par
|
||||
\par {\cs20\b\fs24\cf6 Rem\~:} par d\'e9faut, le nouvel \'e9tat n\rquote a pas d\rquote animation.
|
||||
\par \pard\plain \s17\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_CREER_ZALIST}} Cr\'e9ation d\rquote une liste d\rquote activations de zones
|
||||
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par \{bmc DlgZALis.shg\}
|
||||
\par
|
||||
\par On peut cr\'e9er une liste d\rquote activations de zones en saisissant son nom dans la ComboBox des listes d\rquote activations, puis en cliquant sur le bouton \ldblquote \~{\b\f5 ...}\~\rdblquote , qui fait appara\'eetre un menu dans lequel on s\'e9
|
||||
lectionne l\rquote entr\'e9e {\b\f5 Add}.
|
||||
\par De m\'eame, il est possible de renommer ou supprimer une liste d\rquote activations de zones en s\'e9lectionnant cette liste dans la ComboBox, puis en cliquant sur le bouton \ldblquote \~{\b\f5 ...}\~\rdblquote et en s\'e9lectionnant l\rquote entr\'e9e {
|
||||
\b\f5 Rename} ou {\b\f5 Delete}.
|
||||
\par
|
||||
\par Le nom de la liste doit \'eatre unique dans la famille.
|
||||
\par \pard\plain \s17\sa120\keepn\widctlpar \b\f4\fs32\expnd4\expndtw20\cf2\lang1036 \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_CREER_ZA}} Cr\'e9ation d\rquote un activation de zones
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036
|
||||
\par \{bmc DlgZA.shg\}
|
||||
\par
|
||||
\par On peut cr\'e9er une activation de zones en saisissant son nom dans la ComboBox des activations, puis en cliquant sur le bouton \ldblquote \~{\b\f5 ...}\~\rdblquote , qui fait appara\'eetre un menu dans lequel on s\'e9lectionne l\rquote entr\'e9e {\b\f5
|
||||
Add}.
|
||||
\par
|
||||
\par Ceci \'e9tant fait, il est possible d\rquote activer des zones en cliquant devant leur nom, une croix apparaissant alors en face de ce nom. Il est aussi possible de basculer l\rquote activation de la zone en la s\'e9
|
||||
lectionnant puis en utilisant la barre d\rquote espace.
|
||||
\par
|
||||
\par De m\'eame, il est possible de renommer ou supprimer une d\rquote activation de zones en s\'e9lectionnant cette liste dans la ComboBox, puis en cliquant sur le bouton \ldblquote \~{\b\f5 ...}\~\rdblquote et en s\'e9lectionnant l\rquote entr\'e9e {\b\f5
|
||||
Rename} ou {\b\f5 Delete}.
|
||||
\par
|
||||
\par Le nom de l\rquote activation doit \'eatre unique dans la famille.
|
||||
\par
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_COHERENCE}K{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super K} Coh\'e9rence}} Sur la coh\'e9rence\~:
|
||||
\par
|
||||
\par Lorsqu\rquote un \'e9tat est supprim\'e9, tous les \'e9tats qui l\rquote avaient pour \'e9tat suivant n\rquote ont alors plus d\rquote \'e9tat suivant.
|
||||
\par Lorsqu\rquote un \'e9tat de transition est supprim\'e9, son action interrompt alors directement les \'e9tats.
|
||||
\par Lorsqu\rquote une action est supprim\'e9e, tous ses \'e9tats sont aussi supprim\'e9s, et elle dispara\'eet de tous les \'e9tats qu\rquote elle pouvait interrompre.
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BMP_DLG_ACTION}} \{bmc DlgAction2.shg\}
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BMP_DLG_ETAT}} \{bmc DlgEtat.shg\}\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BMP_DLG_CONTENU}} \{
|
||||
bmc DlgContent.shg\}
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BMP_DLG_ZA}} \{bmc DlgZA.shg\}
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_NOM_VALIDE}} Le nom d\rquote un \'e9tat doit \'eatre unique dans sa famille
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_ETAT_TRANSITION}K{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super K} \'e9tat de transition}} \'e9tat d\rquote une action dont l\rquote \'e9
|
||||
tat suivant est l\rquote \'e9tat par d\'e9faut de l\rquote action, et qui ne peut pas \'eatre utilis\'e9 comme \'e9tat suivant d\rquote un \'e9tat, ou comme \'e9tat par d\'e9faut d\rquote une action.\page {\cs19\super #{\footnote \pard\plain
|
||||
\s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_ACTION_INTERROMPANT}K{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super K} action interrompant un \'e9tat}} Une action peut interrompre un \'e9tat\~:
|
||||
\par \pard\plain \s18\fi-284\li851\widctlpar\tx284 \f4\fs20\lang1036 {\b\f27\cf2 \'fc} directement\~: c\rquote est {\uld l\rquote \'e9tat par d\'e9faut }{\v ID_ETAT_DEFAUT} de l\rquote action qui est jou\'e9,
|
||||
\par {\b\f27\cf2 \'fc} indirectement\~: c\rquote est {\uld un \'e9tat de transition}{\v ID_ETAT_TRANSITION} de l\rquote action qui est jou\'e9
|
||||
\par \pard\plain \widctlpar \f4\fs20\lang1036 \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_ZA}} Une activation de zone contient l\rquote ensemble des zones qui sont activ\'e9es pendant l\rquote ex\'e9cution d
|
||||
\rquote un \'e9tat donn\'e9\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_ZALIST}} Une liste d\rquote activations de zones permet d\rquote associer \'e0 chaque \'e9tat de la famille une activation de zone.
|
||||
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_ENCHAINEMENT_ETAT}} liste des \'e9tats suivants jusqu'\'e0 un \'e9tat d\'e9j\'e0 rencontr\'e9 ou jusqu'\'e0 un \'e9tat d\rquote une autre action.
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_ETAT_DEFAUT}K{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super K} \'e9tat par d\'e9faut}} Etat initial de l\rquote action, \'e0
|
||||
partir duquel sera jou\'e9e cette action (notamment lorsque cette action interrompt un \'e9tat sans utiliser d\rquote \'e9tat de transition). Tous les \'e9tats de transition d\rquote une action ont pour \'e9tat suivant l\rquote \'e9tat par d\'e9
|
||||
faut de cette action.
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_AUTEUR}}\{bmc m_trabuc.bmp\}
|
||||
\par {\b\scaps\fs24\cf13 Ubi Simulations
|
||||
\par }Marc Trabucato
|
||||
\par T\'e9l\~: 04.50.52.90.84
|
||||
\par E-mail\~: mtrabucato@annecy.ubisoft.fr
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_NEW_ACT}} permet de cr\'e9er une nouvelle action\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_COPY_ACT}}
|
||||
permet de cr\'e9er une copie de l\rquote action s\'e9lectionn\'e9e (et de ses \'e9tats)
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_RENAME_ACT}} permet de renommer l\rquote action s\'e9lectionn\'e9e\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #}
|
||||
ID_BT_DELETE_ACT}} permet de supprimer l\rquote action s\'e9lectionn\'e9e (et tous ses \'e9tats)
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_DELETE_ALL_ACT}} permet de supprimer toutes les actions de la famille s\'e9lectionn\'e9e(et donc tous les \'e9tats)\page {\cs19\super #{\footnote
|
||||
\pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_LB_ACTION_ACT}} liste des actions de la famille s\'e9lectionn\'e9e\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_NEW_STA}} permet de cr\'e9
|
||||
er un nouvel \'e9tat\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_DEFAULT_STA}} l\rquote \'e9tat s\'e9lectionn\'e9 devient {\uld l\rquote \'e9tat par d\'e9faut}{\v ID_ETAT_DEFAUT} de l\rquote action
|
||||
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_COPY_STA}} permet de cr\'e9er une copie de l\rquote \'e9tat s\'e9lectionn\'e9\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {
|
||||
\cs19\super #} ID_BT_DELETE_STA}} permet de supprimer l\rquote \'e9tat s\'e9lectionn\'e9\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_RENAME_STA}} permet de renommer l\rquote \'e9tat s\'e9lectionn\'e9
|
||||
\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_DELETEALL_STA}} permet de supprimer tous les \'e9tats de l\rquote action courante\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036
|
||||
{\cs19\super #} ID_LB_ETAT_STA}} liste des \'e9tats de l\rquote action courante\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_CB_ANIM_CNT}} permet de modifier l\rquote animation associ\'e9e \'e0 l\rquote
|
||||
\'e9tat courant\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_ED_REPEAT_CNT}} permet de modifier le nombre de r\'e9p\'e9tition de l\rquote animation\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar
|
||||
\f4\fs20\lang1036 {\cs19\super #} ID_ED_SPEED_CNT}} permet de modifier la vitesse d\rquote ex\'e9cution de l\rquote animation\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_CB_NEXTSTATE_CNT}}
|
||||
permet de modifier l\rquote \'e9tat suivant de l\rquote \'e9tat courant\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_CB_MECHANIC_CNT}} permet de modifier la m\'e9canique associ\'e9e \'e0 l\rquote \'e9
|
||||
tat courant\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_LIST_ACTION_CNT}} liste des actions de la famille courante\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #}
|
||||
ID_BMP_CROIX_CNT}} active l\rquote interruption de l\rquote \'e9tat courant par l\rquote action\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_LISTE_TRSTATE_CNT}} \'e9tat de transition utilis\'e9e par l
|
||||
\rquote action pour interrompre l\rquote \'e9tat\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_ALL_CNT}} active l\rquote interruption de l\rquote \'e9tat par toutes les actions\page {\cs19\super #
|
||||
{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_USED_CNT}} n\rquote affiche que les actions qui interrompent l\rquote \'e9tat\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #}
|
||||
ID_CB_TRSTATE_CNT}} permet de modifier l\rquote \'e9tat de transition utilis\'e9 par l\rquote action\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_CB_NAMELIST_ZA}} permet de choisir la liste de noms associ
|
||||
\'e9e \'e0 l\rquote activation de zones \'e0 \'e9diter\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_CB_ZA_ZA}} permet de choisir une activation existante ou de saisir le nom d\rquote
|
||||
une nouvelle activation.\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_ACT_ZA}} fait appara\'eetre un menu qui permet d\rquote ajouter, de renommer ou de supprimer l\rquote activation de zones courante
|
||||
\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_ZDE_ZA}} permet d\rquote afficher les listes de noms de ZDE\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #}
|
||||
ID_BT_ZDM_ZA}} permet d\rquote afficher les listes de noms de ZDM\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_ZDD_ZA}} permet d\rquote afficher les listes de noms de ZDD\page {\cs19\super #{\footnote
|
||||
\pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_ZMOD_ZA}} ...\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_ZDE_ZALIST}} permet d\rquote afficher les listes de noms de ZDE\page {
|
||||
\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_ZDM_ZALIST}} permet d\rquote afficher les listes de noms de ZDM\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #}
|
||||
ID_BT_ZDD_ZALIST}} permet d\rquote afficher les listes de noms de ZDD\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_ZMOD_ZALIST}} ...\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar
|
||||
\f4\fs20\lang1036 {\cs19\super #} ID_CB_NAMESLIST_ZALIST}} permet de choisir la liste de noms associ\'e9e \'e0 la liste d\rquote activations de zones \'e0 \'e9diter\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #}
|
||||
ID_CB_ZALIST_ZALIST}} permet de choisir la liste d\rquote activations de zones \'e0 \'e9diter
|
||||
\par \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_ACT_ZALIST}} fait appara\'eetre un menu qui permet d\rquote ajouter, de renommer ou de supprimer la liste d\rquote activations de zones courante\page {
|
||||
\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_CB_ZA_ZALIST}} permet de choisir l\rquote activation associ\'e9e \'e0 l\rquote \'e9tat courant\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar
|
||||
\f4\fs20\lang1036 {\cs19\super #} ID_BT_ACTION_ZALIST}} permet d\rquote associer l\rquote activation courante \'e0 tous les \'e9tats de l\rquote action courante\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #}
|
||||
ID_BT_FAMILY_ZALIST}} permet d\rquote associer l\rquote activation courante \'e0 tous les \'e9tats de la famille courante\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_LB_ZONE_ZA}}
|
||||
affiche la liste des zones consid\'e9r\'e9es\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_LB_CROIX_ZA}} permet d\rquote activer/d\'e9sactiver une zone \page {\cs19\super #{\footnote \pard\plain
|
||||
\s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_CB_NAMESLIST_ZA}} permet de choisir la liste de noms dont d\'e9rive la liste d\rquote activations de zones \'e0 \'e9diter\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {
|
||||
\cs19\super #} ID_ED_NAME_NEWSTATE}} permet de saisir le nom de l\rquote \'e9tat \'e0 cr\'e9er\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_NORMAL_NEWSTATE}} permet de cr\'e9er un \'e9tat \ldblquote \~
|
||||
normal\~\rdblquote (i.e. qui ne peut pas \'eatre utilis\'e9 comme {\uld \'e9tat de transition}{\v ID_ETAT_TRANSITION})\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_BT_TRANSITION_NEWSTATE}} permet de cr\'e9
|
||||
er un {\uld \'e9tat de transition}{\v ID_ETAT_TRANSITION} \page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_MENU_CONTEXTUEL}} menu que l\rquote on fait appara\'eetre avec le bouton droit de la souris (o\'f9
|
||||
que l\rquote on se trouve)\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_COPIE_ACTION}} si l\rquote action initiale avait 2 \'e9tats {\b E}{\b\fs16 1} et {\b E}{\b\fs16 2}, avec {\b E}{\b\fs16 2} \'e9
|
||||
tat suivant de {\b E}{\b\fs16 1}, alors {\b la copie de} {\b E}{\b\fs16 1} pointe sur {\b la copie de} {\b E}{\b\fs16 2}. Par contre, si {\b E}{\b\fs16 2} avait comme \'e9tat suivant un \'e9tat {\b E}{\b\fs16 3} d\rquote une autre action, alors {\b
|
||||
la copie de} {\b E}{\b\fs16 2} a elle-aussi pour \'e9tat suivant l\rquote \'e9tat {\b E}{\b\fs16 3}.\page {\cs19\super #{\footnote \pard\plain \s15\widctlpar \f4\fs20\lang1036 {\cs19\super #} ID_COPIE_ETAT}} Si l\rquote \'e9tat initial \'e9
|
||||
tait son propre \'e9tat suivant, alors la copie de l\rquote \'e9tat sera elle-aussi son propre \'e9tat suivant, sinon l\rquote \'e9tat et sa copie auront le m\'eame \'e9tat suivant.
|
||||
\par }
|
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/DLGACTION.SHG
Normal file
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/DLGACTION.SHG
Normal file
Binary file not shown.
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/DLGACTION2.SHG
Normal file
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/DLGACTION2.SHG
Normal file
Binary file not shown.
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/DLGNWST.SHG
Normal file
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/DLGNWST.SHG
Normal file
Binary file not shown.
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/DLGZA.SHG
Normal file
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/DLGZA.SHG
Normal file
Binary file not shown.
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/DLGZALIS.SHG
Normal file
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/DLGZALIS.SHG
Normal file
Binary file not shown.
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/DlgEtat.SHG
Normal file
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/DlgEtat.SHG
Normal file
Binary file not shown.
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/Dlgcontent.shg
Normal file
BIN
Rayman_X/cpa/tempgrp/TAc/doc/Help/shg/Dlgcontent.shg
Normal file
Binary file not shown.
123
Rayman_X/cpa/tempgrp/TAc/inc/ACModif.hpp
Normal file
123
Rayman_X/cpa/tempgrp/TAc/inc/ACModif.hpp
Normal file
@@ -0,0 +1,123 @@
|
||||
//#################################################################################
|
||||
//
|
||||
// BASE DEFINITION CLASS OF DLL interface Modification
|
||||
//
|
||||
//#################################################################################
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef __ACMODIF_HPP__
|
||||
#define __ACMODIF_HPP__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif
|
||||
/******************************************/
|
||||
|
||||
class CPA_Family;
|
||||
class CPA_Anim;
|
||||
class CPA_Action;
|
||||
class CPA_State;
|
||||
class TAction_Interface;
|
||||
|
||||
#include "TAC.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Action_New
|
||||
|
||||
class Action_New : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Family *m_p_oFamily;
|
||||
CPA_Action *m_p_oAction;
|
||||
char *m_szName;
|
||||
|
||||
public:
|
||||
Action_New(TAction_Interface *_p_oParentDLL, CPA_Family *_p_oFamily, char *_szNewName);
|
||||
~Action_New();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Action_Copy
|
||||
|
||||
class Action_Copy : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Family *m_p_oFamily;
|
||||
CPA_Action *m_p_oActionSource;
|
||||
CPA_Action *m_p_oActionTarget;
|
||||
CPA_List<CPA_State> m_oListOfStates;
|
||||
public:
|
||||
Action_Copy(TAction_Interface *_p_oParentDLL, CPA_Family *_p_oFamily,
|
||||
CPA_Action *_p_oAction);
|
||||
~Action_Copy();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Action_Rename
|
||||
|
||||
class Action_Rename : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Action *m_p_oAction;
|
||||
char *m_szNewName;
|
||||
public:
|
||||
Action_Rename(TAction_Interface *_p_oParentDLL, CPA_Action *_p_oAction, char *_szNewName);
|
||||
~Action_Rename();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Action_Delete
|
||||
|
||||
class Action_Delete : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Family *m_p_oFamily;
|
||||
CPA_Action *m_p_oAction;
|
||||
CPA_List<CPA_State> m_oListOfStates;
|
||||
CPA_List<tdstTSIState> m_oListOfTransitionalStates;
|
||||
CPA_EditorBase *m_p_oOACDLL;
|
||||
CPA_State *m_p_oDefaultState;
|
||||
public:
|
||||
Action_Delete(TAction_Interface *_p_oParentDLL, CPA_Family *_p_oFamily, CPA_Action *_p_oAction);
|
||||
~Action_Delete();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Action_DelAllStates
|
||||
|
||||
class Action_DelAllStates : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Family *m_p_oFamily;
|
||||
CPA_Action *m_p_oAction;
|
||||
CPA_State *m_p_oDefaultState;
|
||||
CPA_List<CPA_State> m_oListOfStates;
|
||||
public:
|
||||
Action_DelAllStates(TAction_Interface *_p_oParentDLL, CPA_Family *_p_oFamily, CPA_Action *_p_oAction);
|
||||
~Action_DelAllStates();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
|
||||
#endif //__ACMODIF_HPP__
|
255
Rayman_X/cpa/tempgrp/TAc/inc/ACinterf.hpp
Normal file
255
Rayman_X/cpa/tempgrp/TAc/inc/ACinterf.hpp
Normal file
@@ -0,0 +1,255 @@
|
||||
/*=============================================================================
|
||||
*
|
||||
* Filename: ACInterf.hpp
|
||||
* Version: 1.0
|
||||
* Date: 30/12/96
|
||||
* Author: Marc Trabucato
|
||||
*
|
||||
* Description: description of TAction_Interface class, which is the
|
||||
* base class of action DLL (inherit CPA_ToolDLLBase
|
||||
*
|
||||
*===========================================================================*/
|
||||
|
||||
#ifndef __TActionINTERF_HPP__
|
||||
#define __TActionINTERF_HPP__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif
|
||||
/******************************************/
|
||||
|
||||
#ifdef ACTIVE_EDITOR
|
||||
|
||||
//3dos
|
||||
|
||||
//ACP
|
||||
#include "TAC.h"
|
||||
|
||||
class CPA_DialogList;
|
||||
|
||||
class CPA_Family;
|
||||
class CPA_Action;
|
||||
class CPA_State;
|
||||
|
||||
class CDlgActionContents;
|
||||
class CDlgActionList;
|
||||
class CDlgState;
|
||||
class CDlgAction;
|
||||
class CDlgAnimList;
|
||||
class CDlgNameList;
|
||||
|
||||
class CDlgZonesActivation;
|
||||
class CDlgZAList;
|
||||
class CDlgZAL;
|
||||
|
||||
class CPA_ZonesActivating;
|
||||
class CPA_ZonesActivatingList;
|
||||
class CPA_tdoNameList;
|
||||
|
||||
// if you want only one instance of your DLL
|
||||
// activate the next line
|
||||
#define DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Tool DLL interface class
|
||||
//----------------------------------------------------------
|
||||
class TAction_Interface : public CPA_ToolDLLBase
|
||||
{
|
||||
protected:
|
||||
BOOL m_bStateMode;
|
||||
//
|
||||
CSplitFrame *m_p_oSplitterLeftSTM;
|
||||
CPA_DialogList *m_p_oDialogListSTM;
|
||||
CDlgActionList *m_p_oDlgActionList;
|
||||
CDlgActionContents *m_p_oDlgActionContents;
|
||||
//
|
||||
CSplitFrame *m_p_oSplitterBottomSTM;
|
||||
CDlgState *m_p_oDlgState;
|
||||
CDlgAnimList *m_p_oDlgAnimList;
|
||||
//
|
||||
CSplitFrame *m_p_oSplitterLeftZAM;
|
||||
CPA_DialogList *m_p_oDialogListZAM;
|
||||
CDlgNameList *m_p_oDlgNameList;
|
||||
CDlgZAL *m_p_oDlgZAList;
|
||||
CDlgAction *m_p_oDlgActions;
|
||||
//
|
||||
CSplitFrame *m_p_oSplitterBottomZAM;
|
||||
CDlgZAList *m_p_oDlgZAListContent;
|
||||
CDlgZonesActivation *m_p_oDlgZA;
|
||||
//
|
||||
long m_lEditorState;
|
||||
// current values
|
||||
CPA_Family *m_p_oCurrentFamily;
|
||||
CPA_Action *m_p_oCurrentAction;
|
||||
CPA_State *m_p_oCurrentState;
|
||||
CPA_tdoNameList *m_p_oCurrentNameList;
|
||||
CPA_ZonesActivatingList *m_p_oCurrentZAList;
|
||||
CPA_ZonesActivating *m_p_oCurrentZA;
|
||||
//
|
||||
BOOL m_bAllFamilies;
|
||||
CPA_Family *m_p_oCurrentAnimFamily;
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
int m_iIndexListBox; //the index in the list box used for drag&drop of animations in the list box with states
|
||||
HWND m_hDlgActionContentsHwnd; //the HWND of the action contents
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
private:
|
||||
|
||||
|
||||
public:
|
||||
TAction_Interface(void);
|
||||
//~TAction_Interface(void);
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
int mfn_iGetIndexListBox ( void) { return m_iIndexListBox; }
|
||||
void mfn_iSetIndexListBox ( int iIndex) { m_iIndexListBox = iIndex; }
|
||||
HWND mfn_hGetDlgActionContentsHwnd ( void) { return m_hDlgActionContentsHwnd; }
|
||||
void mfn_hSetDlgActionContentsHwnd ( HWND hDlgActionContentsHwnd){ m_hDlgActionContentsHwnd = hDlgActionContentsHwnd; }
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
|
||||
// get functions
|
||||
CPA_Family *mfn_p_oGetCurrentFamily ( void ) { return m_p_oCurrentFamily; }
|
||||
CPA_Action *mfn_p_oGetCurrentAction ( void ) { return m_p_oCurrentAction; }
|
||||
CPA_State *mfn_p_oGetCurrentState ( void ) { return m_p_oCurrentState; }
|
||||
CPA_tdoNameList *mfn_p_oGetCurrentNamesList ( void ) { return m_p_oCurrentNameList; }
|
||||
CPA_ZonesActivatingList *mfn_p_oGetCurrentZAList ( void ) { return m_p_oCurrentZAList; }
|
||||
CPA_ZonesActivating *mfn_p_oGetCurrentZA ( void ) { return m_p_oCurrentZA; }
|
||||
|
||||
void mfn_vSetEditMode ( BOOL _bStateMode = TRUE, BOOL _bActive = TRUE );
|
||||
|
||||
// select functions
|
||||
void mfn_vChangeFamily ( CPA_Family *_p_oNewFamily );
|
||||
void mfn_vChangeAction ( CPA_Action *_p_oAction );
|
||||
void mfn_vChangeState ( CPA_State *_p_oState );
|
||||
void mfn_vChangeNameList( CPA_tdoNameList *_p_oNameList );
|
||||
|
||||
// new functions for modif
|
||||
// update display
|
||||
void mfn_vSetCurrentFamily ( CPA_Family *_p_oNewFamily );
|
||||
void mfn_vSetCurrentAction ( CPA_Action *_p_oAction );
|
||||
void mfn_vSetCurrentState ( CPA_State *_p_oState );
|
||||
void mfn_vSetCurrentNameList ( CPA_tdoNameList *_p_oList );
|
||||
void mfn_vSetCurrentActionList ( int *_a_ItemList, long _lNumberOfItems );
|
||||
void mfn_vSetCurrentZAList ( CPA_ZonesActivatingList *_p_oZAList );
|
||||
void mfn_vSetCurrentZA ( CPA_ZonesActivating *_p_oZA );
|
||||
|
||||
void mfn_vAllActionsDeleted ( CPA_Family *_p_oFamily ) ;
|
||||
void mfn_vActionCreated ( CPA_Family *_p_oFamily , CPA_Action *_p_oAction );
|
||||
void mfn_vActionDeleted ( CPA_Family *_p_oFamily );
|
||||
|
||||
void mfn_vStateCreated ( CPA_Action *_p_oAction , CPA_State *_p_oState );
|
||||
void mfn_vStateDeleted ( CPA_Action *_p_oAction );
|
||||
void mfn_vStateChanged ( CPA_State *_p_oState , tdeChangingState _eChange) ;
|
||||
|
||||
void mfn_vZAListCreated ( CPA_ZonesActivatingList *_p_oZAList );
|
||||
void mfn_vZAListDeleted ( CPA_tdoNameList *_p_oNameList );
|
||||
void mfn_vZAToStateChanged ( CPA_List<CPA_State> *_p_oListOfStates );
|
||||
void mfn_vZACreated ( CPA_ZonesActivating *_p_oZA );
|
||||
void mfn_vZAChanged ( CPA_ZonesActivating *_p_oZA, int _iIndex );
|
||||
void mfn_vZADeleted ( CPA_ZonesActivating *_p_oZA );
|
||||
|
||||
void mfn_vNotifyAllZAList ( CPA_Family *_p_oFamily, BOOL _bUpdateList = TRUE );
|
||||
|
||||
//====================================================================================
|
||||
//========================= COMMON DLL FUNCTIONS OVERLOAD ============================
|
||||
//====================================================================================
|
||||
//void fn_vOnModifDrawFlag(class CPA_SuperObject *) {};
|
||||
|
||||
// ACP MEssages Functions overload
|
||||
void fn_vJustAfterRegistered (void);
|
||||
void fn_vConstruct (void);
|
||||
void fn_vBeforeEngine (void);
|
||||
void fn_vBeforeEditor (void);
|
||||
BOOL fn_bAcceptToRunEngine (void);
|
||||
BOOL fn_bAcceptToSave (void);
|
||||
// Windows MEssages Functions overload
|
||||
|
||||
// to update lists of reachable objects
|
||||
|
||||
// for changes
|
||||
|
||||
// editor Modifs
|
||||
void fn_vOnSelect (CPA_SuperObject *pEdObj, tdeTypeModif eType, tdeStatus eStatus);
|
||||
|
||||
// insert
|
||||
|
||||
// moves
|
||||
|
||||
// Dialog List
|
||||
CPA_BaseObject *GetDialogSelection (CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDrawMode);
|
||||
void GetListsForDialog (CPA_DialogList *pDialog);
|
||||
BOOL fn_bOnSelChangeListObjects (CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pSelectedObject, BOOL _bUnselect);
|
||||
BOOL fn_bOnDblClkListObjects (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pSelectedObject);
|
||||
void fn_vInitDefaultParameters (CPA_DialogList *pDialog);
|
||||
BOOL fn_bAddEntriesToListPopup (CPA_DialogList *pDialog, CString csListName, CMenu *pMenu, UINT uiCustomEntriesStart);
|
||||
void fn_vOnCommandInListPopup (CPA_DialogList *pDialog, CString csListName, UINT uiCustomEntry);
|
||||
|
||||
/*===========================================================================
|
||||
Dialog Bar - Mircea Dunka 31 Aug. 1998
|
||||
=========================================================================*/
|
||||
void fn_vDefineDlgBarBtnIcon (tde_DlgBarCategory wCategory, tds_DlgBarBtn *_pDlgBarBtn);
|
||||
|
||||
|
||||
//Menus
|
||||
BOOL fn_bDefineSubMenu (EDT_SubMenu *_p_oEDTSubMenu);
|
||||
void _OnSubMenuCommand (EDT_SubMenu *_p_oEDTSubMenu,UINT uiMsgID);
|
||||
BOOL fn_bDefinePopupMenu (EDT_PopUpMenu *pPopup, CPA_List<CPA_SuperObject> *pSelection, BOOL bAsCurrentEditor);
|
||||
void _OnPopUpMenuCommand (UINT m_IDCmdMsg);
|
||||
|
||||
// Current Editor
|
||||
tdePermission fn_eAcceptNewEditor (CPA_EditorBase *pNewEditor) { return C_CloseBefore; }
|
||||
BOOL fn_bCanActivateEditor (CPA_List<CPA_BaseObject> *pParams);
|
||||
BOOL fn_bCanCloseEditor (void);
|
||||
|
||||
void fn_vOnActivateEditor (CPA_List<CPA_BaseObject> *pParams, BOOL bBackActivated = FALSE);
|
||||
void fn_vOnCloseEditor (void);
|
||||
|
||||
// To communicate with that editor
|
||||
long OnQueryAction (CPA_EditorBase *p_oSender, WPARAM, LPARAM);
|
||||
long OnQueryOpen (CPA_EditorBase *p_oSender, WPARAM, LPARAM);
|
||||
long OnQueryClose (CPA_EditorBase *p_oSender, WPARAM, LPARAM) { return 0; }
|
||||
|
||||
|
||||
protected:
|
||||
//Check functions
|
||||
BOOL mfn_bCheckStatesTransitions( CPA_Family *_p_oFamily );
|
||||
BOOL mfn_bCheckFamiliesZA ( void );
|
||||
BOOL mfn_bCheckFamiliesZAList ( void );
|
||||
//load functions
|
||||
BOOL mfn_bLoadStatesMechanics ( CPA_Family *_p_oFamily );
|
||||
BOOL mfn_bLoadStatesAnimations ( CPA_Family *_p_oFamily );
|
||||
// test functions
|
||||
BOOL mfn_bUpdateStateBeforeRunningEngine ( CPA_Family *_p_oFamily );
|
||||
BOOL mfn_bUpdateStateBeforeSaving ( CPA_Family *_p_oFamily );
|
||||
BOOL mfn_bUpdateCsaListBeforeRunningEngine ( void );
|
||||
BOOL mfn_bUpdateCsaListBeforeSaving ( void );
|
||||
void mfn_vWriteErrorOnFile (long _lErrorType,void *_p_void);
|
||||
//load function
|
||||
void mfn_vLoadActions ( CPA_Family *_p_oFamily );
|
||||
void mfn_vInitStateAfterLoading ( CPA_Family *_p_oFamily );
|
||||
// new load functions
|
||||
void mfn_vCreateEditorObjects ( CPA_Family *_p_oFamily );
|
||||
void mfn_vLoadAllActions ( CPA_Family *_p_oFamily );
|
||||
void mfn_vUpdateMechanics ( void );
|
||||
void mfn_vUpdateAllStates ( CPA_Family *_p_oFamily );
|
||||
// Shaitan => state list in the level
|
||||
// update list of used actions
|
||||
void mfn_vUpdateListOfUsedActions ( CPA_Family *_p_oFamily);
|
||||
static SCR_tde_Anl_ReturnValue m_fn_tdeCallBackLoadUsedActions(SCR_tdst_File_Description *pfFile, char *szAction, char *szPars[], SCR_tde_Anl_Action eType);
|
||||
// End Shaitan => state list in the level
|
||||
|
||||
// ZA changes NOTIFICATION
|
||||
void mfn_vRemoveZoneFromNamesList ( CPA_tdoNameList *_p_oNameList, unsigned short _usIndex );
|
||||
void mfn_vInsertZoneToNamesList ( CPA_tdoNameList *_p_oNameList, unsigned short _usIndex );
|
||||
//
|
||||
CPA_BaseObject *mfn_p_oCreateNewZA ( CPA_tdoNameList *_p_oName, char *_szName );
|
||||
CPA_BaseObject *mfn_p_oCreateNewZAList ( CPA_tdoNameList *_p_oName, char *_szName );
|
||||
|
||||
void mfn_vSavePreferences ( void );
|
||||
void mfn_vRestorePreferences ( void );
|
||||
};
|
||||
|
||||
#undef extern
|
||||
extern tdstDLLIdentity g_stTActionIdentity;
|
||||
|
||||
#endif // ACTIVE_EDITOR
|
||||
#endif // __TActionINTERF_HPP__
|
85
Rayman_X/cpa/tempgrp/TAc/inc/DlgAct.hpp
Normal file
85
Rayman_X/cpa/tempgrp/TAc/inc/DlgAct.hpp
Normal file
@@ -0,0 +1,85 @@
|
||||
#if !defined(AFX_DLGACT_HPP__C7833E82_CCF7_11D0_B183_0060973673C5__INCLUDED_)
|
||||
#define AFX_DLGACT_HPP__C7833E82_CCF7_11D0_B183_0060973673C5__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
// DlgAct.hpp : header file
|
||||
//
|
||||
|
||||
#include "TACT_Res.h"
|
||||
|
||||
class TAction_Interface;
|
||||
class CDlgZAList;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgAction form view
|
||||
|
||||
#ifndef __AFXEXT_H__
|
||||
#include <afxext.h>
|
||||
#endif
|
||||
|
||||
class CDlgAction : public CFormView
|
||||
{
|
||||
private:
|
||||
TAction_Interface *m_p_oDLL;
|
||||
CDlgZAList *m_p_oDlgZAList;
|
||||
int *m_a_iNewSelection;
|
||||
int *m_a_iLastSelection;
|
||||
long m_lLastNbSelected;
|
||||
long m_lNewNbSelected;
|
||||
protected:
|
||||
CDlgAction(); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(CDlgAction)
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
//{{AFX_DATA(CDlgAction)
|
||||
enum { IDD = IDD_DLG_ACTION };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
//}}AFX_DATA
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
void mfn_vSetCurrentFamily ( CPA_Family *_p_oFamily );
|
||||
void mfn_vSetParentDLL ( TAction_Interface *_p_oDLL ) { m_p_oDLL = _p_oDLL; }
|
||||
void mfn_vSetDlgZAList ( CDlgZAList *_p_oDlgZAList ) { m_p_oDlgZAList = _p_oDlgZAList; }
|
||||
void mfn_vSetCurrentActionList ( int *_a_ItemList, long _lNumberOfItems );
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgAction)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
void mfn_vFillLBActions(CPA_Family *_p_oFamily);
|
||||
virtual ~CDlgAction();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgAction)
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnBtSelectall();
|
||||
afx_msg void OnSelchangeListAction();
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_DLGACT_HPP__C7833E82_CCF7_11D0_B183_0060973673C5__INCLUDED_)
|
117
Rayman_X/cpa/tempgrp/TAc/inc/DlgActCt.hpp
Normal file
117
Rayman_X/cpa/tempgrp/TAc/inc/DlgActCt.hpp
Normal file
@@ -0,0 +1,117 @@
|
||||
/*=============================================================================
|
||||
*
|
||||
* Filename: DlgActCt.hpp : header file
|
||||
* Version: 1.0
|
||||
* Date: 02/01/97
|
||||
* Author: V.L.
|
||||
*
|
||||
* Description: description of Form view class for action content
|
||||
*
|
||||
*===========================================================================*/
|
||||
#ifndef __DLGACTCT_HPP_
|
||||
#define __DLGACTCT_HPP_
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif
|
||||
/******************************************/
|
||||
|
||||
#ifndef __AFXEXT_H__
|
||||
#include <afxext.h>
|
||||
#endif
|
||||
|
||||
#include "TAct_res.h"
|
||||
|
||||
class TAction_Interface;
|
||||
class CPA_Action;
|
||||
class CPA_State;
|
||||
|
||||
/*=============================================================================
|
||||
* CDlgActionContents class
|
||||
=============================================================================*/
|
||||
class CDlgActionContents : public CFormView
|
||||
{
|
||||
protected:
|
||||
TAction_Interface* m_p_oParentDLL;
|
||||
BOOL m_bFirstShow;
|
||||
CFont m_oBoldFont;
|
||||
CFont m_oItalicFont;
|
||||
CPA_State *m_p_oStateUnderCursor;
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
int m_iIndexListBox; //the index in the list box with states used for drag&drop the states
|
||||
BOOL m_bStateDrag; //used for testing if we can drag or not the selected state
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
protected:
|
||||
CDlgActionContents(); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(CDlgActionContents)
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
//{{AFX_DATA(CDlgActionContents)
|
||||
enum { IDD = IDD_DLG_ACTIONCONTENTS };
|
||||
//}}AFX_DATA
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
void fn_vSetAction( CPA_Action *_p_oAction );
|
||||
void fn_vSetParentDLL( TAction_Interface *_p_oDLL) { m_p_oParentDLL = _p_oDLL; }
|
||||
void fn_vSetAsNextState( CPA_State *_p_oNextState);
|
||||
void fn_vFillSequentialStateMenu( CMenu* _p_oMenu, CPA_Action *_p_oCurrentAction, CPA_State *_p_oFirstState);
|
||||
void fn_vSetState( CPA_State *_p_oState );
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgActionContents)
|
||||
public:
|
||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
virtual ~CDlgActionContents (void);
|
||||
void fn_vUpdateButtons (CPA_State *_p_oState);
|
||||
void OnRButtonDownStatesList(MSG *pMsg);
|
||||
void OnKeyDownStatesList (MSG *pMsg);
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
BOOL OnLButtonDownStatesList(MSG *pMsg);
|
||||
BOOL OnLButtonUpStatesList(MSG *pMsg);
|
||||
BOOL OnMouseMoveStatesList(MSG *pMsg);
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
void OnBtCreateState (BOOL _bNormal = TRUE);
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgActionContents)
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnBtDelstate();
|
||||
afx_msg void OnSelchangeListStates();
|
||||
afx_msg void OnBtNewstate();
|
||||
afx_msg void OnBtCopystate();
|
||||
afx_msg void OnBtDefaultstate();
|
||||
afx_msg void OnBtDelallstates();
|
||||
afx_msg void OnBtRenstate();
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
afx_msg void OnBtUp();
|
||||
afx_msg void OnBtDown();
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
#endif //__DLGACTCT_HPP_
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
101
Rayman_X/cpa/tempgrp/TAc/inc/DlgActLs.hpp
Normal file
101
Rayman_X/cpa/tempgrp/TAc/inc/DlgActLs.hpp
Normal file
@@ -0,0 +1,101 @@
|
||||
/*=============================================================================
|
||||
*
|
||||
* Filename: DlgActLs.hpp : header file
|
||||
* Version: 1.0
|
||||
* Date: 02/01/97
|
||||
* Author: V.L.
|
||||
*
|
||||
* Description: description of Form view class for action list
|
||||
*
|
||||
*===========================================================================*/
|
||||
#ifndef __DLGACTLS_HPP__
|
||||
#define __DLGACTLS_HPP__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif
|
||||
/******************************************/
|
||||
|
||||
#ifndef __AFXEXT_H__
|
||||
#include <afxext.h>
|
||||
#endif
|
||||
|
||||
#include "TAct_res.h"
|
||||
|
||||
class TAction_Interface;
|
||||
class CPA_Action;
|
||||
|
||||
/*=============================================================================
|
||||
* CDlgActionList class
|
||||
=============================================================================*/
|
||||
class CDlgActionList : public CFormView
|
||||
{
|
||||
protected:
|
||||
TAction_Interface* m_p_oParentDLL;
|
||||
CFont m_oBoldFont;
|
||||
|
||||
protected:
|
||||
CDlgActionList(); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(CDlgActionList)
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
//{{AFX_DATA(CDlgActionList)
|
||||
enum { IDD = IDD_DLG_ACTION_LIST };
|
||||
//CListBox m_CTRL_ListAction;
|
||||
//}}AFX_DATA
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext);
|
||||
// Operations
|
||||
public:
|
||||
void fn_vSetActionList ( CPA_List<CPA_Action> *_p_oListOfActions );
|
||||
void fn_vSetParentDLL ( TAction_Interface *_p_oDLL ) { m_p_oParentDLL = _p_oDLL; }
|
||||
void fn_vSetAction ( CPA_Action *_p_oAction );
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgActionList)
|
||||
public:
|
||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
virtual ~CDlgActionList();
|
||||
|
||||
void fn_vUpdateButtons (BOOL _bEnabled);
|
||||
void OnRButtonDownActionList(MSG *pMsg);
|
||||
void OnKeyDownActionList (MSG *pMsg);
|
||||
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgActionList)
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnSelchangeListAction();
|
||||
afx_msg void OnBtCopyaction();
|
||||
afx_msg void OnBtDelaction();
|
||||
afx_msg void OnBtDelallaction();
|
||||
afx_msg void OnBtNewaction();
|
||||
afx_msg void OnBtRenameaction();
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
afx_msg void OnBtEditza();
|
||||
afx_msg void OnBtInitaction();
|
||||
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
#endif //__DLGACTLS_HPP__
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
92
Rayman_X/cpa/tempgrp/TAc/inc/DlgActTr.hpp
Normal file
92
Rayman_X/cpa/tempgrp/TAc/inc/DlgActTr.hpp
Normal file
@@ -0,0 +1,92 @@
|
||||
/*=============================================================================
|
||||
*
|
||||
* Filename: DlgActLs.hpp : header file
|
||||
* Version: 1.0
|
||||
* Date: 27/05/97
|
||||
* Author: M.T.
|
||||
*
|
||||
* Description: description of Form view class for Actions & States Tree
|
||||
*
|
||||
*===========================================================================*/
|
||||
#if !defined(AFX_DLGACTTR_HPP__D4ACC88E_D6A8_11D0_B18F_0060973673C5__INCLUDED_)
|
||||
#define AFX_DLGACTTR_HPP__D4ACC88E_D6A8_11D0_B18F_0060973673C5__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
// DlgActTr.hpp : header file
|
||||
//
|
||||
#include "TAct_Res.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgActionTree form view
|
||||
|
||||
#ifndef __AFXEXT_H__
|
||||
#include <afxext.h>
|
||||
#endif
|
||||
|
||||
class TAction_Interface;
|
||||
class CPA_Action;
|
||||
class CPA_State;
|
||||
|
||||
class CDlgActionTree : public CFormView
|
||||
{
|
||||
protected:
|
||||
TAction_Interface* m_p_oParentDLL;
|
||||
|
||||
protected:
|
||||
CDlgActionTree(); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(CDlgActionTree)
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
//{{AFX_DATA(CDlgActionTree)
|
||||
enum { IDD = IDD_DLG_ACTION_TREE };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
//}}AFX_DATA
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
|
||||
// Operations
|
||||
public:
|
||||
void mfn_vSetCurrentState(CPA_State *_p_oState);
|
||||
void mfn_vSetCurrentAction(CPA_Action *_p_oAction);
|
||||
void mfn_vSetCurrentFamily(CPA_Family *_p_oFamily);
|
||||
void fn_vSetParentDLL ( TAction_Interface *_p_oDLL ) { m_p_oParentDLL = _p_oDLL; }
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgActionTree)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
void mfn_vFillTree(CPA_Family *_p_oFamily);
|
||||
virtual ~CDlgActionTree();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgActionTree)
|
||||
afx_msg void OnBtCopyaction();
|
||||
afx_msg void OnBtDelaction();
|
||||
afx_msg void OnBtEditza();
|
||||
afx_msg void OnBtNewaction();
|
||||
afx_msg void OnBtRenameaction();
|
||||
afx_msg void OnRclickTreeAct(NMHDR* pNMHDR, LRESULT* pResult);
|
||||
afx_msg void OnSelchangedTreeAct(NMHDR* pNMHDR, LRESULT* pResult);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_DLGACTTR_HPP__D4ACC88E_D6A8_11D0_B18F_0060973673C5__INCLUDED_)
|
101
Rayman_X/cpa/tempgrp/TAc/inc/DlgAnim.hpp
Normal file
101
Rayman_X/cpa/tempgrp/TAc/inc/DlgAnim.hpp
Normal file
@@ -0,0 +1,101 @@
|
||||
#if !defined(AFX_DLGANIM_HPP__C7833E83_CCF7_11D0_B183_0060973673C5__INCLUDED_)
|
||||
#define AFX_DLGANIM_HPP__C7833E83_CCF7_11D0_B183_0060973673C5__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
// DlgAnim.hpp : header file
|
||||
//
|
||||
|
||||
#include "TAct_Res.h"
|
||||
|
||||
class TAction_Interface;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgAnimList form view
|
||||
|
||||
#ifndef __AFXEXT_H__
|
||||
#include <afxext.h>
|
||||
#endif
|
||||
|
||||
class CDlgAnimList : public CFormView
|
||||
{
|
||||
private:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
BOOL m_bAllFamilies;
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
CPA_State *m_p_oStatePrevious; //the previous state of the state to move (in the list)
|
||||
CPA_State *m_p_oStateTarget; //the target state before which we have to insert
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
protected:
|
||||
CDlgAnimList(); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(CDlgAnimList)
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
//{{AFX_DATA(CDlgAnimList)
|
||||
enum { IDD = IDD_DLG_ANIM };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
//}}AFX_DATA
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
void mfn_vSetFamily (CPA_Family *_p_oFamily);
|
||||
void mfn_vSetParentDLL (TAction_Interface *_p_oDLL);
|
||||
void mfn_vFillCBFamilies (void);
|
||||
void mfn_vOnDrawItemListBoxAnimation(LPDRAWITEMSTRUCT lpDIS);
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgAnimList)
|
||||
public:
|
||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
BOOL OnLButtonDownLbAnim (MSG* pMsg);
|
||||
BOOL OnRButtonDownLbAnim (MSG* pMsg);
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
BOOL OnLButtonUpLbAnim(MSG* pMsg);
|
||||
void mfn_vCreateStatesMove(BOOL _bNormal);
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
void mfn_vFillLBAnimations (CPA_Family *_p_oFamily);
|
||||
void mfn_vCreateStates (BOOL _bNormal);
|
||||
virtual ~CDlgAnimList ();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgAnimList)
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
afx_msg void OnBtCreatestates();
|
||||
afx_msg void OnSelchangeLbAnim();
|
||||
afx_msg void OnBtMore();
|
||||
afx_msg void OnSelchangeComboFamily();
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_DLGANIM_HPP__C7833E83_CCF7_11D0_B183_0060973673C5__INCLUDED_)
|
62
Rayman_X/cpa/tempgrp/TAc/inc/DlgInput.hpp
Normal file
62
Rayman_X/cpa/tempgrp/TAc/inc/DlgInput.hpp
Normal file
@@ -0,0 +1,62 @@
|
||||
// DlgInput.hpp : header file
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgInputText dialog
|
||||
|
||||
#ifndef __DLGINPUT_H__
|
||||
#define __DLGINPUT_H__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif
|
||||
/******************************************/
|
||||
|
||||
#include "TAct_res.h"
|
||||
|
||||
class CDlgInputText : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CDlgInputText(CWnd* pParent = NULL); // standard constructor
|
||||
// set methods
|
||||
void SetTitle (char *_szTitle);
|
||||
void SetMessage (char *_szMessage);
|
||||
void SetPos (POINT *_pPoint);
|
||||
void SetSelect (BOOL _bSelect = TRUE );
|
||||
void SetDefaultValue (char *_szValue);
|
||||
// get methods
|
||||
char * GetInputText (void);
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CDlgInputText)
|
||||
enum { IDD = IDD_DLG_INPUTTEXT };
|
||||
CString m_Data_EditText;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgInputText)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
CString m_oCstMessage;
|
||||
CString m_oCstTitle;
|
||||
POINT m_xPoint;
|
||||
BOOL m_bSelect;
|
||||
CString m_csDefaultValue;
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgInputText)
|
||||
afx_msg void OnDestroy();
|
||||
virtual void OnOK();
|
||||
virtual BOOL OnInitDialog();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
#endif //__DLGINPUT_H__
|
85
Rayman_X/cpa/tempgrp/TAc/inc/DlgNmLst.hpp
Normal file
85
Rayman_X/cpa/tempgrp/TAc/inc/DlgNmLst.hpp
Normal file
@@ -0,0 +1,85 @@
|
||||
#if !defined(AFX_DLGNMLST_HPP__C7833E81_CCF7_11D0_B183_0060973673C5__INCLUDED_)
|
||||
#define AFX_DLGNMLST_HPP__C7833E81_CCF7_11D0_B183_0060973673C5__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
// DlgNmLst.hpp : header file
|
||||
//
|
||||
#include "TACT_Res.h"
|
||||
#include "TAC.h"
|
||||
|
||||
class TAction_Interface;
|
||||
class CPA_Family;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgNameList form view
|
||||
|
||||
#ifndef __AFXEXT_H__
|
||||
#include <afxext.h>
|
||||
#endif
|
||||
|
||||
class CDlgNameList : public CFormView
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oDLL;
|
||||
CPA_Family *m_p_oCurrentFamily;
|
||||
BOOL m_bFirstShow;
|
||||
protected:
|
||||
CDlgNameList(); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(CDlgNameList)
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
//{{AFX_DATA(CDlgNameList)
|
||||
enum { IDD = IDD_DLG_NAMESLIST };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
//}}AFX_DATA
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
void mfn_vSetFamily (CPA_Family *_p_oFamily);
|
||||
void mfn_vSetParentDLL (TAction_Interface *_p_oDLL) { m_p_oDLL = _p_oDLL ; }
|
||||
void mfn_vSetCurrentNamesList (CPA_tdoNameList *_p_oNamesList);
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgNameList)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
void mfn_vFillLBNames(CPA_Family *_p_oFamily, tde_ZoneType _eZone);
|
||||
tde_ZoneType mfn_vGetZoneType();
|
||||
void mfn_vSetZoneType(tde_ZoneType _eType);
|
||||
virtual ~CDlgNameList();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgNameList)
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnRadioZdx();
|
||||
afx_msg void OnBtEditstate();
|
||||
afx_msg void OnSelchangeLbNames();
|
||||
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_DLGNMLST_HPP__C7833E81_CCF7_11D0_B183_0060973673C5__INCLUDED_)
|
57
Rayman_X/cpa/tempgrp/TAc/inc/DlgNwSt.hpp
Normal file
57
Rayman_X/cpa/tempgrp/TAc/inc/DlgNwSt.hpp
Normal file
@@ -0,0 +1,57 @@
|
||||
// DlgNwSt.hpp : header file
|
||||
//
|
||||
|
||||
#ifndef __DLGNWST_HPP__
|
||||
#define __DLGNWST_HPP__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif
|
||||
/******************************************/
|
||||
|
||||
#include "TAct_Res.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgNewState dialog
|
||||
|
||||
class CDlgNewState : public CDialog
|
||||
{
|
||||
protected:
|
||||
CPoint m_xPoint;
|
||||
public:
|
||||
CString csName;
|
||||
BOOL bNormal;
|
||||
// Construction
|
||||
public:
|
||||
CDlgNewState(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CDlgNewState)
|
||||
enum { IDD = IDD_DLG_NEWSTATE };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgNewState)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgNewState)
|
||||
virtual void OnOK();
|
||||
afx_msg void OnDestroy();
|
||||
virtual BOOL OnInitDialog();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
void SetPos(POINT *_pPoint);
|
||||
};
|
||||
|
||||
#endif //__DLGNWST_HPP__
|
63
Rayman_X/cpa/tempgrp/TAc/inc/DlgSelect.hpp
Normal file
63
Rayman_X/cpa/tempgrp/TAc/inc/DlgSelect.hpp
Normal file
@@ -0,0 +1,63 @@
|
||||
#if !defined(AFX_DLGSELECT_HPP__361ABEF2_1B06_11D1_B214_0060973673C5__INCLUDED_)
|
||||
#define AFX_DLGSELECT_HPP__361ABEF2_1B06_11D1_B214_0060973673C5__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
// DlgSelect.hpp : header file
|
||||
//
|
||||
#include "Tact_Res.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgSelection dialog
|
||||
|
||||
class CDlgSelection : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CDlgSelection(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CDlgSelection)
|
||||
enum { IDD = IDD_DLG_SELECTION };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
//}}AFX_DATA
|
||||
private:
|
||||
CPA_Family *m_p_oFamily;
|
||||
public:
|
||||
CPA_List<CPA_BaseObject> m_oListOfSelectedObjects;
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgSelection)
|
||||
public:
|
||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
public:
|
||||
void mfn_vSetFamily(CPA_Family *_p_oFamily);
|
||||
|
||||
protected:
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgSelection)
|
||||
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
|
||||
afx_msg void OnDestroy();
|
||||
virtual BOOL OnInitDialog();
|
||||
virtual void OnCancel();
|
||||
virtual void OnOK();
|
||||
afx_msg void OnDblclkLbox();
|
||||
//}}AFX_MSG
|
||||
void OnDrawItemListBox(LPDRAWITEMSTRUCT lpDrawItemStruct);
|
||||
void mfn_vFillListWithSelectedObjects(void);
|
||||
void mfn_vFillListBox(void);
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_DLGSELECT_HPP__361ABEF2_1B06_11D1_B214_0060973673C5__INCLUDED_)
|
141
Rayman_X/cpa/tempgrp/TAc/inc/DlgState.hpp
Normal file
141
Rayman_X/cpa/tempgrp/TAc/inc/DlgState.hpp
Normal file
@@ -0,0 +1,141 @@
|
||||
/*=============================================================================
|
||||
*
|
||||
* Filename: DlgState.hpp : implementation file
|
||||
* Version: 1.0
|
||||
* Date: 02/01/97
|
||||
* Author: Marc Trabucato & V.L.
|
||||
*
|
||||
* Description: Definition of a FormView Dialog class for animaction
|
||||
* parameters
|
||||
*
|
||||
*===========================================================================*/
|
||||
|
||||
#ifndef __DLGSTATE_HPP__
|
||||
#define __DLGSTATE_HPP__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif
|
||||
/******************************************/
|
||||
|
||||
#include "TAct_res.h"
|
||||
|
||||
class TAction_Interface;
|
||||
class CPA_State;
|
||||
class CPA_Family;
|
||||
class CPA_Action;
|
||||
class State_ModifTransitionExtended;
|
||||
|
||||
typedef enum tdeDisplayType_
|
||||
{
|
||||
E_dt_All,
|
||||
E_dt_Prohibited,
|
||||
E_dt_Allowed
|
||||
} tdeDisplayType;
|
||||
|
||||
/*=============================================================================
|
||||
* CDlgstate class
|
||||
=============================================================================*/
|
||||
class CDlgState : public CFormView
|
||||
{
|
||||
protected:
|
||||
TAction_Interface* m_p_oParentDLL;
|
||||
BOOL m_bFirstShow;
|
||||
CDC m_oAllowedDC;
|
||||
CDC m_oProhibitedDC;
|
||||
CBitmap m_oAllowedBitmap;
|
||||
CBitmap m_oProhibitedBitmap;
|
||||
//ANNECY CT 11/02/98{
|
||||
CDC m_oFluidDC;
|
||||
CBitmap m_oFluidBitmap;
|
||||
//ENDANNECY CT}
|
||||
CFont m_oBoldFont;
|
||||
BOOL m_bAllFamilies;
|
||||
tdeDisplayType m_eTransitionTypeDisplay;
|
||||
protected:
|
||||
CDlgState(); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(CDlgState)
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
//{{AFX_DATA(CDlgState)
|
||||
enum { IDD = IDD_DLG_STATE };
|
||||
//}}AFX_DATA
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext);
|
||||
// Operations
|
||||
public:
|
||||
void fn_vSetCurrentState ( CPA_State *_p_oState );
|
||||
void mfn_vSetCurrentFamily ( CPA_Family *_p_oFamily );
|
||||
void mfn_vFillFamilyList ( void );
|
||||
void mfn_vFillStateList (CPA_State *_p_oState);
|
||||
void mfn_vFillAnimationList (CPA_Family *_p_oFamily);
|
||||
void mfn_vFillMecaList ( void );
|
||||
void fn_vSetParentDLL ( TAction_Interface *_p_oDLL) { m_p_oParentDLL = _p_oDLL; }
|
||||
void mfn_vStateChanged ( CPA_State *_p_oState , tdeChangingState _eChange);
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgState)
|
||||
public:
|
||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
~CDlgState();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
void OnBtExtendfamily ( void );
|
||||
void OnBtExtendaction ( void );
|
||||
void OnBtExtendselection ( void );
|
||||
void mfn_vOnDrawItemComboBoxNextState ( LPDRAWITEMSTRUCT lpDIS );
|
||||
void mfn_vOnDrawItemListBoxAction ( LPDRAWITEMSTRUCT lpDIS );
|
||||
void mfn_vOnDrawItemComboBoxInterruptState ( LPDRAWITEMSTRUCT lpDIS );
|
||||
BOOL mfn_bOnLButtonDownListBoxAction ( MSG *pMsg );
|
||||
BOOL mfn_bOnRButtonDownListBoxAction ( MSG *pMsg );
|
||||
void mfn_vFillInterruptActionList ( void );
|
||||
BOOL mfn_bOnChangeTransitions ( int _iIndex );
|
||||
void mfn_vSetTransitions ( tdeTransitionState _eState );
|
||||
int SelectStringExact ( CComboBox *_pCB, const CString _csEntry );
|
||||
void mfn_vSetDisplayTransition ( tdeDisplayType _eDisplay );
|
||||
BOOL mfn_bGetTSIAndActionFromIndex ( int _iIndex, tdstTransitionStateInfo **_pp_stTSI, CPA_Action **_pp_oAction);
|
||||
void fn_vExtendTransitions ( State_ModifTransitionExtended *_p_oModif );
|
||||
void mfn_vDisplayCustomBits ( CPA_State *_p_oState );
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgState)
|
||||
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
|
||||
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnDeltaposSpinReplay(NMHDR* pNMHDR, LRESULT* pResult);
|
||||
afx_msg void OnDeltaposSpinSpeed(NMHDR* pNMHDR, LRESULT* pResult);
|
||||
afx_msg void OnChangeReplay();
|
||||
afx_msg void OnChangeSpeed();
|
||||
afx_msg void OnCheckDefault();
|
||||
afx_msg void OnCheckDisplay();
|
||||
afx_msg void OnSelchangeComboAnimation();
|
||||
afx_msg void OnSelchangeComboInterruptstate();
|
||||
afx_msg void OnSelchangeComboNextstate();
|
||||
afx_msg void OnSelchangeComboMechanic();
|
||||
afx_msg void OnSelchangeListInterruptaction();
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
afx_msg void OnBtMore();
|
||||
afx_msg void OnSelchangeComboFamily();
|
||||
afx_msg void OnCBClicked(UINT nID);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
#endif // __DLGSTATE_HPP__
|
113
Rayman_X/cpa/tempgrp/TAc/inc/DlgZA.hpp
Normal file
113
Rayman_X/cpa/tempgrp/TAc/inc/DlgZA.hpp
Normal file
@@ -0,0 +1,113 @@
|
||||
// DlgZA.hpp : header file
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgZonesActivation form view
|
||||
|
||||
#ifndef __DLGZA_HPP__
|
||||
#define __DLGZA_HPP__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif
|
||||
/******************************************/
|
||||
|
||||
#ifndef __AFXEXT_H__
|
||||
#include <afxext.h>
|
||||
#endif
|
||||
|
||||
class TAction_Interface;
|
||||
class CPA_State;
|
||||
class CDlgZAList;
|
||||
|
||||
#include "TAct_res.h"
|
||||
|
||||
class CDlgZonesActivation : public CFormView
|
||||
{
|
||||
protected:
|
||||
CDlgZonesActivation(); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(CDlgZonesActivation)
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
//{{AFX_DATA(CDlgZonesActivation)
|
||||
enum { IDD = IDD_DLG_ZA };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
//}}AFX_DATA
|
||||
|
||||
// Attributes
|
||||
protected:
|
||||
TAction_Interface *m_p_oDLL;
|
||||
CDlgZAList *m_p_oDlgZAList;
|
||||
CPA_tdoNameList *m_p_oCurrentNamesList;
|
||||
CPA_ZonesActivating *m_p_oCurrentZA;
|
||||
CDC m_oCrossDC;
|
||||
CBitmap m_oCrossBitmap;
|
||||
BOOL m_bFirstShow;
|
||||
CFont m_oItalicFont;
|
||||
CFont m_oBoldFont;
|
||||
// Attributes
|
||||
protected:
|
||||
BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext);
|
||||
// Operations
|
||||
public:
|
||||
void mfn_vSetParentDLL (TAction_Interface *_p_oDLL) { m_p_oDLL = _p_oDLL ; }
|
||||
void mfn_vSetDlgZAList (CDlgZAList *_p_oDlgZAList) { m_p_oDlgZAList = _p_oDlgZAList; }
|
||||
void mfn_vSetCurrentNamesList (CPA_tdoNameList *_p_oNamesList);
|
||||
void mfn_vUpdateDisplay (CPA_ZonesActivating *_p_oZA, int _iIndex);
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgZonesActivation)
|
||||
public:
|
||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
virtual ~CDlgZonesActivation();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgZonesActivation)
|
||||
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
|
||||
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnSelchangeZAList();
|
||||
afx_msg void OnBtAdd();
|
||||
afx_msg void OnBtRename();
|
||||
afx_msg void OnBtCopy();
|
||||
afx_msg void OnBtDelete();
|
||||
afx_msg void OnBtDefault();
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
afx_msg void OnDblclkListZa();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
protected:
|
||||
void OnDrawZonesListItem (LPDRAWITEMSTRUCT lpDIS);
|
||||
void OnDrawZAListItem (LPDRAWITEMSTRUCT lpDIS);
|
||||
BOOL mfn_bOnLButtonDownLBZones (MSG *pMsg);
|
||||
BOOL mfn_bOnKeyDownLBZones (MSG *pMsg);
|
||||
BOOL mfn_bOnRButtonDownLBZA (MSG *pMsg);
|
||||
|
||||
void mfn_vFillLBZA (CPA_tdoNameList *_p_oNamesList);
|
||||
void mfn_vFillLBZones (CPA_tdoNameList *_p_oNamesList);
|
||||
void mfn_vUpdateFlags (CPA_ZonesActivating *_p_oZA);
|
||||
void mfn_vUpdateButtons (void);
|
||||
int mfn_iSelectStringExact (CListBox *_pLB, CString _csEntry);
|
||||
BOOL mfn_bVerifyNamesListCoherence (BOOL _bUpdateDisplay = TRUE);
|
||||
|
||||
};
|
||||
|
||||
#endif //__DLGZA_HPP__
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
93
Rayman_X/cpa/tempgrp/TAc/inc/DlgZAL.hpp
Normal file
93
Rayman_X/cpa/tempgrp/TAc/inc/DlgZAL.hpp
Normal file
@@ -0,0 +1,93 @@
|
||||
#if !defined(AFX_DLGZAL_HPP__0521A7CF_DB1A_11D0_B19B_0060973673C5__INCLUDED_)
|
||||
#define AFX_DLGZAL_HPP__0521A7CF_DB1A_11D0_B19B_0060973673C5__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
// DlgZAL.hpp : header file
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgZAL form view
|
||||
|
||||
#ifndef __AFXEXT_H__
|
||||
#include <afxext.h>
|
||||
#endif
|
||||
|
||||
#include "TAct_Res.h"
|
||||
|
||||
class TAction_Interface;
|
||||
class CPA_tdoNameList;
|
||||
class CPA_ZonesActivatingList;
|
||||
|
||||
class CDlgZAL : public CFormView
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oDLL;
|
||||
CPA_tdoNameList *m_p_oCurrentNamesList;
|
||||
CPA_ZonesActivatingList *m_p_oCurrentZAList;
|
||||
BOOL m_bFirstShow;
|
||||
protected:
|
||||
CDlgZAL(); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(CDlgZAL)
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
//{{AFX_DATA(CDlgZAL)
|
||||
enum { IDD = IDD_DLG_ZA_LIST };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
//}}AFX_DATA
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
void mfn_vSetParentDLL ( TAction_Interface *_p_oDLL) { m_p_oDLL = _p_oDLL ; }
|
||||
void mfn_vSetCurrentZAList ( CPA_ZonesActivatingList *_p_oZAList );
|
||||
void mfn_vSetCurrentNameList ( CPA_tdoNameList *_p_oNameList );
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgZAL)
|
||||
public:
|
||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
int mfn_iSelectStringExact( CListBox *_pLB, CString _csName);
|
||||
void mfn_vUpdateButtons();
|
||||
void mfn_vFillLBZAList(CPA_tdoNameList *_p_oNameList);
|
||||
virtual ~CDlgZAL();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgZAL)
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
afx_msg void OnBtCopy();
|
||||
afx_msg void OnBtDelete();
|
||||
afx_msg void OnBtNew();
|
||||
afx_msg void OnBtRename();
|
||||
afx_msg void OnSelchangeLbZalist();
|
||||
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_DLGZAL_HPP__0521A7CF_DB1A_11D0_B19B_0060973673C5__INCLUDED_)
|
101
Rayman_X/cpa/tempgrp/TAc/inc/DlgZALst.hpp
Normal file
101
Rayman_X/cpa/tempgrp/TAc/inc/DlgZALst.hpp
Normal file
@@ -0,0 +1,101 @@
|
||||
// DlgZALst.hpp : header file
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgZAList dialog
|
||||
|
||||
#ifndef __DLGZALST_HPP__
|
||||
#define __DLGZALST_HPP__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif
|
||||
/******************************************/
|
||||
|
||||
#ifndef __AFXEXT_H__
|
||||
#include <afxext.h>
|
||||
#endif
|
||||
|
||||
#include "TAct_Res.h"
|
||||
#include "TAC.h"
|
||||
|
||||
class CPA_Family;
|
||||
class CPA_State;
|
||||
class CPA_Action;
|
||||
class TAction_Interface;
|
||||
class CPA_tdoNameList;
|
||||
class CPA_ZonesActivatingList;
|
||||
class CPA_ZonesActivating;
|
||||
class CDlgZonesActivation;
|
||||
|
||||
class CDlgZAList : public CFormView
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oDLL;
|
||||
CPA_ZonesActivatingList *m_p_oCurrentZAList;
|
||||
CPA_ZonesActivating *m_p_oCurrentZA;
|
||||
CPA_List<CPA_State> m_oListOfSelectedStates;
|
||||
CPA_List<CPA_BaseObject> m_oListOfZA;
|
||||
CPA_Action *m_p_oCurrentAction;
|
||||
BOOL m_bFirstShow;
|
||||
CDlgZonesActivation *m_p_oDlgZA;
|
||||
// Construction
|
||||
protected:
|
||||
CDlgZAList(); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(CDlgZAList)
|
||||
// Attributes
|
||||
public:
|
||||
BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext);
|
||||
public:
|
||||
void mfn_vSetZA (CPA_ZonesActivating *_p_oZA, BOOL _bApply = TRUE );
|
||||
void mfn_vSetParentDLL ( TAction_Interface *_p_oDLL) { m_p_oDLL = _p_oDLL ; }
|
||||
void mfn_vSetDlgZA ( CDlgZonesActivation *_p_oDlgZA ) { m_p_oDlgZA = _p_oDlgZA; }
|
||||
void mfn_vSetCurrentNamesList( CPA_tdoNameList *_p_oNameList);
|
||||
void mfn_vSetCurrentZAList ( CPA_ZonesActivatingList *_p_oZAList );
|
||||
void mfn_vAddAction ( CPA_Action *_p_oAction, BOOL _bReplace = FALSE );
|
||||
void mfn_vUpdateStates ( CPA_List<CPA_State> *_p_oListOfState );
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CDlgZAList)
|
||||
enum { IDD = IDD_DLG_ZALIST };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgZAList)
|
||||
public:
|
||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgZAList)
|
||||
//afx_msg void OnBtAction();
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnBtExtendaction();
|
||||
afx_msg void OnBtExtendfamily();
|
||||
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
|
||||
afx_msg void OnSelchangeLbStates();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
protected:
|
||||
BOOL OnRButtonDownLbStates ( MSG* pMsg );
|
||||
void mfn_vFillLBStates ( CPA_Action *_p_oAction, BOOL _bReplace = FALSE );
|
||||
void OnDrawListItem ( LPDRAWITEMSTRUCT lpDIS );
|
||||
void mfn_vUpdateButtons ( void );
|
||||
int mfn_iSelectStringExact ( CListBox *_pLB, CString _csEntry );
|
||||
};
|
||||
|
||||
#endif //__DLGZALST_HPP__
|
104
Rayman_X/cpa/tempgrp/TAc/inc/FAModif.hpp
Normal file
104
Rayman_X/cpa/tempgrp/TAc/inc/FAModif.hpp
Normal file
@@ -0,0 +1,104 @@
|
||||
//#################################################################################
|
||||
//
|
||||
// BASE DEFINITION CLASS OF DLL interface Modification
|
||||
//
|
||||
//#################################################################################
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef __FAMODIF_HPP__
|
||||
#define __FAMODIF_HPP__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif
|
||||
/******************************************/
|
||||
|
||||
class CPA_Family;
|
||||
class CPA_Action;
|
||||
class CPA_State;
|
||||
class TAction_Interface;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
C_eNone,
|
||||
C_eMode,
|
||||
C_eFamily,
|
||||
C_eAction,
|
||||
C_eActionList,
|
||||
C_eState,
|
||||
C_eNameList,
|
||||
C_eZAList,
|
||||
C_eZA
|
||||
} tde_Change;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Family_DelAllActions
|
||||
|
||||
class Family_DelAllActions : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Family *m_p_oFamily;
|
||||
CPA_List<CPA_Action> m_oListOfActionsDeleted;
|
||||
CPA_List<CPA_State> m_oListOfStates;
|
||||
CPA_List<CPA_State> m_oListOfInitialStates;
|
||||
CPA_Action *m_p_oInitialAction;
|
||||
public:
|
||||
Family_DelAllActions(TAction_Interface *_p_oParentDLL, CPA_Family *_p_oFamily);
|
||||
~Family_DelAllActions();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Family_StateChange
|
||||
|
||||
class Family_StateChange : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
long m_lTypeOfChange;
|
||||
void *m_p_vBefore;
|
||||
void *m_p_vAfter;
|
||||
long m_lBefore;
|
||||
long m_lAfter;
|
||||
//statement
|
||||
public:
|
||||
Family_StateChange(TAction_Interface *_p_oParentDLL, long _lTypeOfChange,
|
||||
void *_p_vAfter, void *_p_vBefore,
|
||||
long _lAfter = 0, long _lBefore = 0);
|
||||
~Family_StateChange();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
protected:
|
||||
BOOL mfn_bSomethingToDo(void);
|
||||
BOOL mfn_vMakeChange(void *_p_vValue, long _lValue);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Family_ModifInitialAction
|
||||
|
||||
class Family_ModifInitialAction : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Family *m_p_oFamily;
|
||||
CPA_Action *m_p_oNewInitialAction;
|
||||
CPA_Action *m_p_oPreviousInitialAction;
|
||||
//Actionment
|
||||
public:
|
||||
Family_ModifInitialAction(TAction_Interface *_p_oParentDLL, CPA_Family *_p_oFamily, CPA_Action *_p_oNewInitialAction);
|
||||
~Family_ModifInitialAction();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
#endif // __FAMODIF_HPP__
|
435
Rayman_X/cpa/tempgrp/TAc/inc/STModif.hpp
Normal file
435
Rayman_X/cpa/tempgrp/TAc/inc/STModif.hpp
Normal file
@@ -0,0 +1,435 @@
|
||||
//#################################################################################
|
||||
//
|
||||
// BASE DEFINITION CLASS OF DLL interface Modification
|
||||
//
|
||||
//#################################################################################
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef __STMODIF_HPP__
|
||||
#define __STMODIF_HPP__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif
|
||||
/******************************************/
|
||||
|
||||
class CPA_Family;
|
||||
class CPA_Animation;
|
||||
class CPA_Action;
|
||||
class CPA_State;
|
||||
class TAction_Interface;
|
||||
tdstTransitionStateInfo;
|
||||
#include "TAC.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// typedef
|
||||
|
||||
typedef struct tdstIAInfo_
|
||||
{
|
||||
CPA_State *p_oOwnerState;
|
||||
CPA_Action *p_oActionThatInterrupt;
|
||||
CPA_State *p_oTransitionalState;
|
||||
BOOL bActive;
|
||||
} tdstIAInfo;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_New
|
||||
|
||||
class State_New : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Action *m_p_oAction;
|
||||
CPA_State *m_p_oState;
|
||||
CPA_Animation *m_p_oAnim;
|
||||
char *m_szName;
|
||||
BOOL m_bNormalState;
|
||||
CPA_SaveObject *m_p_oMeca;
|
||||
public:
|
||||
State_New(TAction_Interface *_p_oParentDLL, CPA_Action *_p_oAction,
|
||||
CPA_Animation *_p_oAnim, char *_szNewName, BOOL _bNormalState, CPA_SaveObject *_p_oMeca);
|
||||
~State_New();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_CreateFromAnims
|
||||
|
||||
class State_CreateFromAnims : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Action *m_p_oAction;
|
||||
CPA_List<CPA_State> m_oListOfCreatedStates;
|
||||
CPA_List<CPA_Animation> m_oListOfAnimations;
|
||||
BOOL m_bNormalState;
|
||||
CPA_SaveObject *m_p_oMeca;
|
||||
public:
|
||||
State_CreateFromAnims(TAction_Interface *_p_oParentDLL, CPA_Action *_p_oAction);
|
||||
~State_CreateFromAnims();
|
||||
// init
|
||||
void mfn_vAddAnim (CPA_Animation *_p_oAnim);
|
||||
void mfn_vSetNormalState (BOOL _bNormalState);
|
||||
void mfn_vSetMecaCard (CPA_SaveObject *_p_oMeca);
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_Copy
|
||||
|
||||
class State_Copy : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Action *m_p_oAction;
|
||||
CPA_State *m_p_oStateSource;
|
||||
CPA_State *m_p_oStateTarget;
|
||||
public:
|
||||
State_Copy(TAction_Interface *_p_oParentDLL, CPA_Action *_p_oAction,
|
||||
CPA_State *_p_oState);
|
||||
~State_Copy();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_Rename
|
||||
|
||||
class State_Rename : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Action *m_p_oAction;
|
||||
CPA_State *m_p_oState;
|
||||
char *m_szNewName;
|
||||
public:
|
||||
State_Rename(TAction_Interface *_p_oParentDLL, CPA_Action *_p_oAction,
|
||||
CPA_State *_p_oState, char *_szNewName);
|
||||
~State_Rename();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_Delete
|
||||
|
||||
class State_Delete : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Action *m_p_oAction;
|
||||
CPA_State *m_p_oState;
|
||||
BOOL m_bIsDefault;
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
CPA_State *m_p_oStateNext; // the next state of the state be delete
|
||||
CPA_State *m_p_Previous; //the previous state of the state to delete (in the list)
|
||||
CPA_State *m_p_PreviousNext; //the next state of its previous state
|
||||
BOOL m_bDefault; //true if the state to delete is default
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
public:
|
||||
State_Delete(TAction_Interface *_p_oParentDLL, CPA_Action *_p_oAction,
|
||||
CPA_State *_p_oState);
|
||||
~State_Delete();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_Default
|
||||
|
||||
class State_Default : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Action *m_p_oAction;
|
||||
CPA_State *m_p_oNewDefaultState;
|
||||
public:
|
||||
State_Default(TAction_Interface *_p_oParentDLL, CPA_Action *_p_oAction,
|
||||
CPA_State *_p_oNewState);
|
||||
~State_Default();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
protected:
|
||||
BOOL mfn_vSwapDefaultState();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_ModifAnim
|
||||
|
||||
class State_ModifAnim : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_State *m_p_oState;
|
||||
CPA_Animation *m_p_oNewAnim;
|
||||
public:
|
||||
State_ModifAnim(TAction_Interface *_p_oParentDLL, CPA_State *_p_oState,
|
||||
CPA_Animation *_p_oNewAnim);
|
||||
~State_ModifAnim();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
protected:
|
||||
BOOL mfn_vSwapAnimation();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_ModifNextState
|
||||
|
||||
class State_ModifNextState : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_State *m_p_oState;
|
||||
CPA_State *m_p_oNewNextState;
|
||||
public:
|
||||
State_ModifNextState(TAction_Interface *_p_oParentDLL, CPA_State *_p_oState,
|
||||
CPA_State *_p_oNewNextState);
|
||||
~State_ModifNextState();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
protected:
|
||||
BOOL mfn_vSwapNextState();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_ModifSpeed
|
||||
|
||||
class State_ModifSpeed : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_State *m_p_oState;
|
||||
signed char m_cNewSpeed;
|
||||
BOOL m_bFirstDo;
|
||||
public:
|
||||
State_ModifSpeed(TAction_Interface *_p_oParentDLL, CPA_State *_p_oState, signed char m_cNewSpeed);
|
||||
~State_ModifSpeed();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
protected:
|
||||
BOOL mfn_vSwapSpeed();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_ModifReplay
|
||||
|
||||
class State_ModifReplay : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_State *m_p_oState;
|
||||
unsigned char m_ucNewReplay;
|
||||
BOOL m_bFirstDo;
|
||||
public:
|
||||
State_ModifReplay(TAction_Interface *_p_oParentDLL, CPA_State *_p_oState, unsigned char _ucNewSpeed);
|
||||
~State_ModifReplay();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
protected:
|
||||
BOOL mfn_vSwapReplay();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_ModifMechanic
|
||||
|
||||
class State_ModifMechanic : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_State *m_p_oState;
|
||||
CPA_SaveObject *m_p_oNewMeca;
|
||||
public:
|
||||
State_ModifMechanic(TAction_Interface *_p_oParentDLL, CPA_State *_p_oState,CPA_SaveObject *_p_oNewMeca);
|
||||
~State_ModifMechanic();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
protected:
|
||||
BOOL mfn_vSwapMecaCard();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_ModifTransition
|
||||
|
||||
class State_ModifTransition : public CPA_Modif
|
||||
{
|
||||
public:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_State *m_p_oState;
|
||||
tdstTransitionStateInfo m_stNextTransition;
|
||||
protected:
|
||||
private:
|
||||
public:
|
||||
State_ModifTransition( TAction_Interface *_p_oParentDLL, CPA_State *_p_oState, CPA_Action *_p_oAction,
|
||||
tdeTransitionState _eState, CPA_State *_p_oStatoToGo = NULL );
|
||||
~State_ModifTransition();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
protected:
|
||||
BOOL mfn_bMakeDo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_ModifTransitionExtended
|
||||
|
||||
class State_ModifTransitionExtended : public CPA_Modif
|
||||
{
|
||||
public:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_State *m_p_oCurrentState;
|
||||
CPA_List<CPA_State> m_oListOfStates;
|
||||
CPA_List<tdstTransitionStateInfo> m_oListOfTSI;
|
||||
CPA_List<tdstTSIState> m_oListOfTSIState;
|
||||
BOOL m_bEndCreation;
|
||||
protected:
|
||||
private:
|
||||
public:
|
||||
State_ModifTransitionExtended( TAction_Interface *_p_oParentDLL, CPA_State *_p_oCurrentState );
|
||||
~State_ModifTransitionExtended();
|
||||
|
||||
void mfn_vAddState ( CPA_State *_p_oState );
|
||||
void mfn_vAddTransition ( CPA_Action *_p_oAction, tdeTransitionState _eState, CPA_State *_p_oStatoToGo = NULL );
|
||||
void mfn_vEndCreation ( void );
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
protected:
|
||||
BOOL mfn_bMakeDo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_SwapDefaultTransitionStatus
|
||||
|
||||
class State_SwapDefaultTransitionStatus : public CPA_Modif
|
||||
{
|
||||
public:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_State *m_p_oState;
|
||||
tdeTransitionState m_eNextState;
|
||||
protected:
|
||||
private:
|
||||
public:
|
||||
State_SwapDefaultTransitionStatus( TAction_Interface *_p_oParentDLL, CPA_State *_p_oState );
|
||||
~State_SwapDefaultTransitionStatus();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
protected:
|
||||
BOOL mfn_bMakeDo();
|
||||
};
|
||||
|
||||
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class State_Move
|
||||
class State_Move : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Action *m_p_oAction;
|
||||
CPA_State *m_p_oPrevStateToMove; //the previous state in list of the state to move
|
||||
CPA_State *m_p_oStateToMove; //the state to move
|
||||
CPA_State *m_p_oPrevStateTarget; //the previous state in the list of the target state before which is inserted the state to move
|
||||
CPA_State *m_p_oStateTarget; //the target state
|
||||
CPA_State *m_p_oPrevStateToMoveNext; //next states used for saving and restoring the next states of the states which are changing its next states
|
||||
CPA_State *m_p_oStateToMoveNext;
|
||||
CPA_State *m_p_oPrevStateTargetNext;
|
||||
BOOL m_bDefault; //true if the state to move is default
|
||||
BOOL m_bDefaultTarget; //true if the state before which is inserted the state to move is default
|
||||
|
||||
public:
|
||||
State_Move(TAction_Interface *_p_oParentDLL, CPA_Action *_p_oAction,
|
||||
CPA_State *_p_oPrevStateToMove, CPA_State *_p_oStateToMove,
|
||||
CPA_State *_p_oPrevStateTarget, CPA_State *_p_oStateTarget,
|
||||
CPA_State *_p_oPrevStateToMoveNext, CPA_State *_p_oStateToMoveNext,
|
||||
CPA_State *_p_oPrevStateTargetNext,
|
||||
BOOL _bDefault, BOOL _bDefaultTarget );
|
||||
~State_Move();
|
||||
void mfn_vMoveNormalState(); //move the normal state in the list box
|
||||
void mfn_vMoveTransitionalState(); //move the transitional state in the list box
|
||||
void mfn_vUndoMoveNormalState(); //undo the moving for the normal state
|
||||
void mfn_vUndoMoveTransitionalState(); //undo the moving for the transitional state
|
||||
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
|
||||
|
||||
class State_CreateFromAnimsMove : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_Action *m_p_oAction;
|
||||
CPA_List<CPA_State> m_oListOfCreatedStates;
|
||||
CPA_List<CPA_Animation> m_oListOfAnimations;
|
||||
BOOL m_bNormalState;
|
||||
CPA_SaveObject *m_p_oMeca;
|
||||
CPA_State *m_p_oPrevStateTarget; // the state before which is inserted the new state
|
||||
CPA_State *m_p_oStateTarget; // the previous state
|
||||
CPA_State *m_p_oPrevStateTargetNext; // the old Next state of the previous state
|
||||
BOOL m_bDefaultTarget; // if the target state is default
|
||||
public:
|
||||
State_CreateFromAnimsMove(TAction_Interface *_p_oParentDLL, CPA_Action *_p_oAction,
|
||||
CPA_State *_p_oPrevStateTarget, CPA_State *_p_oStateTarget,
|
||||
CPA_State *_p_oPrevStateTargetNext);
|
||||
~State_CreateFromAnimsMove();
|
||||
// init
|
||||
void mfn_vAddAnim (CPA_Animation *_p_oAnim);
|
||||
void mfn_vSetNormalState (BOOL _bNormalState);
|
||||
void mfn_vSetMecaCard (CPA_SaveObject *_p_oMeca);
|
||||
void mfn_vDo (void);
|
||||
void mfn_vDoMany (int iNumber);
|
||||
void mfn_vUndoMany (int iNumber);
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
|
||||
class State_ModifCustomBits: public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_State *m_p_oState;
|
||||
unsigned char m_ucCBNumber;
|
||||
BOOL m_bFirstDo;
|
||||
public:
|
||||
State_ModifCustomBits(TAction_Interface *_p_oParentDLL, CPA_State *_p_oState, unsigned char _ucCBNumber);
|
||||
~State_ModifCustomBits();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
protected:
|
||||
BOOL mfn_vSwapCB();
|
||||
};
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // __STMODIF_HPP__
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
18
Rayman_X/cpa/tempgrp/TAc/inc/StdAfx.h
Normal file
18
Rayman_X/cpa/tempgrp/TAc/inc/StdAfx.h
Normal file
@@ -0,0 +1,18 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
#ifndef __STDAAFX_H__
|
||||
#define __STDAAFX_H__
|
||||
|
||||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxext.h> // MFC extensions
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // MFC support for Windows 95 Common Controls
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
|
||||
#endif //__STDAAFX_H__
|
||||
|
113
Rayman_X/cpa/tempgrp/TAc/inc/TAct_res.h
Normal file
113
Rayman_X/cpa/tempgrp/TAc/inc/TAct_res.h
Normal file
@@ -0,0 +1,113 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by X:\cpa\tempgrp\TAc\inc\TAction.rc
|
||||
//
|
||||
#define IDD_DLG_ACTIONCONTENTS 102
|
||||
#define IDD_DLG_INPUTTEXT 111
|
||||
#define IDB_BITMAP_CROIX 114
|
||||
#define IDD_DLG_SELECTION 122
|
||||
#define IDB_BITMAP_ALLOWED 123
|
||||
#define IDB_BITMAP_PROHIBITED 125
|
||||
#define IDB_BITMAP_FLUID 126
|
||||
#define IDC_POINTER_CURSOR 128
|
||||
#define IDI_TAC_DLGBAR_ICON 129
|
||||
#define IDD_DLG_STATE 166
|
||||
#define IDD_DLG_ACTION_LIST 301
|
||||
#define IDD_DLG_ZA 302
|
||||
#define IDD_DLG_NEWSTATE 304
|
||||
#define IDD_DLG_ZALIST 305
|
||||
#define IDD_DLG_ACTION_TREE 306
|
||||
#define IDD_DLG_NAMESLIST 308
|
||||
#define IDD_DLG_ANIM 309
|
||||
#define IDD_DLG_ACTION 310
|
||||
#define IDC_LIST_ACTION 1000
|
||||
#define IDC_BT_NEWACTION 1001
|
||||
#define IDC_BT_DELACTION 1002
|
||||
#define IDC_BT_COPYACTION 1003
|
||||
#define IDC_BT_DELSTATE 1003
|
||||
#define IDC_BT_DELALLSTATES 1004
|
||||
#define IDC_BT_DELALLACTION 1004
|
||||
#define IDC_EDIT_REPLAY 1005
|
||||
#define IDC_BT_DEFAULTSTATE 1005
|
||||
#define IDC_BT_RENAMEACTION 1005
|
||||
#define IDC_BT_COPYSTATE 1006
|
||||
#define IDC_EDIT_SPEED 1006
|
||||
#define IDC_BT_EDITZA 1006
|
||||
#define IDC_BT_RENSTATE 1007
|
||||
#define IDC_BT_INITACTION 1007
|
||||
#define IDC_BT_NEWSTATE 1008
|
||||
#define IDC_COMBO_NEXTSTATE 1011
|
||||
#define IDC_COMBO_MECHANIC 1012
|
||||
#define IDC_LIST_STATES 1020
|
||||
#define IDC_COMBO_ANIMATION 1021
|
||||
#define IDC_LIST_INTERRUPTACTION 1022
|
||||
#define IDC_COMBO_INTERRUPTSTATE 1023
|
||||
#define IDC_CHECK_ALL 1024
|
||||
#define IDC_CHECK_USED 1025
|
||||
#define IDC_SPIN_REPLAY 1026
|
||||
#define IDC_SPIN_SPEED 1027
|
||||
#define IDC_STATIC_TEXT 1027
|
||||
#define IDC_EDIT_TEXT 1028
|
||||
#define IDC_COMBO_FAMILY 1028
|
||||
#define IDC_LIST_ZONES 1031
|
||||
#define IDC_RADIO_ZDD 1032
|
||||
#define IDC_RADIO_ZDE 1033
|
||||
#define IDC_RADIO_ZDM 1034
|
||||
#define IDC_RADIO_ZMOD 1035
|
||||
#define IDC_RADIO_ZDR 1035
|
||||
#define IDC_LIST_ZA 1036
|
||||
#define ID_RB_NORMAL 1037
|
||||
#define ID_RB_TRANSITIONAL 1038
|
||||
#define IDC_BT_EXTENDACTION 1038
|
||||
#define IDC_BT_EXTENDFAMILY 1039
|
||||
#define IDC_BT_EXTENDTO 1039
|
||||
#define IDC_LB_ANIM 1040
|
||||
#define IDC_BT_NEW 1040
|
||||
#define IDC_BT_CREATESTATES 1041
|
||||
#define IDC_ST_TRST 1041
|
||||
#define IDC_BT_COPY 1041
|
||||
#define IDC_ST_BORDER 1042
|
||||
#define IDC_BT_RENAME 1042
|
||||
#define IDC_ST_ANIM 1043
|
||||
#define IDC_BT_DELETE 1043
|
||||
#define IDC_BT_DEFAULT 1044
|
||||
#define IDC_ST_FAMILY 1044
|
||||
#define IDC_LB_NAMES 1047
|
||||
#define IDC_LB_STATES 1048
|
||||
#define IDC_BT_EDITSTATE 1049
|
||||
#define IDC_BT_SELECTALL 1050
|
||||
#define IDC_TREE_ACT 1051
|
||||
#define IDC_ST_ZONES 1052
|
||||
#define IDC_LB_ZALIST 1057
|
||||
#define IDC_STATIC_FAMILY 1058
|
||||
#define IDC_STATIC_ANIMATION 1059
|
||||
#define IDC_STATIC_REPLAY 1060
|
||||
#define IDC_STATIC_SPEED 1061
|
||||
#define IDC_STATIC_NEXTSTATE 1062
|
||||
#define IDC_STATIC_MECHANIC 1063
|
||||
#define IDC_BT_MORE 1064
|
||||
#define IDC_STATIC_TPLIST 1065
|
||||
#define IDC_LBOX 1067
|
||||
#define IDC_BT_DISPLAY 1071
|
||||
#define IDC_BUTTON_UP 1073
|
||||
#define IDC_BUTTON_DOWN 1074
|
||||
#define IDC_CHECK_CB1 1074
|
||||
#define IDC_CHECK_CB2 1075
|
||||
#define IDC_CHECK_CB3 1076
|
||||
#define IDC_CHECK_CB4 1077
|
||||
#define IDC_CHECK_CB5 1078
|
||||
#define IDC_CHECK_CB6 1079
|
||||
#define IDC_CHECK_CB7 1080
|
||||
#define IDC_CHECK_CB8 1081
|
||||
#define IDD_DLG_ZA_LIST 3570
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 130
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1075
|
||||
#define _APS_NEXT_SYMED_VALUE 103
|
||||
#endif
|
||||
#endif
|
383
Rayman_X/cpa/tempgrp/TAc/inc/TAction.rc
Normal file
383
Rayman_X/cpa/tempgrp/TAc/inc/TAction.rc
Normal file
@@ -0,0 +1,383 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "..\inc\TAct_res.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Cursor
|
||||
//
|
||||
|
||||
IDC_POINTER_CURSOR CURSOR DISCARDABLE "..\\res\\Cursor1.cur"
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// French (France) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_DLG_ACTION_LIST DIALOGEX 0, 0, 104, 133
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||
BEGIN
|
||||
LISTBOX IDC_LIST_ACTION,3,43,96,88,LBS_SORT | LBS_OWNERDRAWFIXED |
|
||||
LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "New",IDC_BT_NEWACTION,5,19,30,10
|
||||
PUSHBUTTON "Delete",IDC_BT_DELACTION,70,19,30,10
|
||||
PUSHBUTTON "Copy",IDC_BT_COPYACTION,37,19,30,10
|
||||
PUSHBUTTON "Del All",IDC_BT_DELALLACTION,70,31,30,10
|
||||
PUSHBUTTON "Rename",IDC_BT_RENAMEACTION,37,31,30,10
|
||||
PUSHBUTTON "Swap to Activation Mode",IDC_BT_EDITZA,5,2,95,14,0,
|
||||
WS_EX_CLIENTEDGE
|
||||
PUSHBUTTON "Initial",IDC_BT_INITACTION,5,31,30,10
|
||||
END
|
||||
|
||||
IDD_DLG_ACTIONCONTENTS DIALOGEX 0, 0, 106, 106
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||
BEGIN
|
||||
PUSHBUTTON "Delete",IDC_BT_DELSTATE,62,4,29,10,WS_DISABLED
|
||||
LISTBOX IDC_LIST_STATES,4,30,100,73,LBS_OWNERDRAWFIXED |
|
||||
LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
|
||||
WS_TABSTOP,WS_EX_DLGMODALFRAME
|
||||
PUSHBUTTON "Del All",IDC_BT_DELALLSTATES,62,17,29,10,WS_DISABLED
|
||||
PUSHBUTTON "Default",IDC_BT_DEFAULTSTATE,2,17,29,10,WS_DISABLED
|
||||
PUSHBUTTON "Copy",IDC_BT_COPYSTATE,32,4,29,10,WS_DISABLED
|
||||
PUSHBUTTON "Rename",IDC_BT_RENSTATE,32,17,29,10,WS_DISABLED
|
||||
PUSHBUTTON "New",IDC_BT_NEWSTATE,2,4,29,10,WS_DISABLED
|
||||
PUSHBUTTON "Up",IDC_BUTTON_UP,91,4,11,10
|
||||
PUSHBUTTON "Down",IDC_BUTTON_DOWN,91,17,11,10
|
||||
END
|
||||
|
||||
IDD_DLG_STATE DIALOG DISCARDABLE 0, 0, 331, 121
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
COMBOBOX IDC_COMBO_ANIMATION,41,8,103,82,CBS_DROPDOWNLIST |
|
||||
CBS_SORT | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
EDITTEXT IDC_EDIT_REPLAY,41,32,32,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "Spin1",IDC_SPIN_REPLAY,"msctls_updown32",
|
||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
||||
UDS_ARROWKEYS,67,32,11,11
|
||||
EDITTEXT IDC_EDIT_SPEED,107,32,38,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "Spin1",IDC_SPIN_SPEED,"msctls_updown32",UDS_SETBUDDYINT |
|
||||
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,139,32,11,
|
||||
11
|
||||
COMBOBOX IDC_COMBO_NEXTSTATE,41,56,103,105,CBS_DROPDOWNLIST |
|
||||
CBS_OWNERDRAWFIXED | CBS_SORT | CBS_HASSTRINGS |
|
||||
WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
LISTBOX IDC_LIST_INTERRUPTACTION,165,27,156,43,LBS_SORT |
|
||||
LBS_OWNERDRAWFIXED | LBS_HASSTRINGS |
|
||||
LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_DISABLED |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_COMBO_INTERRUPTSTATE,224,75,97,87,CBS_DROPDOWNLIST |
|
||||
CBS_OWNERDRAWFIXED | CBS_SORT | CBS_HASSTRINGS |
|
||||
WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Replay",IDC_STATIC_REPLAY,2,35,22,8
|
||||
LTEXT "Speed",IDC_STATIC_SPEED,84,33,22,8
|
||||
GROUPBOX "Action that interrupt",IDC_ST_BORDER,159,1,168,96
|
||||
LTEXT "Next State",IDC_STATIC_NEXTSTATE,2,59,37,8
|
||||
LTEXT "Animation",IDC_STATIC_ANIMATION,2,11,32,8
|
||||
LTEXT "Transitional State",IDC_ST_TRST,165,78,57,8
|
||||
COMBOBOX IDC_COMBO_MECHANIC,41,80,103,105,CBS_DROPDOWNLIST |
|
||||
CBS_SORT | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Mechanic",IDC_STATIC_MECHANIC,2,83,36,8
|
||||
COMBOBOX IDC_COMBO_FAMILY,42,8,103,82,CBS_DROPDOWNLIST | CBS_SORT |
|
||||
NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Family",IDC_STATIC_FAMILY,2,11,20,8,NOT WS_VISIBLE
|
||||
PUSHBUTTON "+",IDC_BT_MORE,148,8,9,11,NOT WS_VISIBLE
|
||||
PUSHBUTTON "Default",IDC_BT_DEFAULT,165,12,76,12
|
||||
PUSHBUTTON "Display",IDC_BT_DISPLAY,244,12,76,12
|
||||
CONTROL "Check1",IDC_CHECK_CB8,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,41,104,9,11
|
||||
CONTROL "Check1",IDC_CHECK_CB7,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,54,104,9,11
|
||||
CONTROL "Check1",IDC_CHECK_CB6,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,67,104,9,11
|
||||
CONTROL "Check1",IDC_CHECK_CB5,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,80,104,9,11
|
||||
CONTROL "Check1",IDC_CHECK_CB4,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,93,104,9,11
|
||||
CONTROL "Check1",IDC_CHECK_CB3,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,106,104,9,11
|
||||
CONTROL "Check1",IDC_CHECK_CB2,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,119,104,9,11
|
||||
CONTROL "Check1",IDC_CHECK_CB1,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,132,104,8,11
|
||||
LTEXT "Custom bits",IDC_STATIC,1,105,37,8
|
||||
LTEXT "8",IDC_STATIC,44,96,8,8
|
||||
LTEXT "7",IDC_STATIC,56,96,8,8
|
||||
LTEXT "6",IDC_STATIC,69,96,8,8
|
||||
LTEXT "5",IDC_STATIC,82,96,8,8
|
||||
LTEXT "4",IDC_STATIC,95,96,8,8
|
||||
LTEXT "3",IDC_STATIC,107,96,8,8
|
||||
LTEXT "2",IDC_STATIC,121,96,8,8
|
||||
LTEXT "1",IDC_STATIC,134,96,8,8
|
||||
END
|
||||
|
||||
IDD_DLG_INPUTTEXT DIALOG DISCARDABLE 0, 0, 190, 62
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
||||
CAPTION "Dialog"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
EDITTEXT IDC_EDIT_TEXT,92,5,86,14,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Cancel",IDCANCEL,5,27,50,14
|
||||
DEFPUSHBUTTON "OK",IDOK,127,28,50,14
|
||||
LTEXT "Static",IDC_STATIC_TEXT,5,8,83,8
|
||||
END
|
||||
|
||||
IDD_DLG_ZA DIALOG DISCARDABLE 0, 0, 218, 81
|
||||
STYLE WS_CHILD | WS_THICKFRAME
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
LISTBOX IDC_LIST_ZONES,138,13,77,65,LBS_OWNERDRAWFIXED |
|
||||
LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
LTEXT "Activations",IDC_STATIC,1,1,38,8
|
||||
LISTBOX IDC_LIST_ZA,0,13,129,66,LBS_OWNERDRAWFIXED |
|
||||
LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
LTEXT "Zones",IDC_ST_ZONES,137,1,26,8
|
||||
PUSHBUTTON "New",IDC_BT_NEW,37,2,23,9
|
||||
PUSHBUTTON "Copy",IDC_BT_COPY,60,2,23,9
|
||||
PUSHBUTTON "Ren",IDC_BT_RENAME,83,2,23,9
|
||||
PUSHBUTTON "Del",IDC_BT_DELETE,106,2,23,9
|
||||
PUSHBUTTON "Default",IDC_BT_DEFAULT,167,1,23,9,NOT WS_VISIBLE
|
||||
END
|
||||
|
||||
IDD_DLG_NEWSTATE DIALOG DISCARDABLE 0, 0, 144, 89
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
||||
CAPTION "Create a new state"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
EDITTEXT IDC_EDIT_TEXT,30,4,86,14,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Cancel",IDCANCEL,5,45,50,14
|
||||
DEFPUSHBUTTON "OK",IDOK,66,46,50,14
|
||||
LTEXT "Name",IDC_STATIC_TEXT,4,7,26,8
|
||||
CONTROL "Normal",ID_RB_NORMAL,"Button",BS_AUTORADIOBUTTON,4,28,
|
||||
38,10
|
||||
CONTROL "Transitional",ID_RB_TRANSITIONAL,"Button",
|
||||
BS_AUTORADIOBUTTON,64,28,52,10
|
||||
END
|
||||
|
||||
IDD_DLG_ZALIST DIALOG DISCARDABLE 0, 0, 172, 96
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
PUSHBUTTON "Extend to Action",IDC_BT_EXTENDACTION,2,81,82,11,
|
||||
WS_DISABLED
|
||||
PUSHBUTTON "Extend to Family",IDC_BT_EXTENDFAMILY,86,81,82,11,
|
||||
WS_DISABLED
|
||||
LISTBOX IDC_LB_STATES,0,2,168,78,LBS_SORT | LBS_OWNERDRAWFIXED |
|
||||
LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_DLG_ACTION_TREE DIALOGEX 0, 0, 106, 170
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||
BEGIN
|
||||
PUSHBUTTON "New",IDC_BT_NEWACTION,4,17,45,10
|
||||
PUSHBUTTON "Delete",IDC_BT_DELACTION,56,29,45,10
|
||||
PUSHBUTTON "Copy",IDC_BT_COPYACTION,56,17,45,10
|
||||
PUSHBUTTON "Rename",IDC_BT_RENAMEACTION,4,29,45,10
|
||||
CONTROL "Tree1",IDC_TREE_ACT,"SysTreeView32",TVS_HASBUTTONS |
|
||||
TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS |
|
||||
WS_BORDER | WS_TABSTOP,0,43,105,126
|
||||
PUSHBUTTON "Swap to Activation Mode",IDC_BT_EDITZA,5,2,95,14,0,
|
||||
WS_EX_CLIENTEDGE
|
||||
END
|
||||
|
||||
IDD_DLG_NAMESLIST DIALOGEX 0, 0, 106, 126
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "ZDd",IDC_RADIO_ZDD,"Button",BS_AUTORADIOBUTTON |
|
||||
WS_GROUP,15,20,28,10
|
||||
CONTROL "ZDe",IDC_RADIO_ZDE,"Button",BS_AUTORADIOBUTTON,61,20,27,
|
||||
10
|
||||
CONTROL "ZDm",IDC_RADIO_ZDM,"Button",BS_AUTORADIOBUTTON,15,31,29,
|
||||
10
|
||||
LISTBOX IDC_LB_NAMES,0,42,105,84,LBS_SORT | LBS_NOINTEGRALHEIGHT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Swap to State Mode",IDC_BT_EDITSTATE,2,2,102,14,0,
|
||||
WS_EX_CLIENTEDGE
|
||||
CONTROL "ZDr",IDC_RADIO_ZDR,"Button",BS_AUTORADIOBUTTON,61,31,28,
|
||||
10
|
||||
END
|
||||
|
||||
IDD_DLG_ANIM DIALOG DISCARDABLE 0, 0, 171, 96
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
LTEXT "Animations",IDC_ST_ANIM,3,4,35,8,NOT WS_GROUP
|
||||
LISTBOX IDC_LB_ANIM,2,25,166,67,LBS_SORT | LBS_MULTIPLESEL |
|
||||
LBS_OWNERDRAWFIXED | LBS_HASSTRINGS |
|
||||
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "CreateState(s)",IDC_BT_CREATESTATES,101,3,65,14
|
||||
COMBOBOX IDC_COMBO_FAMILY,5,25,160,62,CBS_DROPDOWN | CBS_SORT |
|
||||
NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Family",IDC_ST_FAMILY,3,4,20,8,NOT WS_VISIBLE | NOT
|
||||
WS_GROUP
|
||||
PUSHBUTTON "+",IDC_BT_MORE,85,3,11,14,NOT WS_VISIBLE
|
||||
END
|
||||
|
||||
IDD_DLG_ACTION DIALOG DISCARDABLE 0, 0, 106, 120
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
LISTBOX IDC_LIST_ACTION,3,14,99,102,LBS_SORT |
|
||||
LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "Select All",IDC_BT_SELECTALL,3,1,99,10
|
||||
END
|
||||
|
||||
IDD_DLG_ZA_LIST DIALOG DISCARDABLE 0, 0, 104, 133
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
LISTBOX IDC_LB_ZALIST,2,32,99,99,LBS_SORT | LBS_NOINTEGRALHEIGHT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "New",IDC_BT_NEW,4,3,46,10
|
||||
PUSHBUTTON "Delete",IDC_BT_DELETE,53,18,46,10
|
||||
PUSHBUTTON "Copy",IDC_BT_COPY,53,3,46,10
|
||||
PUSHBUTTON "Rename",IDC_BT_RENAME,4,18,46,10
|
||||
END
|
||||
|
||||
IDD_DLG_SELECTION DIALOGEX 0, 0, 216, 257
|
||||
STYLE DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
CAPTION "Select State(s)"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,162,241,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,2,241,50,14
|
||||
LISTBOX IDC_LBOX,2,2,210,236,LBS_OWNERDRAWFIXED |
|
||||
LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
END
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"..\\inc\\TAct_res.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_BITMAP_ALLOWED BITMAP DISCARDABLE "..\\res\\allowed.bmp"
|
||||
IDB_BITMAP_PROHIBITED BITMAP DISCARDABLE "..\\res\\prohibited.bmp"
|
||||
IDB_BITMAP_FLUID BITMAP DISCARDABLE "..\\res\\fluid.bmp"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_DLG_ACTIONCONTENTS, DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 104
|
||||
BOTTOMMARGIN, 103
|
||||
END
|
||||
|
||||
IDD_DLG_ANIM, DIALOG
|
||||
BEGIN
|
||||
VERTGUIDE, 20
|
||||
END
|
||||
|
||||
IDD_DLG_ZA_LIST, DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 101
|
||||
END
|
||||
|
||||
IDD_DLG_SELECTION, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 2
|
||||
RIGHTMARGIN, 212
|
||||
TOPMARGIN, 2
|
||||
BOTTOMMARGIN, 255
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_TAC_DLGBAR_ICON ICON DISCARDABLE "..\\res\\tac_dlgb.ico"
|
||||
#endif // French (France) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
281
Rayman_X/cpa/tempgrp/TAc/inc/ZAModif.hpp
Normal file
281
Rayman_X/cpa/tempgrp/TAc/inc/ZAModif.hpp
Normal file
@@ -0,0 +1,281 @@
|
||||
//#################################################################################
|
||||
//
|
||||
// BASE DEFINITION CLASS OF DLL interface Modification
|
||||
//
|
||||
//#################################################################################
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef __ZAMODIF_HPP__
|
||||
#define __ZAMODIF_HPP__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif
|
||||
/******************************************/
|
||||
|
||||
class CPA_Family;
|
||||
class CPA_Action;
|
||||
class CPA_State;
|
||||
class TAction_Interface;
|
||||
class CPA_tdoNameList;
|
||||
class CPA_ZonesActivating;
|
||||
class CPA_ZonesActivatingList;
|
||||
|
||||
typedef struct tdstZAStates_
|
||||
{
|
||||
CPA_State *m_p_oState;
|
||||
CPA_ZonesActivating *m_p_oNewZA;
|
||||
} tdstZAStates;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_New
|
||||
|
||||
class ZAList_New : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_tdoNameList *m_p_oNameList;
|
||||
CPA_ZonesActivatingList *m_p_oZAList;
|
||||
CString m_csName;
|
||||
// methods
|
||||
public:
|
||||
ZAList_New(TAction_Interface *_p_oParentDLL, CPA_tdoNameList *_p_oNameList, CString _csName);
|
||||
~ZAList_New();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_Copy
|
||||
|
||||
class ZAList_Copy : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_ZonesActivatingList *m_p_oSourceZAList;
|
||||
CPA_ZonesActivatingList *m_p_oTargetZAList;
|
||||
// methods
|
||||
public:
|
||||
ZAList_Copy(TAction_Interface *_p_oParentDLL, CPA_ZonesActivatingList *_p_oSourceZAList);
|
||||
~ZAList_Copy();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_Rename
|
||||
|
||||
class ZAList_Rename : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_ZonesActivatingList *m_p_oZAList;
|
||||
CString m_csName;
|
||||
// methods
|
||||
public:
|
||||
ZAList_Rename(TAction_Interface *_p_oParentDLL, CPA_ZonesActivatingList *_p_oZAList, CString _csName);
|
||||
~ZAList_Rename();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_Delete
|
||||
|
||||
class ZAList_Delete : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_ZonesActivatingList *m_p_oZAList;
|
||||
// methods
|
||||
public:
|
||||
ZAList_Delete(TAction_Interface *_p_oParentDLL, CPA_ZonesActivatingList *_p_oZAList);
|
||||
~ZAList_Delete();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_ExtendToFamily
|
||||
|
||||
class ZAList_ExtendToFamily : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_ZonesActivatingList *m_p_oZAList;
|
||||
CPA_ZonesActivating *m_p_oZA;
|
||||
CPA_List<CPA_State> *m_p_oListOfDisplayStates;
|
||||
CMap<CPA_State*,CPA_State*,CPA_ZonesActivating*,CPA_ZonesActivating*> m_oListOfZAState;
|
||||
|
||||
// methods
|
||||
public:
|
||||
ZAList_ExtendToFamily(TAction_Interface *_p_oParentDLL, CPA_ZonesActivatingList *_p_oZAList,
|
||||
CPA_ZonesActivating *_p_oZA, CPA_List<CPA_State> *_p_oListOfDisplayStates);
|
||||
~ZAList_ExtendToFamily();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_ExtendToAction
|
||||
|
||||
class ZAList_ExtendToAction : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_ZonesActivatingList *m_p_oZAList;
|
||||
CPA_Action *m_p_oAction;
|
||||
CPA_ZonesActivating *m_p_oZA;
|
||||
CPA_List<CPA_State> *m_p_oListOfDisplayStates;
|
||||
CMap<CPA_State*,CPA_State*,CPA_ZonesActivating*,CPA_ZonesActivating*> m_oListOfZAState;
|
||||
|
||||
// methods
|
||||
public:
|
||||
ZAList_ExtendToAction(TAction_Interface *_p_oParentDLL, CPA_Action *_p_oACtion,
|
||||
CPA_ZonesActivatingList *_p_oZAList, CPA_ZonesActivating *_p_oZA, CPA_List<CPA_State> *_p_oListOfDisplayStates);
|
||||
~ZAList_ExtendToAction();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_SetZAToState
|
||||
|
||||
class ZAList_SetZAToState : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_ZonesActivatingList *m_p_oZAList;
|
||||
CPA_List<CPA_State> *m_p_oListOfDisplayStates;
|
||||
CPA_List<tdstZAStates> m_oListOfChanged;
|
||||
// methods
|
||||
public:
|
||||
ZAList_SetZAToState(TAction_Interface *_p_oParentDLL, CPA_ZonesActivatingList *_p_oZAList,
|
||||
CPA_List<CPA_State> *_p_oListOfDisplayStates);
|
||||
~ZAList_SetZAToState();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
void mfn_vAddZAToState( CPA_ZonesActivating *_p_oZA, CPA_State *_p_oState );
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZA_New
|
||||
|
||||
class ZA_New : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_tdoNameList *m_p_oNameList;
|
||||
CPA_ZonesActivating *m_p_oZA;
|
||||
CString m_csName;
|
||||
// methods
|
||||
public:
|
||||
ZA_New(TAction_Interface *_p_oParentDLL, CPA_tdoNameList *_p_oNameList, CString _csName);
|
||||
~ZA_New();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZA_Copy
|
||||
|
||||
class ZA_Copy : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_ZonesActivating *m_p_oSourceZA;
|
||||
CPA_ZonesActivating *m_p_oTargetZA;
|
||||
// methods
|
||||
public:
|
||||
ZA_Copy(TAction_Interface *_p_oParentDLL, CPA_ZonesActivating *_p_oSourceZA);
|
||||
~ZA_Copy();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZA_Rename
|
||||
|
||||
class ZA_Rename : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_ZonesActivating *m_p_oZA;
|
||||
CString m_csName;
|
||||
// methods
|
||||
public:
|
||||
ZA_Rename(TAction_Interface *_p_oParentDLL, CPA_ZonesActivating *_p_oZA, CString _csName);
|
||||
~ZA_Rename();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZA_Delete
|
||||
|
||||
class ZA_Delete : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_ZonesActivating *m_p_oZA;
|
||||
BOOL m_bDefault;
|
||||
// methods
|
||||
public:
|
||||
ZA_Delete(TAction_Interface *_p_oParentDLL, CPA_ZonesActivating *_p_oZA);
|
||||
~ZA_Delete();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZA_Modify
|
||||
|
||||
class ZA_Modify : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_ZonesActivating *m_p_oZA;
|
||||
unsigned short m_usIndex;
|
||||
BOOL m_bNewState;
|
||||
// methods
|
||||
public:
|
||||
ZA_Modify(TAction_Interface *_p_oParentDLL, CPA_ZonesActivating *_p_oZA,
|
||||
unsigned short _usIndex, BOOL _bNewState);
|
||||
~ZA_Modify();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZA_Default
|
||||
|
||||
class ZA_Default : public CPA_Modif
|
||||
{
|
||||
protected:
|
||||
TAction_Interface *m_p_oParentDLL;
|
||||
CPA_ZonesActivating *m_p_oNewDefaultZA;
|
||||
// methods
|
||||
public:
|
||||
ZA_Default(TAction_Interface *_p_oParentDLL, CPA_ZonesActivating *_p_oNewDefaultZA);
|
||||
~ZA_Default();
|
||||
// actions
|
||||
BOOL Do();
|
||||
BOOL Undo();
|
||||
BOOL mfn_vMakeModif();
|
||||
};
|
||||
|
||||
#endif //__ZAMODIF_HPP__
|
350
Rayman_X/cpa/tempgrp/TAc/make/Tac.dsp
Normal file
350
Rayman_X/cpa/tempgrp/TAc/make/Tac.dsp
Normal file
@@ -0,0 +1,350 @@
|
||||
# Microsoft Developer Studio Project File - Name="TAC" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=TAC - WIN32 DEBUG GLIDE WITH EDITORS
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Tac.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Tac.mak" CFG="TAC - WIN32 DEBUG GLIDE WITH EDITORS"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "TAC - Win32 Debug with Editors" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "TAC - Win32 Debug Glide with Editors" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""$/CPA/TempGrp/TAC/make", TLCAAAAA"
|
||||
# PROP Scc_LocalPath "."
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "TAC - Win32 Debug with Editors"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug with Editors"
|
||||
# PROP BASE Intermediate_Dir "Debug with Editors"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "x:\CPA\EXE\GAM\EDT_Data\Tools"
|
||||
# PROP Intermediate_Dir "Tmp\TACP5Evd"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /Gm /GX /Zi /Od /I "X:\CPA\Public" /I "..\inc" /I "t:\dxsdk\sdk\inc" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_DEBUG" /D "_WINDLL" /D "_AFXDLL" /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo /o"Tmp\TACP5Evd\TAC.bsc"
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 X:\CPA\Exe\GAM\GAMP5Evd.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"X:\CPA\EXE\GAM\EDT_Data\Tools\TACP5Evd.dll" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "TAC - Win32 Debug Glide with Editors"
|
||||
|
||||
# PROP BASE Use_MFC 2
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug Glide with Editors"
|
||||
# PROP BASE Intermediate_Dir "Debug Glide with Editors"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "x:\CPA\EXE\main\EDT_Data\Tools"
|
||||
# PROP Intermediate_Dir "Tmp\TACDFEvd"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "X:\CPA\Public" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_DEBUG" /D "_WINDLL" /D "_AFXDLL" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /Z7 /Od /I "X:\CPA\Public" /I "..\inc" /I "t:\dxsdk\sdk\inc" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_DEBUG" /D "_WINDLL" /D "_AFXDLL" /Fr /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo /o"Tmp\TACDFEvd\TAC.bsc"
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 X:\CPA\Exe\GAM\GAMP5Evd.lib /nologo /subsystem:windows /dll /pdb:"x:\CPA\EXE\GAMEDT_Data\Tools\TACP5Evd.pdb" /debug /machine:I386 /out:"X:\CPA\EXE\GAM\EDT_Data\Tools\TACP5Evd.dll" /pdbtype:sept
|
||||
# SUBTRACT BASE LINK32 /pdb:none
|
||||
# ADD LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"X:\CPA\EXE\main\EDT_Data\TOOLS\TACDFEvd.dll" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none /nodefaultlib
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "TAC - Win32 Debug with Editors"
|
||||
# Name "TAC - Win32 Debug Glide with Editors"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "*.c *.cpp"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\ACinterf.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\ACModif.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\Action.def
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\CPAAction.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\CPAState.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\CPAZnAtv.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\DlgAct.cpp
|
||||
# ADD CPP /I "D:\Cpa\TempGrp\TAc\inc"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\DlgActCt.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\DlgActLs.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\DlgAnim.cpp
|
||||
# ADD CPP /I "D:\Cpa\TempGrp\TAc\inc"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\DlgInput.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\DlgNmLst.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\DlgNwSt.cpp
|
||||
# PROP Exclude_From_Build 1
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\DlgSelect.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\DlgState.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\DlgZA.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\DlgZAL.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\DlgZALst.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\dllcom.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\FAModif.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\StdAfx.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\STModif.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\ZAModif.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "*.h *.hpp"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Public\TAC\_ACTypes.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\ACinterf.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\ACModif.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Public\TAC\CPAAction.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Public\TAC\CPAState.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Public\TAC\CPAZnAtv.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\DlgAct.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\DlgActCt.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\DlgActLs.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\DlgAnim.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\DlgInput.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\DlgNmLst.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\DlgNwSt.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\DlgSelect.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\DlgState.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\DlgZA.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\DlgZAL.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\DlgZALst.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\FAModif.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\StdAfx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\STModif.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Public\TAC.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\ZAModif.hpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resources"
|
||||
|
||||
# PROP Default_Filter "*.res *.ico *.rc *.bmp"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\res\allowed.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\res\Cursor1.cur
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\res\prohibited.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\res\tac_dlgb.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\TAct_res.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\TAction.rc
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Others"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=X:\cpa\exe\Main\edt_data\tools\Action\Act_Help.cnt
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=X:\cpa\exe\Main\edt_data\tools\Action\ACT_HELP.HLP
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=X:\cpa\exe\Main\edt_data\tools\Action\Action.ini
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "libs debug"
|
||||
|
||||
# PROP Default_Filter "*.lib"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Exe\Main\EDT_DATA\ErO___vd.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Exe\Main\MaiDFEvd.lib
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Tac.mak
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
755
Rayman_X/cpa/tempgrp/TAc/make/Tac.vcproj
Normal file
755
Rayman_X/cpa/tempgrp/TAc/make/Tac.vcproj
Normal file
@@ -0,0 +1,755 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="TAC"
|
||||
ProjectGUID="{29BB3160-647E-4A6C-9C57-9E66F4951E8D}"
|
||||
SccProjectName=""$/CPA/TempGrp/TAC/make", TLCAAAAA"
|
||||
SccAuxPath=""
|
||||
SccLocalPath="."
|
||||
SccProvider="MSSCCI:NXN alienbrain"
|
||||
Keyword="MFCProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug Glide with Editors|Win32"
|
||||
OutputDirectory="x:\CPA\EXE\main\EDT_Data\Tools"
|
||||
IntermediateDirectory=".\Tmp\TACDFEvd"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="X:\CPA\Public,..\inc,t:\dxsdk\sdk\inc"
|
||||
PreprocessorDefinitions="CPA_WANTS_IMPORT;ACTIVE_EDITOR;WIN32;_DEBUG;_WINDOWS;CPA_VISUAL;CPA_DEBUG"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Tmp\TACDFEvd/Tac.pch"
|
||||
AssemblerListingLocation=".\Tmp\TACDFEvd/"
|
||||
ObjectFile=".\Tmp\TACDFEvd/"
|
||||
ProgramDataBaseFileName=".\Tmp\TACDFEvd/"
|
||||
BrowseInformation="1"
|
||||
BrowseInformationFile=".\Tmp\TACDFEvd/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="1"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="maidfevd.lib ero___vd.lib gamp5evd.lib oacdfevd.lib"
|
||||
OutputFile="X:\CPA\EXE\main\EDT_Data\TOOLS\TACDFEvd.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="X:\cpa\exe\main\edt_data\objects;X:\cpa\exe\main\edt_data;X:\cpa\exe\main;X:\cpa\libd"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile="..\src\Action.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="x:\CPA\EXE\main\EDT_Data\Tools/TACDFEvd.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="x:\CPA\EXE\main\EDT_Data\Tools/TACDFEvd.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="x:\CPA\EXE\main\EDT_Data\Tools/Tac.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug with Editors|Win32"
|
||||
OutputDirectory="x:\CPA\EXE\GAM\EDT_Data\Tools"
|
||||
IntermediateDirectory=".\Tmp\TACP5Evd"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="X:\CPA\Public,..\inc,t:\dxsdk\sdk\inc"
|
||||
PreprocessorDefinitions="CPA_WANTS_IMPORT;ACTIVE_EDITOR;WIN32;_DEBUG;_WINDOWS;CPA_VISUAL;CPA_DEBUG"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Tmp\TACP5Evd/Tac.pch"
|
||||
AssemblerListingLocation=".\Tmp\TACP5Evd/"
|
||||
ObjectFile=".\Tmp\TACP5Evd/"
|
||||
ProgramDataBaseFileName=".\Tmp\TACP5Evd/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="X:\CPA\libd\GAMP5Evd.lib"
|
||||
OutputFile="X:\CPA\EXE\GAM\EDT_Data\Tools\TACP5Evd.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
ModuleDefinitionFile="..\src\Action.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="x:\CPA\EXE\GAM\EDT_Data\Tools/TACP5Evd.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="x:\CPA\EXE\GAM\EDT_Data\Tools/TACP5Evd.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="x:\CPA\EXE\GAM\EDT_Data\Tools/Tac.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="*.c *.cpp">
|
||||
<File
|
||||
RelativePath="..\src\ACinterf.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\ACModif.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\Action.def">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\CPAAction.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\CPAState.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\CPAZnAtv.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\DlgAct.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="D:\Cpa\TempGrp\TAc\inc"
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="D:\Cpa\TempGrp\TAc\inc"
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\DlgActCt.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\DlgActLs.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\DlgAnim.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="D:\Cpa\TempGrp\TAc\inc"
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="D:\Cpa\TempGrp\TAc\inc"
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\DlgInput.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\DlgNmLst.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\DlgNwSt.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\DlgSelect.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\DlgState.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\DlgZA.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\DlgZAL.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\DlgZALst.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\dllcom.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\FAModif.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\StdAfx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\STModif.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\ZAModif.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="*.h *.hpp">
|
||||
<File
|
||||
RelativePath="..\..\..\Public\TAC\_ACTypes.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\ACinterf.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\ACModif.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\Public\TAC\CPAAction.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\Public\TAC\CPAState.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\Public\TAC\CPAZnAtv.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\DlgAct.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\DlgActCt.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\DlgActLs.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\DlgAnim.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\DlgInput.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\DlgNmLst.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\DlgNwSt.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\DlgSelect.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\DlgState.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\DlgZA.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\DlgZAL.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\DlgZALst.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\FAModif.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\StdAfx.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\STModif.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\Public\TAC.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\ZAModif.hpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resources"
|
||||
Filter="*.res *.ico *.rc *.bmp">
|
||||
<File
|
||||
RelativePath="..\res\allowed.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\res\Cursor1.cur">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\res\prohibited.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\res\tac_dlgb.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\TAct_res.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\TAction.rc">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="\cpa\tempgrp\TAc\inc"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="\cpa\tempgrp\TAc\inc"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Others"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\exe\Main\edt_data\tools\Action\Act_Help.cnt">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\exe\Main\edt_data\tools\Action\ACT_HELP.HLP">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\exe\Main\edt_data\tools\Action\Action.ini">
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="Tac.mak">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
BIN
Rayman_X/cpa/tempgrp/TAc/make/Tmp/TACDFEvd/TAction.res
Normal file
BIN
Rayman_X/cpa/tempgrp/TAc/make/Tmp/TACDFEvd/TAction.res
Normal file
Binary file not shown.
5
Rayman_X/cpa/tempgrp/TAc/make/mssccprj.scc
Normal file
5
Rayman_X/cpa/tempgrp/TAc/make/mssccprj.scc
Normal file
@@ -0,0 +1,5 @@
|
||||
SCC = This is a source code control file
|
||||
|
||||
[Tac.vcproj]
|
||||
SCC_Aux_Path = "P4SCC#srvperforce-ma:1666##raymandata##Editor"
|
||||
SCC_Project_Name = Perforce Project
|
BIN
Rayman_X/cpa/tempgrp/TAc/res/Cursor1.cur
Normal file
BIN
Rayman_X/cpa/tempgrp/TAc/res/Cursor1.cur
Normal file
Binary file not shown.
After Width: | Height: | Size: 326 B |
BIN
Rayman_X/cpa/tempgrp/TAc/res/tac_dlgb.ico
Normal file
BIN
Rayman_X/cpa/tempgrp/TAc/res/tac_dlgb.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 766 B |
534
Rayman_X/cpa/tempgrp/TAc/src/ACModif.cpp
Normal file
534
Rayman_X/cpa/tempgrp/TAc/src/ACModif.cpp
Normal file
@@ -0,0 +1,534 @@
|
||||
//#################################################################################
|
||||
//
|
||||
// BASE IMPLEMENTATION CLASS OF DLL interface Modification
|
||||
//
|
||||
//#################################################################################
|
||||
//
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "TFa.h"
|
||||
#include "TAn.h"
|
||||
|
||||
#include "ACModif.hpp"
|
||||
#include "ACInterf.hpp"
|
||||
#include "x:\Cpa\Main\inc\_EditID.h"
|
||||
#include "x:\Cpa\tempgrp\tia\inc\ai_intf.hpp"
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// MACROS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define M_ForEachElement(oList,p_oElement,Pos)\
|
||||
for( p_oElement = (oList) . GetHeadElement( Pos ) ;\
|
||||
p_oElement ;\
|
||||
p_oElement = (oList) . GetNextElement( Pos )\
|
||||
)
|
||||
|
||||
#define M_DeleteList(oList)\
|
||||
while( ! (oList) . IsEmpty() )\
|
||||
delete (oList) . RemoveHead();
|
||||
|
||||
#define M_FreeList(oList)\
|
||||
while( ! (oList) . IsEmpty() )\
|
||||
free( (oList) . RemoveHead() );
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Action_New
|
||||
|
||||
Action_New::Action_New(TAction_Interface *_p_oParentDLL, CPA_Family *_p_oFamily, char *_szNewName)
|
||||
:CPA_Modif(0, "New action", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL ;
|
||||
m_p_oFamily = _p_oFamily ;
|
||||
m_szName = (char*) malloc ( strlen ( _szNewName ) + 1 ) ;
|
||||
strcpy ( m_szName , _szNewName ) ;
|
||||
m_p_oAction = NULL ;
|
||||
}
|
||||
|
||||
Action_New::~Action_New()
|
||||
{
|
||||
if( m_szName )
|
||||
free(m_szName);
|
||||
if( !HasBeenDone() && m_p_oAction )
|
||||
delete m_p_oAction;
|
||||
}
|
||||
|
||||
BOOL Action_New::Do()
|
||||
{
|
||||
// make data modif
|
||||
if( m_p_oAction == NULL )
|
||||
{
|
||||
// create action
|
||||
m_p_oAction = new CPA_Action( m_p_oParentDLL, m_p_oFamily, m_szName );
|
||||
m_p_oAction -> SetExistingSection( FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Re-register action
|
||||
free(m_szName);
|
||||
m_szName = (char*) malloc ( m_p_oAction -> GetName() . GetLength() + 1 ) ;
|
||||
strcpy ( m_szName , (char*)(LPCTSTR)m_p_oAction -> GetName() ) ;
|
||||
m_p_oAction -> fn_bValidate();
|
||||
}
|
||||
// notify save
|
||||
m_p_oAction -> fn_vNotifySave();
|
||||
// add action to family
|
||||
m_p_oFamily -> mfn_vAddAction( m_p_oAction );
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vActionCreated( m_p_oFamily , m_p_oAction );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL Action_New::Undo()
|
||||
{
|
||||
POSITION xPos;
|
||||
|
||||
// make data modif
|
||||
// remove action from family
|
||||
xPos = m_p_oFamily -> m_oListOfActions . Find ( m_p_oAction ) ;
|
||||
if( xPos )
|
||||
m_p_oFamily -> m_oListOfActions . RemoveAt ( xPos ) ;
|
||||
// unregister action
|
||||
m_p_oAction -> fn_bUnValidate();
|
||||
m_p_oAction -> fn_vNotifyUnSave();
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vActionDeleted ( m_p_oFamily ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Action_Copy
|
||||
|
||||
Action_Copy::Action_Copy(TAction_Interface *_p_oParentDLL, CPA_Family *_p_oFamily, CPA_Action *_p_oAction)
|
||||
:CPA_Modif(0, "Copy action", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL ;
|
||||
m_p_oFamily = _p_oFamily ;
|
||||
m_p_oActionSource = _p_oAction ;
|
||||
m_p_oActionTarget = NULL ;
|
||||
}
|
||||
|
||||
Action_Copy::~Action_Copy()
|
||||
{
|
||||
if( !HasBeenDone() && m_p_oActionTarget )
|
||||
{
|
||||
// delete states
|
||||
while( ! m_p_oActionTarget -> m_oListOfStates . IsEmpty() )
|
||||
{
|
||||
delete m_p_oActionTarget -> m_oListOfStates . RemoveHead();
|
||||
}
|
||||
// delete action
|
||||
delete m_p_oActionTarget ;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL Action_Copy::Do()
|
||||
{
|
||||
POSITION xPos;
|
||||
CPA_State *p_oState;
|
||||
|
||||
// make data modif
|
||||
if( m_p_oActionTarget == NULL )
|
||||
{
|
||||
// create copy of action
|
||||
m_p_oActionTarget = m_p_oActionSource -> mfn_p_oDuplicateAction () ;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// Re-register action
|
||||
m_p_oActionTarget -> fn_bValidate();
|
||||
// Re-register states
|
||||
M_ForEachElement( m_oListOfStates, p_oState, xPos )
|
||||
{
|
||||
p_oState -> fn_bValidate();
|
||||
p_oState -> fn_vNotifySave();
|
||||
m_p_oActionTarget -> mfn_vAddState( p_oState );
|
||||
}
|
||||
}
|
||||
// notify to save state
|
||||
m_p_oActionTarget -> fn_vNotifySave();
|
||||
// add action to family
|
||||
m_p_oFamily -> mfn_vAddAction( m_p_oActionTarget );
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vActionCreated( m_p_oFamily , m_p_oActionTarget );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL Action_Copy::Undo()
|
||||
{
|
||||
CPA_State *p_oState;
|
||||
|
||||
// make data modif
|
||||
m_oListOfStates . RemoveAll();
|
||||
// remove states from action
|
||||
while ( ! m_p_oActionTarget -> m_oListOfStates . IsEmpty() )
|
||||
{
|
||||
p_oState = m_p_oActionTarget -> m_oListOfStates . GetHead();
|
||||
//
|
||||
m_oListOfStates . AddTail( p_oState );
|
||||
//
|
||||
p_oState -> fn_bUnValidate();
|
||||
p_oState -> fn_vNotifyUnSave();
|
||||
//
|
||||
m_p_oActionTarget -> mfn_vRemoveState( p_oState );
|
||||
}
|
||||
// remove action from family
|
||||
m_p_oFamily -> mfn_vRemoveAction( m_p_oActionTarget ) ;
|
||||
// unregister action and state
|
||||
m_p_oActionTarget -> fn_bUnValidate();
|
||||
m_p_oActionTarget -> fn_vNotifyUnSave();
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vActionDeleted ( m_p_oFamily ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Action_Rename
|
||||
|
||||
Action_Rename::Action_Rename(TAction_Interface *_p_oParentDLL, CPA_Action *_p_oAction, char *_szNewName)
|
||||
:CPA_Modif(0, "Rename action", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL ;
|
||||
m_p_oAction = _p_oAction ;
|
||||
m_szNewName = (char*) malloc ( strlen ( _szNewName ) + 1 ) ;
|
||||
strcpy ( m_szNewName , _szNewName ) ;
|
||||
}
|
||||
|
||||
Action_Rename::~Action_Rename()
|
||||
{
|
||||
if( m_szNewName )
|
||||
free(m_szNewName);
|
||||
}
|
||||
|
||||
// actions
|
||||
BOOL Action_Rename::Do()
|
||||
{
|
||||
char *szLastName;
|
||||
|
||||
// make data modif
|
||||
szLastName = (char*) malloc ( strlen ( m_p_oAction -> GetName () ) + 1 ) ;
|
||||
strcpy ( szLastName , m_p_oAction -> fn_p_szGetName () ) ;
|
||||
if( m_p_oAction -> fn_eRename ( m_szNewName ) != E_mc_None )
|
||||
{
|
||||
// error
|
||||
free( szLastName );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
free ( m_szNewName ) ;
|
||||
m_szNewName = szLastName;
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vActionCreated( (CPA_Family*) m_p_oAction -> GetOwner () , m_p_oAction ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL Action_Rename::Undo()
|
||||
{
|
||||
return Do();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Action_Delete
|
||||
|
||||
Action_Delete::Action_Delete(TAction_Interface *_p_oParentDLL, CPA_Family *_p_oFamily, CPA_Action *_p_oAction)
|
||||
:CPA_Modif(0, "Delete action", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL ;
|
||||
m_p_oFamily = _p_oFamily ;
|
||||
m_p_oAction = _p_oAction ;
|
||||
m_p_oOACDLL = m_p_oParentDLL ? m_p_oParentDLL -> GetMainWorld() -> GetObjectDLLWithName( C_szDLLActorName ) : NULL;
|
||||
m_p_oDefaultState = _p_oAction -> mfn_p_oGetDefaultState();
|
||||
}
|
||||
|
||||
Action_Delete::~Action_Delete()
|
||||
{
|
||||
if( HasBeenDone() && m_p_oAction )
|
||||
{
|
||||
// delete states of action
|
||||
M_DeleteList( m_oListOfStates );
|
||||
// delete transitional states
|
||||
while( ! m_oListOfTransitionalStates . IsEmpty() )
|
||||
{
|
||||
tdstTSIState *p_oTSIState = m_oListOfTransitionalStates . RemoveHead();
|
||||
free( p_oTSIState -> p_stTSI );
|
||||
free( p_oTSIState );
|
||||
}
|
||||
// delete action
|
||||
delete m_p_oAction;
|
||||
}
|
||||
}
|
||||
|
||||
// actions
|
||||
BOOL Action_Delete::Do()
|
||||
{
|
||||
POSITION xPos;
|
||||
CPA_State *p_oState;
|
||||
|
||||
// make data modif
|
||||
m_oListOfStates . RemoveAll();
|
||||
m_oListOfTransitionalStates . RemoveAll ();
|
||||
// remove all states of action from family
|
||||
while( ! m_p_oAction -> m_oListOfStates . IsEmpty() )
|
||||
{
|
||||
p_oState = m_p_oAction -> m_oListOfStates . GetHead();
|
||||
// save State
|
||||
m_oListOfStates . AddTail( p_oState );
|
||||
// remove state from action
|
||||
m_p_oAction -> mfn_vRemoveState( p_oState );
|
||||
// unregister state
|
||||
p_oState -> fn_bUnValidate();
|
||||
p_oState -> fn_vNotifyUnSave();
|
||||
}
|
||||
// remove action from family
|
||||
m_p_oFamily -> mfn_vRemoveAction( m_p_oAction );
|
||||
// remove action from all transitional states
|
||||
M_ForEachElement( m_p_oFamily -> m_oListOfStates, p_oState, xPos )
|
||||
{
|
||||
tdstTransitionStateInfo *p_stTSI = p_oState -> mfn_p_stGetTransitionStateInfo( m_p_oAction );
|
||||
if( p_stTSI )
|
||||
{
|
||||
// backup
|
||||
tdstTSIState *p_stTSIState = (tdstTSIState*) malloc( sizeof tdstTSIState);
|
||||
p_stTSIState -> p_oState = p_oState;
|
||||
p_stTSIState -> p_stTSI = (tdstTransitionStateInfo*) malloc( sizeof tdstTransitionStateInfo );
|
||||
memcpy( p_stTSIState -> p_stTSI, p_stTSI, sizeof tdstTransitionStateInfo );
|
||||
m_oListOfTransitionalStates . AddTail( p_stTSIState );
|
||||
// remove from state
|
||||
p_oState -> mfn_vRemoveActionFromTransition( m_p_oAction );
|
||||
// notify modification
|
||||
if( p_oState -> fn_bIsValid() )
|
||||
p_oState -> fn_vNotifySave();
|
||||
}
|
||||
}
|
||||
|
||||
// save al IA using this Action
|
||||
CPA_BaseObject *p_oFamily = m_p_oAction->GetOwner();
|
||||
CPA_List<CPA_BaseObject> oModelsList;
|
||||
|
||||
m_p_oParentDLL->GetMainWorld()->fn_lFindObjects(&oModelsList, "", C_szActorModelTypeName, p_oFamily);
|
||||
|
||||
g_oCoherenceManager . m_fn_vDeleteObject( m_p_oAction );
|
||||
if( m_p_oOACDLL )
|
||||
m_p_oOACDLL -> OnQueryAction( m_p_oParentDLL, C_uiActor_ActionDeleted, (LPARAM) m_p_oAction );
|
||||
// unregister action
|
||||
m_p_oAction -> fn_bUnValidate();
|
||||
m_p_oAction -> fn_vNotifyUnSave();
|
||||
|
||||
if (oModelsList.GetCount())
|
||||
{
|
||||
CPA_DLLBase *pclIADLL = (CPA_DLLBase*)(m_p_oParentDLL->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName));
|
||||
tdstActorsIACom stCom;
|
||||
|
||||
POSITION xPos = oModelsList.GetHeadPosition();
|
||||
while (xPos)
|
||||
{
|
||||
CPA_BaseObject *p_oBsObj = oModelsList.GetNext(xPos);
|
||||
stCom.pvThis=p_oBsObj;
|
||||
stCom.pvData=NULL;
|
||||
pclIADLL->OnQueryAction(m_p_oParentDLL,C_uiAI_ProcessIA, (LPARAM)&stCom);
|
||||
}
|
||||
}
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vActionDeleted( m_p_oFamily );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL Action_Delete::Undo()
|
||||
{
|
||||
CPA_State *p_oState;
|
||||
POSITION xPos;
|
||||
|
||||
// make data modif
|
||||
// restore action
|
||||
m_p_oFamily -> mfn_vAddAction( m_p_oAction ) ;
|
||||
// Re-register action
|
||||
m_p_oAction -> fn_bValidate();
|
||||
m_p_oAction -> fn_vNotifyRestore();
|
||||
// restore saved active transitional state
|
||||
while( ! m_oListOfTransitionalStates . IsEmpty() )
|
||||
{
|
||||
tdstTSIState *p_stTSIState = m_oListOfTransitionalStates . RemoveHead();
|
||||
if( p_stTSIState -> p_oState -> fn_bIsValid() )
|
||||
{
|
||||
p_stTSIState -> p_oState -> mfn_vSetTransitionStateInfo( p_stTSIState -> p_stTSI -> p_oAction,
|
||||
p_stTSIState -> p_stTSI -> eState,
|
||||
p_stTSIState -> p_stTSI -> p_oStateToGo );
|
||||
p_stTSIState -> p_oState -> fn_vNotifySave();
|
||||
}
|
||||
free( p_stTSIState -> p_stTSI );
|
||||
free( p_stTSIState );
|
||||
}
|
||||
|
||||
// restore state
|
||||
M_ForEachElement( m_oListOfStates, p_oState, xPos )
|
||||
{
|
||||
m_p_oAction -> mfn_vAddState( p_oState ) ;
|
||||
// Re-register state
|
||||
p_oState -> fn_bValidate();
|
||||
p_oState -> fn_vNotifyRestore();
|
||||
}
|
||||
// restore default state
|
||||
m_p_oAction -> mfn_vSetDefaultState( m_p_oDefaultState );
|
||||
//
|
||||
g_oCoherenceManager . m_fn_vRestoreObject( m_p_oAction );
|
||||
if( m_p_oOACDLL )
|
||||
m_p_oOACDLL -> OnQueryAction( m_p_oParentDLL, C_uiActor_ActionRestored, (LPARAM) m_p_oAction );
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vActionCreated( m_p_oFamily , m_p_oAction );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Action_DelAllStates
|
||||
|
||||
Action_DelAllStates::Action_DelAllStates(TAction_Interface *_p_oParentDLL, CPA_Family *_p_oFamily, CPA_Action *_p_oAction)
|
||||
:CPA_Modif(0, "Delete all states", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL ;
|
||||
m_p_oFamily = _p_oFamily ;
|
||||
m_p_oAction = _p_oAction ;
|
||||
m_p_oDefaultState = _p_oAction -> mfn_p_oGetDefaultState();
|
||||
}
|
||||
|
||||
Action_DelAllStates::~Action_DelAllStates()
|
||||
{
|
||||
if( HasBeenDone() )
|
||||
{
|
||||
M_DeleteList( m_oListOfStates );
|
||||
}
|
||||
}
|
||||
|
||||
// actions
|
||||
BOOL Action_DelAllStates::Do()
|
||||
{
|
||||
CPA_State *p_oState;
|
||||
|
||||
// copy all states of action
|
||||
m_oListOfStates . RemoveAll () ;
|
||||
while( ! m_p_oAction -> m_oListOfStates . IsEmpty() )
|
||||
{
|
||||
CPA_State *p_oStateI;
|
||||
POSITION xPosI;
|
||||
|
||||
p_oState = m_p_oAction -> m_oListOfStates . GetHead();
|
||||
// copy state
|
||||
m_oListOfStates . AddTail ( p_oState ) ;
|
||||
// unregister state
|
||||
p_oState -> fn_bUnValidate() ;
|
||||
// remove from family
|
||||
m_p_oAction -> mfn_vRemoveState( p_oState );
|
||||
// remove from all states in whitch this state is the next state
|
||||
M_ForEachElement( p_oState -> m_oListOfUsedAsNextState, p_oStateI, xPosI )
|
||||
{
|
||||
if( p_oStateI -> mfn_p_oGetAction() != m_p_oAction )
|
||||
p_oStateI -> mfn_vSetNextState( NULL );
|
||||
}
|
||||
// remove from all state in whitch this state is a transitional state
|
||||
M_ForEachElement( p_oState -> m_oListOfUsedAsTransitional, p_oStateI, xPosI )
|
||||
{
|
||||
tdstTransitionStateInfo *p_stTSI = p_oStateI -> mfn_p_stGetTransitionStateInfo( m_p_oAction );
|
||||
if( p_stTSI && ( p_stTSI -> eState == E_ts_Allowed ) )
|
||||
{
|
||||
p_oStateI -> mfn_vSetTransitionStateInfo( m_p_oAction, p_stTSI -> eState, NULL );
|
||||
if( p_oStateI -> fn_bIsValid() )
|
||||
p_oStateI -> fn_vNotifySave();
|
||||
}
|
||||
}
|
||||
p_oState -> fn_vNotifyUnSave();
|
||||
}
|
||||
// remove default state
|
||||
m_p_oAction -> mfn_vSetDefaultState( NULL );
|
||||
// Notify
|
||||
m_p_oAction -> fn_vNotifySave();
|
||||
|
||||
// Shaitan => optimisation lists in the level
|
||||
// set modification flag in the corresponding family
|
||||
((CPA_Family *) m_p_oAction->GetOwner())->mfn_vSetModifiedStateList();
|
||||
// End Shaitan => optimisation lists in the level
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vActionCreated( m_p_oFamily , m_p_oAction );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL Action_DelAllStates::Undo()
|
||||
{
|
||||
CPA_State *p_oState;
|
||||
POSITION xPos;
|
||||
|
||||
// restore States
|
||||
M_ForEachElement( m_oListOfStates, p_oState, xPos )
|
||||
{
|
||||
CPA_State *p_oStateI;
|
||||
POSITION xPosI;
|
||||
|
||||
// add state to action (and to family)
|
||||
m_p_oAction -> mfn_vAddState( p_oState );
|
||||
// Re-register state
|
||||
p_oState -> fn_bValidate();
|
||||
p_oState -> fn_vNotifyRestore();
|
||||
// restore from all state in whitch this state is the next state
|
||||
M_ForEachElement( p_oState -> m_oListOfUsedAsNextState, p_oStateI, xPosI )
|
||||
{
|
||||
if( p_oStateI -> mfn_p_oGetAction() != m_p_oAction )
|
||||
p_oStateI -> mfn_vSetNextState( p_oState );
|
||||
}
|
||||
// restore from all states in whitch this state is a transitional state
|
||||
M_ForEachElement( p_oState -> m_oListOfUsedAsTransitional, p_oStateI, xPosI )
|
||||
{
|
||||
if( p_oStateI -> mfn_p_oGetAction() != m_p_oAction )
|
||||
{
|
||||
tdstTransitionStateInfo *p_stTSI = p_oStateI -> mfn_p_stGetTransitionStateInfo( m_p_oAction );
|
||||
if( p_stTSI && ( p_stTSI -> eState == E_ts_Allowed ) )
|
||||
{
|
||||
p_oStateI -> mfn_vSetTransitionStateInfo( m_p_oAction, p_stTSI -> eState, p_oState );
|
||||
if( p_oStateI -> fn_bIsValid() )
|
||||
p_oStateI -> fn_vNotifySave();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// restore default state
|
||||
m_p_oAction -> mfn_vSetDefaultState( m_p_oDefaultState );
|
||||
// Notify
|
||||
m_p_oAction -> fn_vNotifySave();
|
||||
|
||||
// Shaitan => optimisation lists in the level
|
||||
// set modification flag in the corresponding family
|
||||
((CPA_Family *) m_p_oAction->GetOwner())->mfn_vSetModifiedStateList();
|
||||
// End Shaitan => optimisation lists in the level
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vActionCreated( m_p_oFamily , m_p_oAction );
|
||||
|
||||
return TRUE;
|
||||
}
|
2134
Rayman_X/cpa/tempgrp/TAc/src/ACinterf.cpp
Normal file
2134
Rayman_X/cpa/tempgrp/TAc/src/ACinterf.cpp
Normal file
File diff suppressed because it is too large
Load Diff
10
Rayman_X/cpa/tempgrp/TAc/src/Action.def
Normal file
10
Rayman_X/cpa/tempgrp/TAc/src/Action.def
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
LIBRARY
|
||||
EXPORTS
|
||||
fn_p_szGetCPAVersion
|
||||
fn_p_stGetDLLIdentity
|
||||
fn_p_oGetDLL
|
||||
fn_vInitDll
|
||||
SECTIONS
|
||||
.data READ WRITE
|
726
Rayman_X/cpa/tempgrp/TAc/src/CPAAction.cpp
Normal file
726
Rayman_X/cpa/tempgrp/TAc/src/CPAAction.cpp
Normal file
@@ -0,0 +1,726 @@
|
||||
/*=============================================================================
|
||||
*
|
||||
* Filename: CPAAction.cpp
|
||||
* Version: 1.0
|
||||
* Date: 30/12/96
|
||||
* Author: Marc Trabucato & V.L.
|
||||
*
|
||||
* Description: implementation of CPA_Action class
|
||||
* (this is a derivation of CPA_SaveObject)
|
||||
*
|
||||
*===========================================================================*/
|
||||
#ifdef ACTIVE_EDITOR
|
||||
|
||||
//MFC
|
||||
#include "stdafx.h"
|
||||
|
||||
//ACP
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
#include "x:\cpa\main\inc\_editid.h"
|
||||
#include "DPT.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "TFa.h"
|
||||
#include "OAC.h"
|
||||
#include "ACInterf.hpp"
|
||||
|
||||
/******************************************************************************
|
||||
* Macros
|
||||
******************************************************************************/
|
||||
#define M_GetFamily() ((CPA_Family*)GetOwner())
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Constructor
|
||||
*---------------------------------------------------------------------------*/
|
||||
CPA_Action::CPA_Action( CPA_EditorBase *p_oEditor, CPA_BaseObject *_p_oOwnerFamily, CString _csActionName )
|
||||
:CPA_SaveObject( p_oEditor, C_szActionTypeName, E_ss_Responsible, _p_oOwnerFamily, TRUE, fn_szGetFamiliesDataPath(),
|
||||
CPA_Action::mfn_vCallBackSave )
|
||||
{
|
||||
ASSERT( _p_oOwnerFamily );
|
||||
// Section Name & Section File Name
|
||||
char szFileName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char szReferencedSectionName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
|
||||
strcpy( szFileName, _p_oOwnerFamily -> fn_p_szGetName() );
|
||||
strcat( szFileName, "\\" );
|
||||
strcat( szFileName, _p_oOwnerFamily -> fn_p_szGetName() );
|
||||
strcat( szFileName, ".ace" );
|
||||
|
||||
SCR_fn_v_RdL0_ComputeSectionName( szReferencedSectionName, szFileName, C_szActionSectionName, "" );
|
||||
SetReferencedSectionName( szReferencedSectionName );
|
||||
SetSectionData( this );
|
||||
SetExistingSection( FALSE );
|
||||
|
||||
m_p_oDefaultState = NULL;
|
||||
// Name
|
||||
if( fn_eRename( _csActionName ) != E_mc_None )
|
||||
SetDefaultValidName( _csActionName );
|
||||
|
||||
fn_vUpdateSectionName();
|
||||
|
||||
m_oListOfStates.RemoveAll();
|
||||
// about saving
|
||||
m_oListOfStatesInterrupted . RemoveAll();
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Static function : call back for SCRIPT analysis
|
||||
******************************************************************************/
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : callback for Edit-CreateNewAction section in .EAC file
|
||||
*---------------------------------------------------------------------------*/
|
||||
SCR_tde_Anl_ReturnValue CPA_Action::fn_AddNewAction( SCR_tdst_File_Description *_p_stFile, char *_p_szName,
|
||||
char *_ap_szParams[], SCR_tde_Anl_Action _eAction )
|
||||
{
|
||||
CPA_DLLBase *p_oDLL;
|
||||
CPA_Family *p_oFamily;
|
||||
CPA_Action *p_oAction;
|
||||
CPA_State *p_oState;
|
||||
CPA_Interface *p_oInterface;
|
||||
BOOL bPreviousLoadingWorld;
|
||||
|
||||
SCR_M_RdL0_GetContextLong(0, 0, CPA_Family*, p_oFamily);
|
||||
p_oDLL = p_oFamily -> GetMainWorld() -> GetToolDLLWithName( C_szDLLActionName );
|
||||
p_oInterface = p_oFamily -> GetMainWorld() -> GetInterface();
|
||||
bPreviousLoadingWorld = p_oInterface -> fn_bIsLoadingWorld();
|
||||
|
||||
switch (_eAction)
|
||||
{
|
||||
case SCR_EA_Anl_BeginSection:
|
||||
// create editor action
|
||||
p_oInterface -> SetLoadingWorld( TRUE );
|
||||
p_oAction = new CPA_Action ( p_oDLL, p_oFamily, _p_szName );
|
||||
p_oInterface -> SetLoadingWorld( bPreviousLoadingWorld );
|
||||
p_oAction -> SetExistingSection( TRUE );
|
||||
p_oFamily -> mfn_vAddAction( p_oAction );
|
||||
SCR_M_RdL0_SetSectionLong( 0, 0, p_oAction );
|
||||
break;
|
||||
|
||||
case SCR_EA_Anl_Entry:
|
||||
// load Action Content
|
||||
SCR_M_RdL0_GetSectionLong(0, 0, CPA_Action*, p_oAction);
|
||||
p_oInterface -> SetLoadingWorld( TRUE );
|
||||
if( !strcmpi(_p_szName,"Initial") )
|
||||
{
|
||||
// set as initial action of family
|
||||
p_oFamily -> mfn_vSetInitialAction( p_oAction );
|
||||
}
|
||||
else if( !strcmpi(_p_szName,"AddState") )
|
||||
{
|
||||
// add editor state
|
||||
p_oState = p_oAction -> mfn_p_oCreateNewState( _ap_szParams[0] );
|
||||
}
|
||||
else if ( !strcmpi(_p_szName,"AddDefaultState") )
|
||||
{
|
||||
// add default editor state
|
||||
p_oState = p_oAction -> mfn_p_oCreateNewState( _ap_szParams[0] );
|
||||
p_oAction -> mfn_vSetDefaultState( p_oState, TRUE );
|
||||
}
|
||||
else if ( !strcmpi(_p_szName,"AddTransitionalState") )
|
||||
{
|
||||
// add editor transitional state
|
||||
p_oState = p_oAction -> mfn_p_oCreateNewState( _ap_szParams[0] );
|
||||
p_oState -> mfn_vSetTransitional( TRUE , FALSE );
|
||||
}
|
||||
p_oInterface -> SetLoadingWorld( bPreviousLoadingWorld );
|
||||
break;
|
||||
|
||||
case SCR_EA_Anl_EndSection:
|
||||
SCR_M_RdL0_GetSectionLong(0, 0, CPA_Action*, p_oAction);
|
||||
// init default state
|
||||
if( ! p_oAction -> mfn_p_oGetDefaultState () )
|
||||
p_oAction -> mfn_vSetDefaultState ( NULL , TRUE ) ;
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
//p_oAction->mfn_vSetListOfStates(); //sort the list with states at the loading
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
break;
|
||||
}
|
||||
return SCR_ERV_Anl_NormalReturn;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : save action on SCRIPT File .EAC (actuellement .ace)
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Action::mfn_vCallBackSave( SCR_tdst_File_Description *_p_stActionFile, char *_p_szSectionName,
|
||||
void *_p_vData, SCR_tde_Ntfy_Action _eAction)
|
||||
{
|
||||
CPA_Action *p_oAction = (CPA_Action*)_p_vData;
|
||||
char szActionName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char szIdName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char szSectionName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
POSITION stPos;
|
||||
|
||||
switch ( _eAction )
|
||||
{
|
||||
case SCR_EA_Ntfy_AddSection:
|
||||
SCR_fn_v_SvL1_ToEndSection( _p_stActionFile );
|
||||
case SCR_EA_Ntfy_RebuildSection:
|
||||
// construct section name
|
||||
SCR_fn_v_RdL0_SplitSectionName( _p_szSectionName, NULL, szActionName, szIdName );
|
||||
SCR_fn_v_RdL0_ComputeSectionName( szSectionName, NULL, szActionName, szIdName );
|
||||
// save begin section
|
||||
SCR_M_SvL0_SaveBeginSection( _p_stActionFile, szSectionName, SCR_CC_C_Cfg_EOL );
|
||||
// initial action ????
|
||||
if( p_oAction == ((CPA_Family*)p_oAction->GetOwner())->mfn_p_oGetInitialAction() )
|
||||
SCR_M_SvL0_SaveEntry( _p_stActionFile, "Initial", SCR_CC_C_Cfg_EOL );
|
||||
// save states
|
||||
stPos = p_oAction -> m_oListOfStates . GetHeadPosition () ;
|
||||
while ( stPos )
|
||||
{
|
||||
CPA_State *p_oState = p_oAction -> m_oListOfStates . GetNext ( stPos ) ;
|
||||
if( p_oState == p_oAction -> m_p_oDefaultState )
|
||||
{
|
||||
SCR_M_SvL0_SaveEntry( _p_stActionFile, "AddDefaultState", SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stActionFile, SCR_EF_SvL0_Normal, 1, p_oState -> fn_p_szGetName() );
|
||||
}
|
||||
else if( p_oState -> mfn_bGetTransitional() )
|
||||
{
|
||||
SCR_M_SvL0_SaveEntry( _p_stActionFile, "AddTransitionalState", SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stActionFile, SCR_EF_SvL0_Normal, 1, p_oState -> fn_p_szGetName() );
|
||||
}
|
||||
else
|
||||
{
|
||||
SCR_M_SvL0_SaveEntry( _p_stActionFile, "AddState", SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stActionFile, SCR_EF_SvL0_Normal, 1, p_oState -> fn_p_szGetName() );
|
||||
}
|
||||
}
|
||||
// End Section
|
||||
SCR_M_SvL0_SaveEndSection( _p_stActionFile, SCR_CC_C_Cfg_EOL ) ;
|
||||
SCR_M_SvL0_SaveBlankLine( _p_stActionFile ) ;
|
||||
// update Section name
|
||||
p_oAction -> fn_vSectionSaved();
|
||||
break;
|
||||
case SCR_EA_Ntfy_DeleteSection:
|
||||
p_oAction -> fn_vSectionDeleted();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : Order the list of transitional states
|
||||
* Author: Mihaela Tancu
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Action::mfn_vSetListOfTransitionalStates(CPA_List<CPA_State>* p_oListOfStates, CPA_List<CPA_State>* p_oListOfStatesTransitional)
|
||||
{
|
||||
CPA_List<CPA_State> p_oListOfStatesTrans1; //list with states pointing to the default state
|
||||
CPA_List<CPA_State> p_oListOfStatesTrans2; //list with states pointing to another transitional state
|
||||
CPA_List<CPA_State> p_oListOfStatesTrans; //list ordered with transitional states
|
||||
CPA_State* p_oState, *p_oStateNext;
|
||||
|
||||
// obtain from the initial list with transitional states
|
||||
// one list for the states which are pointing to the default state
|
||||
// and one list with the states which are pointing to each other.
|
||||
while (!(p_oListOfStatesTransitional->IsEmpty()))
|
||||
{
|
||||
p_oState = p_oListOfStatesTransitional->RemoveHead ( ) ;
|
||||
p_oStateNext = p_oState -> mfn_p_oGetNextState();
|
||||
// Shaitan => state list in the level
|
||||
if (!p_oStateNext)
|
||||
{
|
||||
tdxHandleToState hStateNext = fn_hGetNextStateInState(p_oState->GetStruct());
|
||||
p_oStateNext = (CPA_State*) p_oState->GetBaseObjectList()->fn_p_oFindObjectWithdData((void*)hStateNext, C_szStateTypeName, p_oState->mfn_p_oGetFamily());
|
||||
|
||||
if (!p_oStateNext)
|
||||
{
|
||||
hStateNext = mfn_hGetStateFromLinkTable((char *)hStateNext, (char *) (LPCSTR) p_oState->mfn_p_oGetFamily()->GetName());
|
||||
fn_vSetNextStateInState(p_oState->GetStruct(), hStateNext);
|
||||
p_oStateNext = (CPA_State*) p_oState->GetBaseObjectList()->fn_p_oFindObjectWithdData((void*)hStateNext, C_szStateTypeName, p_oState->mfn_p_oGetFamily());
|
||||
}
|
||||
}
|
||||
// End Shaitan => state list in the level
|
||||
|
||||
if (p_oStateNext-> mfn_bGetTransitional()) // points to another transitional state
|
||||
p_oListOfStatesTrans2.AddTail(p_oState);
|
||||
else // points to the default state
|
||||
p_oListOfStatesTrans1.AddTail(p_oState);
|
||||
}
|
||||
|
||||
BOOL bExist=FALSE;
|
||||
|
||||
//if there exist the list with states which are pointing to another transitional states
|
||||
if (!(p_oListOfStatesTrans2.IsEmpty()))
|
||||
{
|
||||
p_oState = p_oListOfStatesTrans2.RemoveHead ( ) ;
|
||||
p_oStateNext = p_oState -> mfn_p_oGetNextState();
|
||||
bExist = TRUE; // say that this list exist
|
||||
}
|
||||
|
||||
POSITION stPos;
|
||||
|
||||
while (!(p_oListOfStatesTrans2.IsEmpty()))
|
||||
{ // while the list with states pointing to other transitional state exist
|
||||
stPos = p_oListOfStatesTrans2.Find(p_oStateNext);
|
||||
|
||||
if (stPos)
|
||||
{ // if the next state is in the same list as the transitional state
|
||||
// add the state in the list Trans
|
||||
p_oListOfStatesTrans.AddTail(p_oState);
|
||||
if (!(p_oListOfStatesTrans2.IsEmpty()))
|
||||
{ p_oState = p_oStateNext;
|
||||
p_oListOfStatesTrans2.RemoveAt (stPos ) ;
|
||||
p_oStateNext = p_oState -> mfn_p_oGetNextState();
|
||||
}
|
||||
}
|
||||
else
|
||||
{ //if (!(p_oListOfStatesTrans.IsEmpty()))
|
||||
// if the next state is in the list sorted, reorder that list
|
||||
stPos = p_oListOfStatesTrans.Find(p_oStateNext);
|
||||
if (stPos)
|
||||
{
|
||||
p_oListOfStatesTrans.InsertBefore(stPos, p_oState);
|
||||
if (!(p_oListOfStatesTrans2.IsEmpty()))
|
||||
{
|
||||
p_oState = p_oListOfStatesTrans2.RemoveHead();
|
||||
p_oStateNext = p_oState->mfn_p_oGetNextState();
|
||||
}
|
||||
}
|
||||
else
|
||||
// if (!(p_oListOfStatesTrans1.IsEmpty()))
|
||||
{ // if the next transitional state is in the list
|
||||
// with states pointing to the default state
|
||||
stPos = p_oListOfStatesTrans1.Find(p_oStateNext);
|
||||
if (stPos)
|
||||
{ //add the state and its next state to the Trans list
|
||||
p_oListOfStatesTrans.AddTail(p_oState);
|
||||
p_oListOfStatesTrans.AddTail(p_oStateNext);
|
||||
p_oListOfStatesTrans1.RemoveAt(stPos);
|
||||
if (!(p_oListOfStatesTrans2.IsEmpty()))
|
||||
{
|
||||
p_oState = p_oListOfStatesTrans2.RemoveHead();
|
||||
p_oStateNext = p_oState->mfn_p_oGetNextState();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// for the last state, update the lists with states (Trans)
|
||||
if (p_oListOfStatesTrans2.IsEmpty() && bExist)
|
||||
{
|
||||
stPos = p_oListOfStatesTrans1.Find(p_oStateNext);
|
||||
if (stPos)
|
||||
{ //if the Next state is in the list with state Trans1 (list with states pointing to the default state)
|
||||
p_oListOfStatesTrans.AddTail(p_oState);
|
||||
p_oListOfStatesTrans.AddTail(p_oStateNext);
|
||||
p_oListOfStatesTrans1.RemoveAt(stPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
stPos = p_oListOfStatesTrans.Find(p_oStateNext);
|
||||
if (stPos) //if the Next state is in the Trans list
|
||||
p_oListOfStatesTrans.InsertBefore(stPos, p_oState);
|
||||
}
|
||||
}
|
||||
|
||||
// if there exist transitional states pointing to another stransitional states, add them
|
||||
if (bExist)
|
||||
{
|
||||
while (!(p_oListOfStatesTrans.IsEmpty()))
|
||||
{ //put at the beggining of the list with states, the states ordered after the next state field
|
||||
p_oState = p_oListOfStatesTrans.RemoveHead ( ) ;
|
||||
p_oListOfStates -> AddTail(p_oState);
|
||||
}
|
||||
|
||||
}
|
||||
//add the last transitional states pointing to the default state
|
||||
while (!(p_oListOfStatesTrans1.IsEmpty()))
|
||||
{
|
||||
p_oState = p_oListOfStatesTrans1.RemoveHead ( ) ;
|
||||
p_oListOfStates -> AddTail(p_oState);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : Order the list of states asociated with one action
|
||||
* Author: Mihaela Tancu
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Action::mfn_vSetListOfStates()
|
||||
{
|
||||
CPA_List<CPA_State>* p_oListOfStates = &m_oListOfStates;
|
||||
CPA_List<CPA_State> p_oListOfStatesNormal;
|
||||
CPA_List<CPA_State> p_oListOfStatesTransitional;
|
||||
CPA_State* p_oState, *p_oStateNext;
|
||||
|
||||
// update the list with all states (normal and transitional) with
|
||||
// the new list which contain the states in the execution order
|
||||
|
||||
// start with the first element from the initial list
|
||||
if (!(p_oListOfStates->IsEmpty()))
|
||||
p_oState = p_oListOfStates->RemoveHead ( ) ;
|
||||
else return;
|
||||
|
||||
// while it is a transitional state in the list, add transitional state at the end
|
||||
// of the new list
|
||||
while ((p_oState -> mfn_bGetTransitional())&& (!p_oListOfStates->IsEmpty()))
|
||||
{ p_oListOfStatesTransitional.AddTail(p_oState);
|
||||
p_oState = p_oListOfStates->RemoveHead ( ) ;
|
||||
}
|
||||
|
||||
ASSERT(mfn_p_oGetDefaultState());
|
||||
//search for the default state
|
||||
while (!(p_oListOfStates->IsEmpty()) && (p_oState) && (p_oState != mfn_p_oGetDefaultState()))
|
||||
// it is supposed to have ONE default state
|
||||
{
|
||||
p_oListOfStates->AddTail ( p_oState) ;
|
||||
p_oState = p_oListOfStates->RemoveHead ( ) ;
|
||||
}
|
||||
|
||||
p_oListOfStatesNormal.AddTail(p_oState);
|
||||
p_oStateNext = p_oState -> mfn_p_oGetNextState();
|
||||
|
||||
// add at the new list, the normal states in the execution order
|
||||
// looking at the NextState field of state
|
||||
while ((p_oStateNext != NULL) && (!(p_oListOfStates->IsEmpty())) )
|
||||
{ POSITION xPos = p_oListOfStates->Find(p_oStateNext);
|
||||
if (xPos != NULL)
|
||||
{ p_oListOfStates->RemoveAt(xPos);
|
||||
p_oListOfStatesNormal.AddTail(p_oStateNext);
|
||||
}
|
||||
else break;
|
||||
if (p_oStateNext == p_oStateNext -> mfn_p_oGetNextState()) break;
|
||||
p_oStateNext = p_oStateNext -> mfn_p_oGetNextState();
|
||||
}
|
||||
|
||||
// for the states which are still in the first list add them
|
||||
// at the normal list or at the transitional list
|
||||
while (!(p_oListOfStates->IsEmpty()))
|
||||
{ p_oState = p_oListOfStates->RemoveHead ( ) ;
|
||||
p_oStateNext = p_oState -> mfn_p_oGetNextState();
|
||||
if (!p_oState -> mfn_bGetTransitional())
|
||||
p_oListOfStatesNormal.AddTail(p_oState);
|
||||
else
|
||||
p_oListOfStatesTransitional.AddTail(p_oState);
|
||||
}
|
||||
|
||||
// for every state in the new list copy the transitional states in the
|
||||
// first list and set as default the first normal state in the new list
|
||||
mfn_vSetListOfTransitionalStates(p_oListOfStates, &p_oListOfStatesTransitional);
|
||||
|
||||
// the first state in the list is the default state
|
||||
if (!(p_oListOfStatesNormal.IsEmpty()))
|
||||
{ p_oState = p_oListOfStatesNormal.RemoveHead ( ) ;
|
||||
p_oListOfStates -> AddTail(p_oState);
|
||||
}
|
||||
// add the remains normal states in the list
|
||||
while (!(p_oListOfStatesNormal.IsEmpty()))
|
||||
{
|
||||
p_oState = p_oListOfStatesNormal.RemoveHead ( ) ;
|
||||
if (!p_oState -> mfn_bGetTransitional()) // the normal states at the end
|
||||
p_oListOfStates -> AddTail(p_oState);
|
||||
}
|
||||
|
||||
}
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Overloaded function : call back for SCRIPT analysis
|
||||
******************************************************************************/
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : Return handle of default state of action
|
||||
*---------------------------------------------------------------------------*/
|
||||
void* CPA_Action::GetData( void )
|
||||
{
|
||||
if( m_p_oDefaultState )
|
||||
return ( (void*) m_p_oDefaultState -> GetData() );
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description :
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Action::fn_vNotifyRename(void)
|
||||
{
|
||||
CPA_SaveObject::fn_vNotifyRename();
|
||||
// save al IA using this Action
|
||||
CPA_DLLBase *pclIADLL = GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName);
|
||||
CList< CPA_BaseObject *, CPA_BaseObject *> oList;
|
||||
|
||||
if( ( pclIADLL != NULL ) && ( g_oCoherenceManager . m_fn_iGetFatherList( this, &oList ) > 0 ) )
|
||||
{
|
||||
POSITION xPos = oList . GetHeadPosition();
|
||||
while( xPos )
|
||||
{
|
||||
CPA_BaseObject *p_oBsObj = oList . GetNext( xPos );
|
||||
if( p_oBsObj -> fn_bIsOfType( C_szActorModelTypeName ) )
|
||||
{
|
||||
pclIADLL -> OnQueryAction( GetEditor(), C_uiAI_SaveIA, (LPARAM)p_oBsObj );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* Owner functions :
|
||||
******************************************************************************/
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : add state to action
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Action::mfn_vAddState(CPA_State *_p_oState, BOOL _bModifyEngine /*=TRUE*/)
|
||||
{
|
||||
ASSERT( _p_oState );
|
||||
ASSERT( ! (m_oListOfStates . Find(_p_oState)) );
|
||||
|
||||
m_oListOfStates . AddTail( _p_oState );
|
||||
|
||||
CPA_Family *p_oFamily = M_GetFamily();
|
||||
|
||||
if( m_oListOfStates . GetCount() == 1 )
|
||||
{
|
||||
// set first state as default state
|
||||
mfn_vSetDefaultState(_p_oState);
|
||||
}
|
||||
p_oFamily -> mfn_vAddState( _p_oState, _bModifyEngine );
|
||||
// add to all ZAList
|
||||
if( _bModifyEngine )
|
||||
{
|
||||
CPA_BaseObjectList *p_oList = GetEditor() -> GetBaseObjectList( C_szZAListTypeName );
|
||||
Position lPos = p_oList -> GetHeadPosition();
|
||||
while( lPos )
|
||||
{
|
||||
CPA_ZonesActivatingList *p_oZAList = (CPA_ZonesActivatingList*)p_oList -> GetNext( lPos );
|
||||
if( p_oZAList -> GetOwner() -> GetOwner() == p_oFamily )
|
||||
{
|
||||
CPA_ZonesActivating *p_oZA = (CPA_ZonesActivating*)_p_oState -> mfn_p_oGetZAFromZAList( p_oZAList );
|
||||
if( p_oZA == NULL )
|
||||
p_oZA = (CPA_ZonesActivating*) ((CPA_tdoNameList*)p_oZAList -> GetOwner()) -> m_fnp_oGetDefaultZA();
|
||||
p_oZAList -> mfn_vSetZAFromState( p_oZA, _p_oState );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : remove state from action
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Action::mfn_vRemoveState(CPA_State *_p_oState, BOOL _bModifyEngine /*=TRUE*/)
|
||||
{
|
||||
ASSERT( _p_oState );
|
||||
POSITION stPos = m_oListOfStates . Find(_p_oState);
|
||||
ASSERT( stPos );
|
||||
|
||||
if( stPos )
|
||||
{
|
||||
CPA_Family *p_oFamily = M_GetFamily();
|
||||
// remove from action
|
||||
m_oListOfStates . RemoveAt( stPos );
|
||||
if( _p_oState == m_p_oDefaultState )
|
||||
mfn_vSetDefaultState( NULL );
|
||||
// remove from family
|
||||
p_oFamily -> mfn_vRemoveState( _p_oState, _bModifyEngine );
|
||||
// remove from all ZAList
|
||||
if( _bModifyEngine )
|
||||
{
|
||||
CPA_BaseObjectList *p_oList = GetEditor() -> GetBaseObjectList( C_szZAListTypeName );
|
||||
Position lPos = p_oList -> GetHeadPosition();
|
||||
while( lPos )
|
||||
{
|
||||
CPA_ZonesActivatingList *p_oZAList = (CPA_ZonesActivatingList*)p_oList -> GetNext( lPos );
|
||||
if( p_oZAList -> GetOwner() -> GetOwner() == p_oFamily )
|
||||
{
|
||||
p_oZAList -> mfn_vRemoveState( _p_oState );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : Set the default initial state of action
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Action::mfn_vSetDefaultState(CPA_State *_p_oState, BOOL _bInit /*=FALSE*/)
|
||||
{
|
||||
if( _p_oState == NULL )
|
||||
{
|
||||
// find a state to be default
|
||||
POSITION xPos = m_oListOfStates . GetHeadPosition();
|
||||
while ( xPos )
|
||||
{
|
||||
_p_oState = m_oListOfStates . GetNext( xPos );
|
||||
if( ! _p_oState -> mfn_bGetTransitional() )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( (m_oListOfStates . Find(_p_oState) != NULL) && !_p_oState -> mfn_bGetTransitional() )
|
||||
{
|
||||
BOOL bStateChange = (m_p_oDefaultState != _p_oState );
|
||||
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
CPA_State* _p_oDefault=m_p_oDefaultState; //save the default state
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
|
||||
fn_vUpdateData( _p_oState ? _p_oState -> GetData() : NULL );
|
||||
m_p_oDefaultState = _p_oState;
|
||||
// update all next state of transitional states
|
||||
if( !_bInit )
|
||||
{
|
||||
POSITION xPos = m_oListOfStates . GetHeadPosition();
|
||||
while ( xPos )
|
||||
{
|
||||
CPA_State *p_oState = m_oListOfStates . GetNext ( xPos ) ;
|
||||
if( p_oState -> mfn_bGetTransitional() )
|
||||
{
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
if (p_oState ->mfn_p_oGetNextState() == _p_oDefault)
|
||||
{ //only for the states pointing to the default state
|
||||
//modify its next states
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
p_oState -> mfn_vSetNextState( m_p_oDefaultState );
|
||||
//if( ! _bInit )
|
||||
p_oState -> fn_vNotifySave();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( ! _bInit && bStateChange )
|
||||
{
|
||||
// save al IA using this Action
|
||||
CPA_DLLBase *p_oActorDLL = GetMainWorld() -> GetObjectDLLWithName( C_szDLLActorName );
|
||||
CPA_DLLBase *pclIADLL = GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName);
|
||||
CList< CPA_BaseObject *, CPA_BaseObject *> oList;
|
||||
|
||||
if( ( pclIADLL != NULL ) && ( g_oCoherenceManager . m_fn_iGetFatherList( this, &oList ) > 0 ) )
|
||||
{
|
||||
POSITION xPos = oList . GetHeadPosition();
|
||||
while( xPos )
|
||||
{
|
||||
CPA_BaseObject *p_oBsObj = oList . GetNext( xPos );
|
||||
if( p_oBsObj -> fn_bIsOfType( C_szActorModelTypeName ) )
|
||||
{
|
||||
pclIADLL -> OnQueryAction( GetEditor(), C_uiAI_ProcessIA, (LPARAM)p_oBsObj );
|
||||
}
|
||||
}
|
||||
}
|
||||
// save models
|
||||
p_oActorDLL -> OnQueryAction( GetEditor(), C_uiActor_ActionModif, (LPARAM)this );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : Create and return a copy of the action
|
||||
*---------------------------------------------------------------------------*/
|
||||
CPA_Action *CPA_Action::mfn_p_oDuplicateAction( void )
|
||||
{
|
||||
CMap<CPA_State*, CPA_State*, CPA_State*, CPA_State*> m_oMapOfStates;
|
||||
CPA_Action *p_oNewAction = new CPA_Action( GetEditor(), GetOwner(), "CopyOf" + GetName() );
|
||||
// saving
|
||||
p_oNewAction -> SetExistingSection( FALSE );
|
||||
p_oNewAction -> fn_vNotifySave();
|
||||
|
||||
m_oMapOfStates . RemoveAll();
|
||||
// copy list of states and default state
|
||||
p_oNewAction -> m_oListOfStates . RemoveAll () ;
|
||||
p_oNewAction -> mfn_vSetDefaultState ( NULL ) ;
|
||||
POSITION stPos = m_oListOfStates . GetHeadPosition () ;
|
||||
while ( stPos )
|
||||
{
|
||||
CPA_State *p_oState = m_oListOfStates . GetNext ( stPos ) ;
|
||||
CPA_State *p_oNewState = p_oState -> mfn_p_oDuplicateState () ;
|
||||
m_oMapOfStates . SetAt( p_oState, p_oNewState );
|
||||
|
||||
// add state to action
|
||||
p_oNewAction -> mfn_vAddState( p_oNewState );
|
||||
p_oNewState -> mfn_vSetAction( p_oNewAction );
|
||||
// update default state
|
||||
if ( p_oState == m_p_oDefaultState )
|
||||
p_oNewAction -> mfn_vSetDefaultState ( p_oNewState ) ;
|
||||
}
|
||||
// update next states
|
||||
stPos = p_oNewAction -> m_oListOfStates . GetHeadPosition();
|
||||
while ( stPos )
|
||||
{
|
||||
CPA_State *p_oState = p_oNewAction -> m_oListOfStates . GetNext( stPos );
|
||||
CPA_State *p_oLastNextState = p_oState -> mfn_p_oGetNextState();
|
||||
CPA_State *p_oNewNextState = NULL;
|
||||
|
||||
if ( p_oLastNextState && // Next State exist
|
||||
( p_oLastNextState -> mfn_p_oGetAction() == this ) && // next state has been copied
|
||||
( m_oMapOfStates . Lookup( p_oLastNextState, p_oNewNextState ) ) ) // copy of next state found
|
||||
{
|
||||
p_oState -> mfn_vSetNextState( p_oNewNextState );
|
||||
}
|
||||
}
|
||||
m_oMapOfStates . RemoveAll();
|
||||
// init default state
|
||||
if( ( p_oNewAction -> mfn_p_oGetDefaultState() == NULL ) && (! p_oNewAction -> m_oListOfStates . IsEmpty() ) )
|
||||
p_oNewAction -> mfn_vSetDefaultState ( p_oNewAction -> m_oListOfStates . GetHead () ) ;
|
||||
return p_oNewAction;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : find the engine state with given name on linktable
|
||||
*---------------------------------------------------------------------------*/
|
||||
tdxHandleToState CPA_Action::mfn_hGetStateFromLinkTable(char *_szStateName,char *_szFamilyName)
|
||||
{
|
||||
char szFile[SCR_CV_ui_Cfg_MaxLenName],szSection[SCR_CV_ui_Cfg_MaxLenName];
|
||||
SCR_tdst_Link_Value *p_tdst_LinkEntry;
|
||||
|
||||
sprintf( szFile, "%s\\%s\\%s.sta", fn_szGetFamiliesDataPath(), _szFamilyName, _szFamilyName );
|
||||
|
||||
SCR_fn_v_RdL0_ComputeSectionName( szSection, szFile, C_szStateSectionName, _szStateName);
|
||||
|
||||
p_tdst_LinkEntry = SCR_fnp_st_Link_SearchKey( &g_st3DOSLinkTable.stState, szSection );
|
||||
|
||||
if( p_tdst_LinkEntry && ( SCR_M_e_Link_GetState( p_tdst_LinkEntry ) == SCR_ELS_Link_Initialized) )
|
||||
return (tdxHandleToState) SCR_M_ul_Link_GetValue( p_tdst_LinkEntry );
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : create a new state (with engine state) and add it to action and family
|
||||
*---------------------------------------------------------------------------*/
|
||||
CPA_State *CPA_Action::mfn_p_oCreateNewState(char *_szStateName)
|
||||
{
|
||||
CPA_Family *p_oFamily = M_GetFamily();
|
||||
CPA_State *p_oState = NULL;
|
||||
tdxHandleToState hState = mfn_hGetStateFromLinkTable( _szStateName, p_oFamily -> fn_p_szGetName() );
|
||||
|
||||
if( hState )
|
||||
{
|
||||
p_oState = new CPA_State( GetEditor(), p_oFamily, hState, NULL, _szStateName );
|
||||
p_oFamily -> m_oListOfStates . AddTail( p_oState , FALSE );
|
||||
p_oState -> mfn_vSetAction( this );
|
||||
m_oListOfStates . AddTail( p_oState );
|
||||
}
|
||||
return p_oState;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description :
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Action::mfn_vInterruptState(CPA_State *_p_oState)
|
||||
{
|
||||
if( fn_bIsValid() )
|
||||
{
|
||||
POSITION xPos = m_oListOfStatesInterrupted . Find( _p_oState, NULL );
|
||||
if( !xPos )
|
||||
m_oListOfStatesInterrupted . AddTail( _p_oState );
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description :
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Action::mfn_vDontInterruptState(CPA_State *_p_oState)
|
||||
{
|
||||
if( fn_bIsValid() )
|
||||
{
|
||||
POSITION xPos = m_oListOfStatesInterrupted . Find( _p_oState, NULL );
|
||||
if( xPos )
|
||||
m_oListOfStatesInterrupted . RemoveAt( xPos );
|
||||
}
|
||||
}
|
||||
|
||||
#endif //EDITOR_ACTIVE
|
175
Rayman_X/cpa/tempgrp/TAc/src/CPAActionCB.cpp
Normal file
175
Rayman_X/cpa/tempgrp/TAc/src/CPAActionCB.cpp
Normal file
@@ -0,0 +1,175 @@
|
||||
#ifdef ACTIVE_EDITOR
|
||||
|
||||
//MFC
|
||||
#include "stdafx.h"
|
||||
|
||||
//ACP
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
#include "x:\cpa\main\inc\_editid.h"
|
||||
#include "DPT.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "TFa.h"
|
||||
#include "OAC.h"
|
||||
#include "ACInterf.hpp"
|
||||
|
||||
#ifdef CPA_USES_LDT
|
||||
|
||||
#include "ldt.h"
|
||||
|
||||
#define lTagInitial 'tinI'
|
||||
#define lTagAddState 'SddA'
|
||||
#define lTagAddDefaultState 'DddA'
|
||||
#define lTagAddTransitionalState 'TddA'
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
Function name : CPA_Action::fn_iCreateACEFile
|
||||
Description :
|
||||
Author : Ovidiu Scripa (oscripa@ubisoft.ro) - ROMTEAM
|
||||
Creation Date : 15-Oct-98
|
||||
Modified :
|
||||
Return type : int
|
||||
Argument : LDT_tdst_Link *pLink
|
||||
*****************************************************************/
|
||||
int CPA_Action::fn_iCreateACEFile( LDT_tdst_Link *pLink )
|
||||
{
|
||||
CPA_Family *p_oFamily;
|
||||
|
||||
p_oFamily = (CPA_Family * )LDT_GetTempLong( 0 );
|
||||
|
||||
pLink->pObject = (void*)p_oFamily;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
Function name : CPA_Action::fn_iCreateNewAction
|
||||
Description :
|
||||
Author : Ovidiu Scripa (oscripa@ubisoft.ro) - ROMTEAM
|
||||
Creation Date : 15-Oct-98
|
||||
Modified :
|
||||
Return type : int
|
||||
Argument : LDT_tdst_Link *pLink
|
||||
*****************************************************************/
|
||||
int CPA_Action::fn_iCreateNewAction( LDT_tdst_Link *pLink )
|
||||
{
|
||||
|
||||
CPA_DLLBase *p_oDLL;
|
||||
CPA_Family *p_oFamily;
|
||||
CPA_Action *p_oAction;
|
||||
CPA_Interface *p_oInterface;
|
||||
BOOL bPreviousLoadingWorld;
|
||||
|
||||
p_oFamily = (CPA_Family * )pLink->pParent->pObject;
|
||||
|
||||
p_oDLL = p_oFamily -> GetMainWorld() -> GetToolDLLWithName( C_szDLLActionName );
|
||||
p_oInterface = p_oFamily -> GetMainWorld() -> GetInterface();
|
||||
bPreviousLoadingWorld = p_oInterface -> fn_bIsLoadingWorld();
|
||||
|
||||
// create editor action
|
||||
p_oInterface -> SetLoadingWorld( TRUE );
|
||||
p_oAction = new CPA_Action ( p_oDLL, p_oFamily, LDT_szGetSectionName() );
|
||||
p_oInterface -> SetLoadingWorld( bPreviousLoadingWorld );
|
||||
p_oAction -> SetExistingSection( TRUE );
|
||||
p_oFamily -> mfn_vAddAction( p_oAction );
|
||||
|
||||
pLink->pObject = (void*)p_oAction;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
Function name : CPA_Action::fn_iLoadNewAction
|
||||
Description :
|
||||
Author : Ovidiu Scripa (oscripa@ubisoft.ro) - ROMTEAM
|
||||
Creation Date : 15-Oct-98
|
||||
Modified :
|
||||
Return type : int
|
||||
Argument : LDT_tdst_Link *pLink
|
||||
*****************************************************************/
|
||||
int CPA_Action::fn_iLoadNewAction( LDT_tdst_Link *pLink )
|
||||
{
|
||||
LDT_tdeParseResult result=ParseResult_BeginSection;
|
||||
CPA_DLLBase *p_oDLL;
|
||||
CPA_Family *p_oFamily;
|
||||
CPA_Action *p_oAction;
|
||||
CPA_State *p_oState;
|
||||
CPA_Interface *p_oInterface;
|
||||
BOOL bPreviousLoadingWorld;
|
||||
|
||||
p_oFamily = (CPA_Family * )pLink->pParent->pObject;
|
||||
p_oAction = (CPA_Action * )pLink->pObject;
|
||||
|
||||
p_oDLL = p_oFamily -> GetMainWorld() -> GetToolDLLWithName( C_szDLLActionName );
|
||||
p_oInterface = p_oFamily -> GetMainWorld() -> GetInterface();
|
||||
bPreviousLoadingWorld = p_oInterface -> fn_bIsLoadingWorld();
|
||||
|
||||
p_oInterface -> SetLoadingWorld( TRUE );
|
||||
|
||||
|
||||
while( result!=ParseResult_EndSection )
|
||||
{
|
||||
result=LDT_GetNextEntry();
|
||||
switch( result )
|
||||
{
|
||||
case ParseResult_Entry: /* an entry */
|
||||
{
|
||||
char *szEntry=LDT_szGetEntryName();
|
||||
switch (*(long*)szEntry)
|
||||
{
|
||||
|
||||
case lTagInitial : /* */
|
||||
{
|
||||
// set as initial action of family
|
||||
p_oFamily -> mfn_vSetInitialAction( p_oAction );
|
||||
|
||||
}
|
||||
break;
|
||||
case lTagAddState : /* */
|
||||
{
|
||||
// add editor state
|
||||
p_oState = p_oAction -> mfn_p_oCreateNewState( LDT_szGetParam(1) );
|
||||
|
||||
}
|
||||
break;
|
||||
case lTagAddDefaultState : /* */
|
||||
{
|
||||
// add default editor state
|
||||
p_oState = p_oAction -> mfn_p_oCreateNewState( LDT_szGetParam(1) );
|
||||
p_oAction -> mfn_vSetDefaultState( p_oState, TRUE );
|
||||
|
||||
}
|
||||
break;
|
||||
case lTagAddTransitionalState : /* */
|
||||
{
|
||||
// add editor transitional state
|
||||
p_oState = p_oAction -> mfn_p_oCreateNewState( LDT_szGetParam(1) );
|
||||
p_oState -> mfn_vSetTransitional( TRUE, FALSE );
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
p_oInterface -> SetLoadingWorld( bPreviousLoadingWorld );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if( ! p_oAction -> mfn_p_oGetDefaultState () )
|
||||
p_oAction -> mfn_vSetDefaultState ( NULL, TRUE ) ;
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
// p_oAction->mfn_vSetListOfStates(); //sort the list with states at the loading
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif //CPA_USES_LDT
|
||||
|
||||
#endif //EDITOR_ACTIVE
|
||||
|
1200
Rayman_X/cpa/tempgrp/TAc/src/CPAState.cpp
Normal file
1200
Rayman_X/cpa/tempgrp/TAc/src/CPAState.cpp
Normal file
File diff suppressed because it is too large
Load Diff
1505
Rayman_X/cpa/tempgrp/TAc/src/CPAZnAtv.cpp
Normal file
1505
Rayman_X/cpa/tempgrp/TAc/src/CPAZnAtv.cpp
Normal file
File diff suppressed because it is too large
Load Diff
274
Rayman_X/cpa/tempgrp/TAc/src/DlgAct.cpp
Normal file
274
Rayman_X/cpa/tempgrp/TAc/src/DlgAct.cpp
Normal file
@@ -0,0 +1,274 @@
|
||||
/*=============================================================================
|
||||
*
|
||||
* Filename: DlgAct.cpp : implementation file
|
||||
* Version: 1.0
|
||||
* Date: 02/01/97
|
||||
* Author: M.T.
|
||||
*
|
||||
* Description: implementation of a FormView Dialog class for actions
|
||||
* list in ZAM mode
|
||||
*
|
||||
*===========================================================================*/
|
||||
|
||||
//#undef _DEBUG
|
||||
#include "stdafx.h"
|
||||
//#define _DEBUG
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "TFA.h"
|
||||
|
||||
#include "DlgAct.hpp"
|
||||
#include "DlgZALst.hpp"
|
||||
|
||||
#include "ACInterf.hpp"
|
||||
#include "FAModif.hpp"
|
||||
|
||||
#include "..\Main\Inc\_EditID.h"
|
||||
#include "TUT.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
|
||||
#define M_LBActions() ( (CListBox*) GetDlgItem( IDC_LIST_ACTION ) )
|
||||
|
||||
#define M_GetClientRect( pWnd, poRect ) (pWnd) -> GetWindowRect( poRect );ScreenToClient( poRect )
|
||||
#define M_GetClientRectId( Id, poRect ) M_GetClientRect( GetDlgItem( Id ), poRect )
|
||||
#define M_SetClientRect( pWnd, poRect ) (pWnd) -> MoveWindow( poRect )
|
||||
#define M_SetClientRectId( Id, poRect ) M_SetClientRect( GetDlgItem( Id ), poRect )
|
||||
|
||||
#define M_MakeDo( p_oModif ) m_p_oDLL -> M_GetEditManager() -> AskFor( p_oModif )
|
||||
|
||||
#define C_iBorderSize 2
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgAction
|
||||
|
||||
IMPLEMENT_DYNCREATE(CDlgAction, CFormView)
|
||||
|
||||
CDlgAction::CDlgAction()
|
||||
: CFormView(CDlgAction::IDD)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgAction)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
m_p_oDLL = NULL;
|
||||
m_p_oDlgZAList = NULL;
|
||||
m_a_iNewSelection = NULL;
|
||||
m_a_iLastSelection = NULL;
|
||||
m_lNewNbSelected = 0;
|
||||
m_lLastNbSelected = 0;
|
||||
}
|
||||
|
||||
CDlgAction::~CDlgAction()
|
||||
{
|
||||
if( m_a_iLastSelection )
|
||||
free( m_a_iLastSelection );
|
||||
if( m_a_iNewSelection )
|
||||
free( m_a_iNewSelection );
|
||||
}
|
||||
|
||||
void CDlgAction::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CFormView::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgAction)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
BOOL CDlgAction::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext)
|
||||
{
|
||||
BOOL bResult = CFormView::Create( lpszClassName, lpszWindowName, dwRequestedStyle, rect, pParentWnd, nID, pContext );
|
||||
// register controls
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vRegisterControlID( IDC_BT_SELECTALL, "TAC_ZAM_ACTIONSLIST_BTALL", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_LIST_ACTION, "TAC_ZAM_ACTIONSLIST_LIST", TUT_e_ListBox );
|
||||
//
|
||||
return bResult;
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgAction, CFormView)
|
||||
//{{AFX_MSG_MAP(CDlgAction)
|
||||
ON_WM_DESTROY()
|
||||
ON_BN_CLICKED(IDC_BT_SELECTALL, OnBtSelectall)
|
||||
ON_LBN_SELCHANGE(IDC_LIST_ACTION, OnSelchangeListAction)
|
||||
ON_WM_SIZE()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgAction diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CDlgAction::AssertValid() const
|
||||
{
|
||||
CFormView::AssertValid();
|
||||
}
|
||||
|
||||
void CDlgAction::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CFormView::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgAction message handlers
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAction::OnDestroy()
|
||||
{
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vUnregisterControlID( IDC_BT_SELECTALL );
|
||||
TUT_M_vUnregisterControlID( IDC_LIST_ACTION );
|
||||
//
|
||||
CFormView::OnDestroy();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAction::OnBtSelectall()
|
||||
{
|
||||
CListBox *pLB = M_LBActions();
|
||||
int iNbString = pLB -> GetCount();
|
||||
|
||||
if( iNbString <= 1 )
|
||||
pLB -> SetSel( 0, TRUE );
|
||||
else
|
||||
pLB -> SelItemRange( TRUE, 0, iNbString-1 );
|
||||
|
||||
OnSelchangeListAction();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAction::OnSelchangeListAction()
|
||||
{
|
||||
CListBox *pLB = M_LBActions();
|
||||
int iNbSelected = pLB -> GetSelCount();
|
||||
|
||||
if( iNbSelected != LB_ERR )
|
||||
{
|
||||
int *a_iNewSelection = (int*) malloc( iNbSelected * sizeof( int ) );
|
||||
|
||||
pLB -> GetSelItems( iNbSelected, a_iNewSelection );
|
||||
|
||||
Family_StateChange *p_oActionList = new Family_StateChange(m_p_oDLL, C_eActionList,
|
||||
a_iNewSelection, m_a_iLastSelection,
|
||||
iNbSelected, m_lLastNbSelected);
|
||||
M_MakeDo( p_oActionList );
|
||||
free( a_iNewSelection );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAction::mfn_vSetCurrentFamily(CPA_Family * _p_oFamily)
|
||||
{
|
||||
// fill LB Actions
|
||||
mfn_vFillLBActions( _p_oFamily );
|
||||
// select all actions
|
||||
// OnBtSelectall();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAction::mfn_vSetCurrentActionList( int *_a_ItemList, long _lNumberOfItems )
|
||||
{
|
||||
CListBox *pLB = M_LBActions();
|
||||
|
||||
// unselect all actions
|
||||
int iNbString = pLB -> GetCount();
|
||||
|
||||
if( iNbString <= 1 )
|
||||
pLB -> SetSel( 0, FALSE );
|
||||
else
|
||||
pLB -> SelItemRange( FALSE, 0, iNbString-1 );
|
||||
|
||||
// unselect states
|
||||
m_p_oDlgZAList -> mfn_vAddAction( NULL, TRUE );
|
||||
|
||||
if( m_a_iLastSelection )
|
||||
free( m_a_iLastSelection );
|
||||
m_a_iLastSelection = (int*) malloc( _lNumberOfItems * sizeof( int ) );
|
||||
m_lLastNbSelected = _lNumberOfItems;
|
||||
memcpy( m_a_iLastSelection, _a_ItemList, _lNumberOfItems * sizeof( int ) );
|
||||
|
||||
// select actions
|
||||
for( int i=0; i<m_lLastNbSelected ; i++ )
|
||||
{
|
||||
// select action
|
||||
pLB -> SetSel( m_a_iLastSelection[i], TRUE );
|
||||
// add states
|
||||
CPA_Action *p_oAction = (CPA_Action*) pLB -> GetItemData( m_a_iLastSelection[i] );
|
||||
m_p_oDlgZAList -> mfn_vAddAction( p_oAction, FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAction::mfn_vFillLBActions(CPA_Family * _p_oFamily)
|
||||
{
|
||||
CListBox *pLB = M_LBActions();
|
||||
|
||||
pLB -> ResetContent();
|
||||
|
||||
// fill LB
|
||||
if( _p_oFamily )
|
||||
{
|
||||
POSITION stPos = _p_oFamily -> m_oListOfActions . GetHeadPosition();
|
||||
while( stPos )
|
||||
{
|
||||
CPA_Action *p_oAction = _p_oFamily -> m_oListOfActions . GetNext( stPos );
|
||||
int iIndex = pLB -> AddString( p_oAction -> GetName() );
|
||||
if( iIndex != LB_ERR )
|
||||
pLB -> SetItemData( iIndex, (DWORD) p_oAction);
|
||||
}
|
||||
}
|
||||
// unselect all
|
||||
int iNbString = pLB -> GetCount();
|
||||
|
||||
if( iNbString <= 1 )
|
||||
pLB -> SetSel( 0, FALSE );
|
||||
else
|
||||
pLB -> SelItemRange( FALSE, 0, iNbString-1 );
|
||||
m_p_oDlgZAList -> mfn_vAddAction( NULL, TRUE );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAction::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
if( M_LBActions() )
|
||||
{
|
||||
CRect oRectDlg, oRectBT, oRectLB;
|
||||
|
||||
M_GetClientRect( this, &oRectDlg );
|
||||
M_GetClientRectId( IDC_BT_SELECTALL, &oRectBT );
|
||||
M_GetClientRectId( IDC_LIST_ACTION, &oRectLB );
|
||||
|
||||
// minimum size
|
||||
CSize oSize = oRectDlg . Size();
|
||||
|
||||
// place BT & LB
|
||||
oRectLB . right = oRectBT . right = max( oRectBT . left, oRectDlg . right - C_iBorderSize);
|
||||
oRectLB . bottom = max( oRectLB . top, oRectDlg . bottom - C_iBorderSize);
|
||||
|
||||
M_SetClientRectId( IDC_BT_SELECTALL, &oRectBT );
|
||||
M_SetClientRectId( IDC_LIST_ACTION, &oRectLB );
|
||||
}
|
||||
}
|
1169
Rayman_X/cpa/tempgrp/TAc/src/DlgActCt.cpp
Normal file
1169
Rayman_X/cpa/tempgrp/TAc/src/DlgActCt.cpp
Normal file
File diff suppressed because it is too large
Load Diff
602
Rayman_X/cpa/tempgrp/TAc/src/DlgActLs.cpp
Normal file
602
Rayman_X/cpa/tempgrp/TAc/src/DlgActLs.cpp
Normal file
@@ -0,0 +1,602 @@
|
||||
/*=============================================================================
|
||||
*
|
||||
* Filename: DlgActLs.cpp : implementation file
|
||||
* Version: 1.0
|
||||
* Date: 02/01/97
|
||||
* Author: M.T.
|
||||
*
|
||||
* Description: implementation of a FormView Dialog class for action list
|
||||
* on STATE MODE
|
||||
*===========================================================================*/
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "TFA.h"
|
||||
|
||||
#include "DlgActLs.hpp"
|
||||
#include "DlgInput.hpp"
|
||||
#include "ACModif.hpp"
|
||||
#include "ACInterf.hpp"
|
||||
#include "ACModif.hpp"
|
||||
#include "FAModif.hpp"
|
||||
|
||||
#include "..\Main\Inc\_EditID.h"
|
||||
#include "TUT.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
// Popup Menu ID
|
||||
#define C_uiPMNew 2000
|
||||
#define C_uiPMRename (C_uiPMNew + 1)
|
||||
#define C_uiPMCopy (C_uiPMNew + 2)
|
||||
#define C_uiPMDel (C_uiPMNew + 3)
|
||||
#define C_uiPMDelAll (C_uiPMNew + 4)
|
||||
#define C_uiPMInit (C_uiPMNew + 5)
|
||||
|
||||
/*=============================================================================
|
||||
MACROS
|
||||
=============================================================================*/
|
||||
#define M_GetCurrentFamily() (m_p_oParentDLL -> mfn_p_oGetCurrentFamily())
|
||||
#define M_GetCurrentAction() (m_p_oParentDLL -> mfn_p_oGetCurrentAction())
|
||||
|
||||
#define M_Enable( nID, bEnable ) GetDlgItem( nID ) -> EnableWindow( (bEnable) )
|
||||
#define M_bEnabled( nID ) GetDlgItem( nID ) -> IsWindowEnabled()
|
||||
#define M_EnableMenu( bEnable ) ( (bEnable) ? MF_ENABLED : MF_GRAYED )
|
||||
|
||||
#define M_GetClientRect( pWnd, poRect ) (pWnd) -> GetWindowRect( poRect );ScreenToClient( poRect )
|
||||
#define M_GetClientRectId( Id, poRect ) M_GetClientRect( GetDlgItem( Id ), poRect )
|
||||
#define M_SetClientRect( pWnd, poRect ) (pWnd) -> MoveWindow( poRect )
|
||||
#define M_SetClientRectId( Id, poRect ) M_SetClientRect( GetDlgItem( Id ), poRect )
|
||||
|
||||
#define M_MakeDo( p_oModif ) m_p_oParentDLL -> M_GetEditManager() -> AskFor ( p_oModif )
|
||||
|
||||
/*=============================================================================
|
||||
CONSTANTS
|
||||
=============================================================================*/
|
||||
#define C_iBorderSize 2
|
||||
|
||||
/*=============================================================================
|
||||
* CDlgActionList class
|
||||
=============================================================================*/
|
||||
IMPLEMENT_DYNCREATE(CDlgActionList, CFormView)
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : constructor
|
||||
*---------------------------------------------------------------------------*/
|
||||
CDlgActionList::CDlgActionList() : CFormView(CDlgActionList::IDD)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgActionList)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
// create bold font
|
||||
PLOGFONT plfBold = (PLOGFONT) LocalAlloc(LPTR, sizeof(LOGFONT));
|
||||
lstrcpy(plfBold->lfFaceName, "MS Sans Serif");
|
||||
plfBold->lfWeight = FW_BOLD ;
|
||||
plfBold->lfHeight = 8;
|
||||
plfBold->lfEscapement = 0;
|
||||
m_oBoldFont.CreateFontIndirect(plfBold);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : destructor
|
||||
*---------------------------------------------------------------------------*/
|
||||
CDlgActionList::~CDlgActionList()
|
||||
{
|
||||
// delete bold font
|
||||
m_oBoldFont.DeleteObject();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : data exchange
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CFormView::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgActionList)
|
||||
//DDX_Control(pDX, IDC_LIST_ACTION, m_CTRL_ListAction);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : create & register controls for TUT module
|
||||
*---------------------------------------------------------------------------*/
|
||||
BOOL CDlgActionList::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext)
|
||||
{
|
||||
BOOL bResult = CFormView::Create( lpszClassName, lpszWindowName, dwRequestedStyle, rect, pParentWnd, nID, pContext );
|
||||
// register controls
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vRegisterControlID( IDC_LIST_ACTION, "TAC_STM_ACTIONSLIST_LIST", TUT_e_ListBox );
|
||||
TUT_M_vRegisterControlID( IDC_BT_NEWACTION, "TAC_STM_ACTIONSLIST_BTNEW", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_INITACTION, "TAC_STM_ACTIONSLIST_BTDEFAULT", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_DELACTION, "TAC_STM_ACTIONSLIST_BTDELETE", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_DELALLACTION, "TAC_STM_ACTIONSLIST_BTDELALL", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_COPYACTION, "TAC_STM_ACTIONSLIST_BTCOPY", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_RENAMEACTION, "TAC_STM_ACTIONSLIST_BTRENAME", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_EDITZA, "TAC_STM_ACTIONSLIST_BTSWAPMODE", TUT_e_Button );
|
||||
//
|
||||
return bResult;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : message map
|
||||
*---------------------------------------------------------------------------*/
|
||||
BEGIN_MESSAGE_MAP(CDlgActionList, CFormView)
|
||||
//{{AFX_MSG_MAP(CDlgActionList)
|
||||
ON_WM_DESTROY()
|
||||
ON_LBN_SELCHANGE(IDC_LIST_ACTION, OnSelchangeListAction)
|
||||
ON_BN_CLICKED(IDC_BT_COPYACTION, OnBtCopyaction)
|
||||
ON_BN_CLICKED(IDC_BT_DELACTION, OnBtDelaction)
|
||||
ON_BN_CLICKED(IDC_BT_DELALLACTION, OnBtDelallaction)
|
||||
ON_BN_CLICKED(IDC_BT_NEWACTION, OnBtNewaction)
|
||||
ON_BN_CLICKED(IDC_BT_RENAMEACTION, OnBtRenameaction)
|
||||
ON_WM_SIZE()
|
||||
ON_BN_CLICKED(IDC_BT_EDITZA, OnBtEditza)
|
||||
ON_BN_CLICKED(IDC_BT_INITACTION, OnBtInitaction)
|
||||
ON_WM_DRAWITEM()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* CDlgActionList diagnostics
|
||||
******************************************************************************/
|
||||
#ifdef _DEBUG
|
||||
void CDlgActionList::AssertValid() const
|
||||
{
|
||||
CFormView::AssertValid();
|
||||
}
|
||||
|
||||
void CDlgActionList::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CFormView::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
/******************************************************************************
|
||||
* CDlgActionList message handlers
|
||||
******************************************************************************/
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : unregister control from TUT
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::OnDestroy()
|
||||
{
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vUnregisterControlID( IDC_LIST_ACTION );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_COPYACTION );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_DELACTION );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_DELALLACTION );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_NEWACTION );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_RENAMEACTION );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_INITACTION );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_EDITZA );
|
||||
|
||||
CFormView::OnDestroy();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : intercept the Rbutton Click on listbox
|
||||
*---------------------------------------------------------------------------*/
|
||||
BOOL CDlgActionList::PreTranslateMessage(MSG* pMsg)
|
||||
{
|
||||
if( pMsg->hwnd == GetDlgItem(IDC_LIST_ACTION)->m_hWnd )
|
||||
{
|
||||
if( pMsg->message == WM_RBUTTONDOWN )
|
||||
{
|
||||
OnRButtonDownActionList( pMsg );
|
||||
}
|
||||
else if ( pMsg->message == WM_KEYDOWN )
|
||||
{
|
||||
OnKeyDownActionList( pMsg );
|
||||
}
|
||||
}
|
||||
return CFormView::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : intercept the popup menu entry
|
||||
*---------------------------------------------------------------------------*/
|
||||
BOOL CDlgActionList::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case C_uiPMNew: OnBtNewaction(); break;
|
||||
case C_uiPMRename: OnBtRenameaction(); break;
|
||||
case C_uiPMCopy: OnBtCopyaction(); break;
|
||||
case C_uiPMDel: OnBtDelaction(); break;
|
||||
case C_uiPMDelAll: OnBtDelallaction(); break;
|
||||
case C_uiPMInit: OnBtInitaction(); break;
|
||||
default :
|
||||
return CFormView::OnCommand(wParam, lParam);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : handle function for msg WM_DRAWITEM
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS)
|
||||
{
|
||||
if ( (lpDIS->itemID != LB_ERR) &&
|
||||
(nIDCtl == IDC_LIST_ACTION) &&
|
||||
(GetDlgItem(IDC_LIST_ACTION)->IsWindowEnabled() ) )
|
||||
{
|
||||
char szText[100];
|
||||
CListBox *pLB = (CListBox *) GetDlgItem(IDC_LIST_ACTION);;
|
||||
CBrush oBrush;
|
||||
COLORREF xTextColor;
|
||||
BOOL bSelected = (lpDIS->itemState & ODS_SELECTED );
|
||||
CFont *xFntPrev;
|
||||
CDC *pDC = CDC::FromHandle(lpDIS->hDC);
|
||||
CString oCst;
|
||||
BOOL bFontChanged = FALSE;
|
||||
CPA_Action *m_p_oAction = (CPA_Action*) pLB -> GetItemData( lpDIS->itemID );
|
||||
|
||||
oBrush.CreateSolidBrush( GetSysColor( bSelected ? COLOR_HIGHLIGHT : COLOR_WINDOW) );
|
||||
xTextColor = GetSysColor( bSelected ? COLOR_HIGHLIGHTTEXT : COLOR_WINDOWTEXT);
|
||||
// Shaitan => state list in the level
|
||||
CPA_Family * pFamily = (CPA_Family *) m_p_oAction->GetOwner();
|
||||
if (!pFamily->m_oListOfUsedActions.IsEmpty() && !pFamily->m_oListOfUsedActions.Find(m_p_oAction))
|
||||
xTextColor = RGB(255,0,0);
|
||||
// End Shaitan => state list in the level
|
||||
|
||||
pDC->FillRect( &lpDIS->rcItem, &oBrush );
|
||||
|
||||
pLB->GetText( lpDIS->itemID, szText );
|
||||
|
||||
// change font
|
||||
if ( M_GetCurrentFamily() && (m_p_oAction == M_GetCurrentFamily() -> mfn_p_oGetInitialAction()) )
|
||||
{
|
||||
xFntPrev = pDC->SelectObject( &m_oBoldFont );
|
||||
bFontChanged = TRUE;
|
||||
oCst . Format ( "%s" , szText );
|
||||
}
|
||||
else
|
||||
oCst . Format ( "%s" , szText );
|
||||
|
||||
pDC->SetBkMode( TRANSPARENT);
|
||||
pDC->SetTextColor( xTextColor );
|
||||
lpDIS->rcItem.left += 2;
|
||||
pDC->DrawText( oCst, &lpDIS->rcItem, DT_SINGLELINE | DT_LEFT | DT_VCENTER );
|
||||
// restore font
|
||||
if ( bFontChanged )
|
||||
pDC->SelectObject( xFntPrev );
|
||||
|
||||
oBrush.DeleteObject();
|
||||
}
|
||||
else
|
||||
CFormView::OnDrawItem(nIDCtl, lpDIS);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : handle function for msg WM_SIZE
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
if(GetDlgItem(IDC_LIST_ACTION))
|
||||
{
|
||||
CRect oRectDlg, oRectList, oRectBTSwap, oRectBTNew, oRectBTCopy, oRectBTDel, oRectBTRen, oRectBTDelAll, oRectBTInit ;
|
||||
int iSize;
|
||||
|
||||
// get pos
|
||||
M_GetClientRect( this, &oRectDlg );
|
||||
M_GetClientRectId( IDC_BT_EDITZA, &oRectBTSwap );
|
||||
M_GetClientRectId( IDC_BT_NEWACTION, &oRectBTNew );
|
||||
M_GetClientRectId( IDC_BT_COPYACTION, &oRectBTCopy );
|
||||
M_GetClientRectId( IDC_BT_DELACTION, &oRectBTDel );
|
||||
M_GetClientRectId( IDC_BT_INITACTION, &oRectBTInit );
|
||||
M_GetClientRectId( IDC_BT_RENAMEACTION, &oRectBTRen );
|
||||
M_GetClientRectId( IDC_BT_DELALLACTION, &oRectBTDelAll );
|
||||
M_GetClientRectId( IDC_LIST_ACTION, &oRectList );
|
||||
|
||||
// Left Align
|
||||
oRectBTSwap . left = oRectBTNew . left = oRectBTInit . left = oRectList . left = oRectDlg . left + C_iBorderSize;
|
||||
// Right Align
|
||||
oRectBTSwap . right = oRectBTDel . right = oRectBTDelAll . right = oRectList . right = oRectDlg . right - C_iBorderSize;
|
||||
// Bottom Align
|
||||
oRectList . bottom = max ( oRectList . top, oRectDlg . bottom - C_iBorderSize);
|
||||
|
||||
// BTs
|
||||
iSize = (oRectDlg . Width() - (C_iBorderSize<<2)) / 3;
|
||||
|
||||
oRectBTInit . right = oRectBTNew . right = oRectBTNew . left + iSize;
|
||||
oRectBTDelAll . left = oRectBTDel . left = oRectBTDel . right - iSize ;
|
||||
oRectBTRen . left = oRectBTCopy . left = oRectBTNew . right + C_iBorderSize;
|
||||
oRectBTRen . right = oRectBTCopy . right = oRectBTDel . left - C_iBorderSize;
|
||||
|
||||
// set pos
|
||||
M_SetClientRectId( IDC_BT_EDITZA, &oRectBTSwap );
|
||||
M_SetClientRectId( IDC_BT_NEWACTION, &oRectBTNew );
|
||||
M_SetClientRectId( IDC_BT_COPYACTION, &oRectBTCopy );
|
||||
M_SetClientRectId( IDC_BT_DELACTION, &oRectBTDel );
|
||||
M_SetClientRectId( IDC_BT_INITACTION, &oRectBTInit );
|
||||
M_SetClientRectId( IDC_BT_RENAMEACTION, &oRectBTRen );
|
||||
M_SetClientRectId( IDC_BT_DELALLACTION, &oRectBTDelAll );
|
||||
M_SetClientRectId( IDC_LIST_ACTION, &oRectList );
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : selected action change in action list
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::OnSelchangeListAction()
|
||||
{
|
||||
CListBox *pLB = (CListBox *) GetDlgItem(IDC_LIST_ACTION);
|
||||
CPA_Action *p_oAction;
|
||||
int iIndex;
|
||||
|
||||
if ((iIndex = pLB->GetCurSel()) == LB_ERR)
|
||||
{
|
||||
fn_vUpdateButtons( FALSE ) ;
|
||||
p_oAction = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
fn_vUpdateButtons( TRUE ) ;
|
||||
p_oAction = (CPA_Action*) pLB->GetItemData(iIndex);
|
||||
}
|
||||
|
||||
m_p_oParentDLL->mfn_vChangeAction( p_oAction );
|
||||
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : handle function for message BN_CLICKED on Edit ZA button
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::OnBtEditza()
|
||||
{
|
||||
Family_StateChange *p_oChangeMode = new Family_StateChange( m_p_oParentDLL, C_eMode, (void*)FALSE, (void*)TRUE );
|
||||
M_MakeDo( p_oChangeMode );
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : handle function for message BN_CLICKED on CopyAction button
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::OnBtCopyaction()
|
||||
{
|
||||
Action_Copy *p_oActionCopy = new Action_Copy ( m_p_oParentDLL, M_GetCurrentFamily(), M_GetCurrentAction() ) ;
|
||||
M_MakeDo ( p_oActionCopy ) ;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : handle function for message BN_CLICKED on DelAction button
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::OnBtDelaction()
|
||||
{
|
||||
CPA_Action * p_oAction = M_GetCurrentAction();
|
||||
|
||||
if(p_oAction)
|
||||
{
|
||||
char szText[100];
|
||||
|
||||
sprintf(szText,"Do you really want to delete action \"%s\" ?",p_oAction -> GetName() );
|
||||
if( MessageBox(szText,"WARNING", MB_ICONQUESTION+MB_YESNO) == IDYES )
|
||||
{
|
||||
Action_Delete *p_oActionDelete = new Action_Delete( m_p_oParentDLL, M_GetCurrentFamily(), p_oAction ) ;
|
||||
M_MakeDo ( p_oActionDelete ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : handle function for message BN_CLICKED on DelAllActions button
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::OnBtDelallaction()
|
||||
{
|
||||
if( (M_GetCurrentFamily()) &&
|
||||
(MessageBox("Do you really want to delete all actions ?", "WARNING", MB_ICONQUESTION+MB_YESNO) == IDYES ) )
|
||||
{
|
||||
Family_DelAllActions *p_oDelAllActions = new Family_DelAllActions ( m_p_oParentDLL, M_GetCurrentFamily() ) ;
|
||||
M_MakeDo( p_oDelAllActions ) ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : handle function for message BN_CLICKED on "New" button
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::OnBtNewaction()
|
||||
{
|
||||
// get new action name
|
||||
HINSTANCE hOldInst = AfxGetResourceHandle();
|
||||
AfxSetResourceHandle( m_p_oParentDLL -> GetDLLIdentity() -> hModule );
|
||||
|
||||
CDlgInputText *p_oDlgInput = new CDlgInputText();
|
||||
CRect oRect;
|
||||
GetDlgItem(IDC_LIST_ACTION)->GetWindowRect(&oRect);
|
||||
CPoint oPoint( oRect.left, oRect.top);
|
||||
|
||||
p_oDlgInput->SetPos( &oPoint );
|
||||
p_oDlgInput->SetTitle( "Create a new action" );
|
||||
p_oDlgInput->SetMessage( "New Action Name :" );
|
||||
p_oDlgInput->SetDefaultValue( C_szActionTypeName );
|
||||
p_oDlgInput->SetSelect( TRUE );
|
||||
if(p_oDlgInput->DoModal() == IDOK)
|
||||
{
|
||||
//
|
||||
Action_New *p_oActionNew = new Action_New ( m_p_oParentDLL, M_GetCurrentFamily() , p_oDlgInput -> GetInputText() ) ;
|
||||
M_MakeDo( p_oActionNew ) ;
|
||||
}
|
||||
delete p_oDlgInput;
|
||||
AfxSetResourceHandle( hOldInst );
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : handle function for message BN_CLICKED on "Rename" button
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::OnBtRenameaction()
|
||||
{
|
||||
if(M_GetCurrentAction())
|
||||
{
|
||||
HINSTANCE hOldInst = AfxGetResourceHandle();
|
||||
AfxSetResourceHandle( m_p_oParentDLL -> GetDLLIdentity() -> hModule );
|
||||
|
||||
CDlgInputText *p_oDlgInput = new CDlgInputText();
|
||||
char szTitle[200];
|
||||
CRect oRect;
|
||||
GetDlgItem(IDC_LIST_ACTION)->GetWindowRect(&oRect);
|
||||
CPoint oPoint( oRect.left, oRect.top);
|
||||
|
||||
p_oDlgInput->SetPos(&oPoint);
|
||||
sprintf(szTitle,"Rename action \"%s\"", M_GetCurrentAction()->fn_p_szGetName() );
|
||||
p_oDlgInput->SetTitle(szTitle);
|
||||
p_oDlgInput->SetMessage("New Name :");
|
||||
p_oDlgInput->SetDefaultValue( M_GetCurrentAction()->fn_p_szGetName() );
|
||||
p_oDlgInput->SetSelect( TRUE );
|
||||
if(p_oDlgInput->DoModal() == IDOK)
|
||||
{
|
||||
Action_Rename *p_oActionRename = new Action_Rename ( m_p_oParentDLL, M_GetCurrentAction() , p_oDlgInput->GetInputText() ) ;
|
||||
M_MakeDo ( p_oActionRename ) ;
|
||||
}
|
||||
delete p_oDlgInput;
|
||||
AfxSetResourceHandle( hOldInst );
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : handle function for message BN_CLICKED on "Set as Initial" button
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::OnBtInitaction()
|
||||
{
|
||||
Family_ModifInitialAction *p_oActionInit = new Family_ModifInitialAction ( m_p_oParentDLL, M_GetCurrentFamily(), M_GetCurrentAction() ) ;
|
||||
M_MakeDo ( p_oActionInit ) ;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CDlgActionList specific functions
|
||||
******************************************************************************/
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : change action list with the given one
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::fn_vSetActionList( CPA_List<CPA_Action> *_p_oListOfActions )
|
||||
{
|
||||
CListBox *pLB = (CListBox *) GetDlgItem(IDC_LIST_ACTION);
|
||||
|
||||
// emptied list box
|
||||
pLB->ResetContent();
|
||||
|
||||
if(_p_oListOfActions)
|
||||
{
|
||||
// for each action in list add it in list box
|
||||
POSITION stPos = _p_oListOfActions->GetHeadPosition ( ) ;
|
||||
while ( stPos )
|
||||
{
|
||||
CPA_Action *p_oAction = (CPA_Action *) _p_oListOfActions->GetNext ( stPos ) ;
|
||||
int iIndex = pLB->AddString ( p_oAction->GetName () ) ;
|
||||
if( iIndex != LB_ERR )
|
||||
pLB->SetItemData( iIndex, (DWORD) p_oAction ) ;
|
||||
}
|
||||
}
|
||||
// select first item
|
||||
CPA_Action *p_oAction = NULL;
|
||||
int iIndex = -1;
|
||||
if( pLB -> GetCount() > 0 )
|
||||
{
|
||||
iIndex = 0;
|
||||
p_oAction = (CPA_Action*) pLB -> GetItemData( iIndex );
|
||||
}
|
||||
// update selection
|
||||
/*
|
||||
pLB->SetCurSel( iIndex );
|
||||
fn_vUpdateButtons( p_oAction != NULL );
|
||||
*/
|
||||
m_p_oParentDLL -> mfn_vSetCurrentAction( p_oAction );
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : select given action
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::fn_vSetAction(CPA_Action *_p_oAction)
|
||||
{
|
||||
CListBox *pLB = (CListBox *) GetDlgItem(IDC_LIST_ACTION);
|
||||
|
||||
if(_p_oAction)
|
||||
{
|
||||
int iIndex = pLB -> FindStringExact( -1 , _p_oAction -> GetName() ) ;
|
||||
|
||||
if( iIndex != LB_ERR )
|
||||
{
|
||||
pLB -> SetCurSel( iIndex );
|
||||
fn_vUpdateButtons( TRUE ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
pLB -> SetCurSel( -1 );
|
||||
fn_vUpdateButtons( FALSE ) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pLB -> SetCurSel( -1 );
|
||||
fn_vUpdateButtons( FALSE ) ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : enable or disable buttons
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CDlgActionList::fn_vUpdateButtons(BOOL _bEnabled)
|
||||
{
|
||||
CListBox *pLB = (CListBox *) GetDlgItem(IDC_LIST_ACTION);
|
||||
|
||||
M_Enable( IDC_BT_NEWACTION, M_GetCurrentFamily() != NULL );
|
||||
M_Enable( IDC_BT_DELALLACTION, pLB && pLB->GetCount() );
|
||||
M_Enable( IDC_BT_COPYACTION, _bEnabled );
|
||||
M_Enable( IDC_BT_RENAMEACTION, _bEnabled );
|
||||
M_Enable( IDC_BT_DELACTION, _bEnabled );
|
||||
M_Enable( IDC_BT_INITACTION, _bEnabled && (M_GetCurrentAction() != M_GetCurrentFamily() -> mfn_p_oGetInitialAction() ) );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : create and display the context popmenu
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgActionList::OnRButtonDownActionList(MSG *pMsg)
|
||||
{
|
||||
CMenu oPopMenu;
|
||||
POINT xPos;
|
||||
|
||||
oPopMenu . CreatePopupMenu () ;
|
||||
// fill
|
||||
oPopMenu . AppendMenu ( MF_STRING + M_EnableMenu( M_bEnabled( IDC_BT_NEWACTION ) ), C_uiPMNew , "New Action" ) ;
|
||||
oPopMenu . AppendMenu ( MF_STRING + M_EnableMenu( M_bEnabled( IDC_BT_RENAMEACTION ) ), C_uiPMRename , "Rename Action" ) ;
|
||||
oPopMenu . AppendMenu ( MF_STRING + M_EnableMenu( M_bEnabled( IDC_BT_COPYACTION ) ) , C_uiPMCopy , "Copy Action" ) ;
|
||||
oPopMenu . AppendMenu ( MF_STRING + M_EnableMenu( M_bEnabled( IDC_BT_DELACTION ) ) , C_uiPMDel , "Delete Action" ) ;
|
||||
oPopMenu . AppendMenu ( MF_STRING + M_EnableMenu( M_bEnabled( IDC_BT_DELALLACTION ) ) , C_uiPMDelAll , "Delete all Actions" ) ;
|
||||
oPopMenu . AppendMenu ( MF_SEPARATOR );
|
||||
oPopMenu . AppendMenu ( MF_STRING + M_EnableMenu( M_bEnabled( IDC_BT_INITACTION ) ) , C_uiPMInit , "Set as Initial Action of Family" ) ;
|
||||
// display
|
||||
xPos.x = LOWORD(pMsg->lParam);
|
||||
xPos.y = HIWORD(pMsg->lParam);
|
||||
GetDlgItem(IDC_LIST_ACTION)->ClientToScreen(&xPos);
|
||||
// register for TUT module
|
||||
TUT_M_vGetTutDll ();
|
||||
TUT_M_vRegisterMenu (this -> m_hWnd , oPopMenu . m_hMenu , xPos.x, xPos.y);
|
||||
oPopMenu . TrackPopupMenu ( TPM_LEFTALIGN|TPM_RIGHTBUTTON, xPos.x, xPos.y, this);
|
||||
oPopMenu . DestroyMenu ();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : test keyboard
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgActionList::OnKeyDownActionList(MSG *pMsg)
|
||||
{
|
||||
int nVirtKey = (int)pMsg->wParam;
|
||||
|
||||
if( ( nVirtKey == VK_DELETE ) && M_GetCurrentAction() )
|
||||
OnBtDelaction();
|
||||
else if( nVirtKey == VK_INSERT )
|
||||
OnBtNewaction();
|
||||
}
|
208
Rayman_X/cpa/tempgrp/TAc/src/DlgActTr.cpp
Normal file
208
Rayman_X/cpa/tempgrp/TAc/src/DlgActTr.cpp
Normal file
@@ -0,0 +1,208 @@
|
||||
// DlgActTr.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DlgActTr.hpp"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/*=============================================================================
|
||||
MACROS
|
||||
=============================================================================*/
|
||||
#define M_BT( nID ) ( (CButton*) GetDlgItem( nID ) )
|
||||
#define M_Tree() ( (CTreeCtrl*) GetDlgItem( IDC_TREE_ACT ) )
|
||||
|
||||
|
||||
#define M_GetCurrentFamily() (m_p_oParentDLL -> mfn_p_oGetCurrentFamily())
|
||||
#define M_GetCurrentAction() (m_p_oParentDLL -> mfn_p_oGetCurrentAction())
|
||||
|
||||
#define M_GetClientRect( pWnd, poRect ) (pWnd) -> GetWindowRect( poRect );ScreenToClient( poRect )
|
||||
#define M_GetClientRectId( Id, poRect ) M_GetClientRect( GetDlgItem( Id ), poRect )
|
||||
#define M_SetClientRect( pWnd, poRect ) (pWnd) -> MoveWindow( poRect )
|
||||
#define M_SetClientRectId( Id, poRect ) M_SetClientRect( GetDlgItem( Id ), poRect )
|
||||
|
||||
#define M_MakeDo( p_oModif ) m_p_oParentDLL -> M_GetEditManager() -> AskFor ( p_oModif )
|
||||
|
||||
/*=============================================================================
|
||||
CONSTANTS
|
||||
=============================================================================*/
|
||||
#define C_iBorderSize 2
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgActionTree
|
||||
|
||||
IMPLEMENT_DYNCREATE(CDlgActionTree, CFormView)
|
||||
|
||||
CDlgActionTree::CDlgActionTree()
|
||||
: CFormView(CDlgActionTree::IDD)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgActionTree)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
//
|
||||
m_oBmpDefaultAction . LoadBitmap();
|
||||
m_oBmpAction . LoadBitmap();
|
||||
m_oBmpDefaultState . LoadBitmap();
|
||||
m_oBmpState . LoadBitmap();
|
||||
//
|
||||
m_stImageList.Create(16, 16, FALSE, 0, 4);
|
||||
m_stImageList.Add(&m_oBmpDefaultAction,(CBitmap*)NULL);
|
||||
m_stImageList.Add(&m_oBmpAction,(CBitmap*)NULL);
|
||||
m_stImageList.Add(&m_oBmpDefaultState,(CBitmap*)NULL);
|
||||
m_stImageList.Add(&m_oBmpState,(CBitmap*)NULL);
|
||||
}
|
||||
|
||||
CDlgActionTree::~CDlgActionTree()
|
||||
{
|
||||
m_oBmpDefaultAction . DeleteObject();
|
||||
m_oBmpAction . DeleteObject();
|
||||
m_oBmpDefaultState . DeleteObject();
|
||||
m_oBmpState . DeleteObject();
|
||||
}
|
||||
|
||||
void CDlgActionTree::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CFormView::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgActionTree)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgActionTree, CFormView)
|
||||
//{{AFX_MSG_MAP(CDlgActionTree)
|
||||
ON_BN_CLICKED(IDC_BT_COPYACTION, OnBtCopyaction)
|
||||
ON_BN_CLICKED(IDC_BT_DELACTION, OnBtDelaction)
|
||||
ON_BN_CLICKED(IDC_BT_EDITZA, OnBtEditza)
|
||||
ON_BN_CLICKED(IDC_BT_NEWACTION, OnBtNewaction)
|
||||
ON_BN_CLICKED(IDC_BT_RENAMEACTION, OnBtRenameaction)
|
||||
ON_NOTIFY(NM_RCLICK, IDC_TREE_ACT, OnRclickTreeAct)
|
||||
ON_NOTIFY(TVN_SELCHANGED, IDC_TREE_ACT, OnSelchangedTreeAct)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgActionTree diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CDlgActionTree::AssertValid() const
|
||||
{
|
||||
CFormView::AssertValid();
|
||||
}
|
||||
|
||||
void CDlgActionTree::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CFormView::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgActionTree message handlers
|
||||
|
||||
void CDlgActionTree::OnBtCopyaction()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
|
||||
}
|
||||
|
||||
void CDlgActionTree::OnBtDelaction()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
|
||||
}
|
||||
|
||||
void CDlgActionTree::OnBtEditza()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
|
||||
}
|
||||
|
||||
void CDlgActionTree::OnBtNewaction()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
|
||||
}
|
||||
|
||||
void CDlgActionTree::OnBtRenameaction()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
|
||||
}
|
||||
|
||||
void CDlgActionTree::OnRclickTreeAct(NMHDR* pNMHDR, LRESULT* pResult)
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
|
||||
*pResult = 0;
|
||||
}
|
||||
|
||||
void CDlgActionTree::OnSelchangedTreeAct(NMHDR* pNMHDR, LRESULT* pResult)
|
||||
{
|
||||
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
|
||||
// TODO: Add your control notification handler code here
|
||||
|
||||
*pResult = 0;
|
||||
}
|
||||
|
||||
void CDlgActionTree::mfn_vSetCurrentFamily(CPA_Family * _p_oFamily)
|
||||
{
|
||||
mfn_vFillTree( _p_oFamily );
|
||||
mfn_vSetCurrentAction( NULL );
|
||||
}
|
||||
|
||||
void CDlgActionTree::mfn_vSetCurrentAction(CPA_Action * _p_oAction)
|
||||
{
|
||||
CTreeCtrl* pTree = M_Tree();
|
||||
|
||||
if( _p_oAction )
|
||||
{
|
||||
}
|
||||
mfn_vSetCurrentState( NULL );
|
||||
}
|
||||
|
||||
void CDlgActionTree::mfn_vSetCurrentState(CPA_State * _p_oState)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CDlgActionTree::mfn_vFillTree(CPA_Family * _p_oFamily)
|
||||
{
|
||||
CTreeCtrl* pTree = M_Tree();
|
||||
|
||||
pTree -> DeleteAllItems();
|
||||
|
||||
if( _p_oFamily )
|
||||
{
|
||||
CPA_Action *p_oDefaultAction = _p_oFamily -> mfn_p_oGetDefaultAction();
|
||||
|
||||
POSITION xPos = _p_oFamily -> m_oListOfActions . GetHeadPosition();
|
||||
while( xPos )
|
||||
{
|
||||
CPA_Action *p_oAction = _p_oFamily -> m_oListOfActions . GetNext( xPos );
|
||||
// add action
|
||||
HTREEITEM hTIAction = pTree -> InsertItem( p_oAction -> GetName(),
|
||||
( p_oDefaultAction == p_oAction ? 0 : 1 ),
|
||||
( p_oDefaultAction == p_oAction ? 0 : 1 ),
|
||||
TVI_ROOT, TVI_LAST );
|
||||
if( hTIAction )
|
||||
pTree -> SetItemData( hTIAction, (DWORD)(CPA_ReachableObject*) p_oAction );
|
||||
CPA_State *p_oDefaulState = p_oAction -> mfn_p_oGetDefaultState();
|
||||
POSITION xPosSt = p_oAction -> m_oListOfStates . GetHeadPosition();
|
||||
while( xPosSt )
|
||||
{
|
||||
CPA_State *p_oState = p_oAction -> m_oListOfStates . GetNext( xPosSt );
|
||||
// add state
|
||||
HTREEITEM hTIState = pTree -> InsertItem( p_oState -> GetName(),
|
||||
( p_oDefaultState == p_oState ? 2 : 3 ),
|
||||
( p_oDefaultState == p_oState ? 2 : 3 ),
|
||||
hTIAction, TVI_LAST );
|
||||
if( hTIState )
|
||||
pTree -> SetItemData( hTIState, (DWORD)(CPA_ReachableObject*)p_oState );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
841
Rayman_X/cpa/tempgrp/TAc/src/DlgAnim.cpp
Normal file
841
Rayman_X/cpa/tempgrp/TAc/src/DlgAnim.cpp
Normal file
@@ -0,0 +1,841 @@
|
||||
// DlgAnim.cpp : implementation file
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// INCLUDES
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//#undef _DEBUG
|
||||
#include "stdafx.h"
|
||||
//#define _DEBUG
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "TFa.h"
|
||||
#include "OAc.h"
|
||||
|
||||
#include "ACInterf.hpp"
|
||||
#include "DlgAnim.hpp"
|
||||
#include "STModif.hpp"
|
||||
|
||||
#include "..\Main\Inc\_EditID.h"
|
||||
#include "TUT.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ???
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// MACROS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define M_LBAnim() ( (CListBox*) GetDlgItem( IDC_LB_ANIM ) )
|
||||
#define M_BTCreate() ( (CButton*) GetDlgItem( IDC_BT_CREATESTATES ) )
|
||||
#define M_BTMore() ( (CButton*) GetDlgItem( IDC_BT_MORE) )
|
||||
#define M_CBFamily() ( (CComboBox*) GetDlgItem( IDC_COMBO_FAMILY) )
|
||||
|
||||
#define M_GetCurrentFamily() ( m_p_oParentDLL ? m_p_oParentDLL -> mfn_p_oGetCurrentFamily() : NULL )
|
||||
#define M_GetCurrentAction() ( m_p_oParentDLL ? m_p_oParentDLL -> mfn_p_oGetCurrentAction() : NULL )
|
||||
#define M_GetCurrentState() ( m_p_oParentDLL ? m_p_oParentDLL -> mfn_p_oGetCurrentState() : NULL )
|
||||
|
||||
#define M_GetClientRect( pWnd, poRect ) (pWnd) -> GetWindowRect( poRect );ScreenToClient( poRect )
|
||||
#define M_GetClientRectId( Id, poRect ) M_GetClientRect( GetDlgItem( Id ), poRect )
|
||||
#define M_SetClientRect( pWnd, poRect ) (pWnd) -> MoveWindow( poRect )
|
||||
#define M_SetClientRectId( Id, poRect ) M_SetClientRect( GetDlgItem( Id ), poRect )
|
||||
#define M_ShowControl( Id ) GetDlgItem( Id ) -> EnableWindow( TRUE ); GetDlgItem( Id ) -> ShowWindow( SW_SHOW );
|
||||
#define M_HideControl( Id ) GetDlgItem( Id ) -> EnableWindow( FALSE ); GetDlgItem( Id ) -> ShowWindow( SW_HIDE );
|
||||
#define M_MakeDo( p_oModif ) m_p_oParentDLL -> M_GetEditManager() -> AskFor ( p_oModif )
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// CONSTANTS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define C_iBorderSize 2
|
||||
#define C_uiPMDefault 2000
|
||||
#define C_uiPMCreateNormal (C_uiPMDefault + 1)
|
||||
#define C_uiPMCreateTransitional (C_uiPMDefault + 2)
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
#define C_uiPMCreateNormalMove (C_uiPMDefault + 3)
|
||||
#define C_uiPMCreateTransitionalMove (C_uiPMDefault + 4)
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgAnimList
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
IMPLEMENT_DYNCREATE(CDlgAnimList, CFormView)
|
||||
|
||||
CDlgAnimList::CDlgAnimList()
|
||||
: CFormView(CDlgAnimList::IDD)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgAnimList)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
m_bAllFamilies = FALSE;
|
||||
}
|
||||
|
||||
CDlgAnimList::~CDlgAnimList()
|
||||
{
|
||||
}
|
||||
|
||||
void CDlgAnimList::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CFormView::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgAnimList)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : create & register controls for TUT module
|
||||
*---------------------------------------------------------------------------*/
|
||||
BOOL CDlgAnimList::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext)
|
||||
{
|
||||
BOOL bResult = CFormView::Create( lpszClassName, lpszWindowName, dwRequestedStyle, rect, pParentWnd, nID, pContext );
|
||||
// register controls
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vRegisterControlID( IDC_LB_ANIM, "TAC_STM_ANIMSLIST_LIST", TUT_e_ListBox );
|
||||
TUT_M_vRegisterControlID( IDC_BT_CREATESTATES, "TAC_STM_ANIMSLIST_BTCREATE", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_COMBO_FAMILY, "TAC_STM_ANIMSLIST_CBFAMILY", TUT_e_ComboBox );
|
||||
TUT_M_vRegisterControlID( IDC_BT_MORE, "TAC_STM_ANIMSLIST_BTMORE", TUT_e_Button );
|
||||
//
|
||||
return bResult;
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgAnimList, CFormView)
|
||||
//{{AFX_MSG_MAP(CDlgAnimList)
|
||||
ON_WM_DESTROY()
|
||||
ON_WM_SIZE()
|
||||
ON_BN_CLICKED(IDC_BT_CREATESTATES, OnBtCreatestates)
|
||||
ON_LBN_SELCHANGE(IDC_LB_ANIM, OnSelchangeLbAnim)
|
||||
ON_BN_CLICKED(IDC_BT_MORE, OnBtMore)
|
||||
ON_CBN_SELCHANGE(IDC_COMBO_FAMILY, OnSelchangeComboFamily)
|
||||
ON_WM_DRAWITEM()
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
ON_WM_MOUSEMOVE()
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgAnimList diagnostics
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CDlgAnimList::AssertValid() const
|
||||
{
|
||||
CFormView::AssertValid();
|
||||
}
|
||||
|
||||
void CDlgAnimList::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CFormView::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgAnimList message handlers
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg WM_DESTROY : unregister controls for TUT
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::OnDestroy()
|
||||
{
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vUnregisterControlID( IDC_LB_ANIM );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_CREATESTATES );
|
||||
TUT_M_vUnregisterControlID( IDC_COMBO_FAMILY );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_MORE );
|
||||
|
||||
CFormView::OnDestroy();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg WM_SIZE
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
if(GetDlgItem(IDC_LB_ANIM))
|
||||
{
|
||||
CRect oRectDlg, oRectList, oRectBTCreate, oRectBTMore, oRectST, oRectCB;
|
||||
int iSize;
|
||||
|
||||
// get pos
|
||||
M_GetClientRect( this, &oRectDlg );
|
||||
M_GetClientRectId( IDC_BT_CREATESTATES, &oRectBTCreate );
|
||||
M_GetClientRectId( IDC_ST_ANIM, &oRectST );
|
||||
M_GetClientRectId( IDC_LB_ANIM, &oRectList );
|
||||
M_GetClientRectId( IDC_COMBO_FAMILY, &oRectCB );
|
||||
M_GetClientRectId( IDC_BT_MORE, &oRectBTMore );
|
||||
|
||||
// Left Align
|
||||
oRectCB . left = oRectList . left = oRectDlg . left + C_iBorderSize;
|
||||
// Right Align
|
||||
oRectCB . right = oRectList . right = oRectDlg . right - C_iBorderSize;
|
||||
// Bottom Align
|
||||
oRectList . bottom = max( oRectList . top, oRectDlg . bottom - C_iBorderSize );
|
||||
|
||||
// BT
|
||||
iSize = oRectBTMore . Width();
|
||||
oRectBTMore . left = oRectST . right + C_iBorderSize;
|
||||
oRectBTMore . right = oRectBTMore . left + iSize;
|
||||
oRectBTCreate . left = oRectBTMore . right + C_iBorderSize;
|
||||
oRectBTCreate . right = min( oRectBTCreate . left + 85, oRectDlg . right - C_iBorderSize );
|
||||
|
||||
// set pos
|
||||
M_SetClientRectId( IDC_BT_CREATESTATES, &oRectBTCreate );
|
||||
M_SetClientRectId( IDC_LB_ANIM, &oRectList );
|
||||
M_SetClientRectId( IDC_COMBO_FAMILY, &oRectCB );
|
||||
M_SetClientRectId( IDC_BT_MORE, &oRectBTMore );
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Description : intercept the popup menu entry
|
||||
// ---------------------------------------------------------------------------*/
|
||||
BOOL CDlgAnimList::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case C_uiPMCreateNormal: mfn_vCreateStates( TRUE ); break;
|
||||
case C_uiPMCreateTransitional: mfn_vCreateStates( FALSE ); break;
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
case C_uiPMCreateNormalMove: mfn_vCreateStatesMove( TRUE ); break;
|
||||
case C_uiPMCreateTransitionalMove: mfn_vCreateStatesMove( FALSE ); break;
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
default :
|
||||
return CFormView::OnCommand(wParam, lParam);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Intercept all messages
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgAnimList::PreTranslateMessage(MSG* pMsg)
|
||||
{
|
||||
if( ( pMsg->hwnd == GetDlgItem(IDC_LB_ANIM)->m_hWnd ) &&
|
||||
( pMsg -> message == WM_RBUTTONDOWN ) )
|
||||
{
|
||||
return OnRButtonDownLbAnim( pMsg );
|
||||
}
|
||||
else if ( ( pMsg->hwnd == GetDlgItem(IDC_LB_ANIM)->m_hWnd ) &&
|
||||
( pMsg -> message == WM_LBUTTONDOWN )
|
||||
)
|
||||
{
|
||||
/*
|
||||
if( ( GetKeyState( VK_SHIFT ) & 0xff00) )
|
||||
return TRUE;
|
||||
*/
|
||||
return OnLButtonDownLbAnim( pMsg );
|
||||
}
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
else if (pMsg -> message == WM_LBUTTONUP )
|
||||
{
|
||||
return OnLButtonUpLbAnim( pMsg );
|
||||
}
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
return CFormView::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Author : MT
|
||||
// Creation : 13/08/97
|
||||
//
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS)
|
||||
{
|
||||
if ( ( nIDCtl == IDC_LB_ANIM ) &&
|
||||
( M_LBAnim() -> IsWindowEnabled() ) &&
|
||||
( lpDIS->itemID != LB_ERR) )
|
||||
{
|
||||
mfn_vOnDrawItemListBoxAnimation( lpDIS ) ;
|
||||
}
|
||||
else
|
||||
CFormView::OnDrawItem(nIDCtl, lpDIS);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg CBN_SELCHANGE on CB Family
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::OnBtMore()
|
||||
{
|
||||
if ( m_bAllFamilies )
|
||||
{
|
||||
int iIndex = M_CBFamily() -> GetCurSel();
|
||||
if( ( iIndex != CB_ERR ) && ( (CPA_Family*)M_CBFamily() -> GetItemData( iIndex ) != M_GetCurrentFamily() ) )
|
||||
return;
|
||||
}
|
||||
|
||||
m_bAllFamilies = ! m_bAllFamilies;
|
||||
|
||||
if( m_bAllFamilies )
|
||||
{
|
||||
// show Cb Family
|
||||
CRect oRectDlg, oRectList, oRectSTAnim, oRectCB;
|
||||
|
||||
// get pos
|
||||
M_GetClientRect( this, &oRectDlg );
|
||||
M_GetClientRectId( IDC_ST_ANIM, &oRectSTAnim );
|
||||
M_GetClientRectId( IDC_LB_ANIM, &oRectList );
|
||||
M_GetClientRectId( IDC_COMBO_FAMILY, &oRectCB );
|
||||
|
||||
M_HideControl( IDC_ST_ANIM );
|
||||
M_ShowControl( IDC_ST_FAMILY );
|
||||
M_ShowControl( IDC_COMBO_FAMILY );
|
||||
|
||||
M_BTMore() -> SetWindowText( "-" );
|
||||
|
||||
// top Align
|
||||
oRectList . top = oRectCB. bottom + C_iBorderSize;
|
||||
|
||||
// set pos
|
||||
M_SetClientRectId( IDC_LB_ANIM, &oRectList );
|
||||
// select current family
|
||||
int iIndex = -1;
|
||||
if( M_GetCurrentFamily() )
|
||||
{
|
||||
iIndex = M_CBFamily() -> FindStringExact( -1, M_GetCurrentFamily() -> GetName() );
|
||||
if ( iIndex == CB_ERR )
|
||||
iIndex = -1;
|
||||
}
|
||||
M_CBFamily() -> SetCurSel( iIndex );
|
||||
}
|
||||
else
|
||||
{
|
||||
// hide Cb Family
|
||||
CRect oRectDlg, oRectList, oRectSTAnim, oRectCB;
|
||||
|
||||
// get pos
|
||||
M_GetClientRect( this, &oRectDlg );
|
||||
M_GetClientRectId( IDC_ST_ANIM, &oRectSTAnim );
|
||||
M_GetClientRectId( IDC_LB_ANIM, &oRectList );
|
||||
M_GetClientRectId( IDC_COMBO_FAMILY, &oRectCB );
|
||||
|
||||
M_ShowControl( IDC_ST_ANIM );
|
||||
M_HideControl( IDC_ST_FAMILY );
|
||||
M_HideControl( IDC_COMBO_FAMILY );
|
||||
M_BTMore() -> SetWindowText( "+" );
|
||||
|
||||
// top Align
|
||||
oRectList . top = oRectCB. top;
|
||||
|
||||
// set pos
|
||||
M_SetClientRectId( IDC_LB_ANIM, &oRectList );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg CBN_SELCHANGE on CB Family
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::OnSelchangeComboFamily()
|
||||
{
|
||||
int iIndex = M_CBFamily() -> GetCurSel();
|
||||
|
||||
if ( iIndex != CB_ERR )
|
||||
{
|
||||
mfn_vFillLBAnimations( (CPA_Family*) M_CBFamily() -> GetItemData( iIndex ) );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg WM_LBUTTONDOWN on ListBox
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgAnimList::OnLButtonDownLbAnim(MSG* pMsg)
|
||||
{
|
||||
CListBox *pLB = M_LBAnim();
|
||||
BOOL bCtrl = ( ( GetKeyState( VK_CONTROL ) & 0xff00 ) != 0 );
|
||||
POINT xPos;
|
||||
CRect oRect;
|
||||
BOOL bOutside;
|
||||
int iIndex;
|
||||
|
||||
xPos.x = LOWORD(pMsg->lParam);
|
||||
xPos.y = HIWORD(pMsg->lParam);
|
||||
|
||||
iIndex = pLB -> ItemFromPoint ( xPos, bOutside ) ;
|
||||
pLB -> GetItemRect ( iIndex , &oRect ) ;
|
||||
if(oRect . PtInRect ( xPos ) )
|
||||
{
|
||||
// click on item
|
||||
BOOL bCtrl = ( ( GetKeyState( VK_CONTROL ) & 0xff00 ) != 0 );
|
||||
BOOL bCurSel = pLB -> GetSel( iIndex );
|
||||
|
||||
if( bCurSel )
|
||||
{
|
||||
// item already selected, deselect it if CTRL
|
||||
if( bCtrl )
|
||||
pLB -> SetSel( iIndex, FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
// item unselected, select it
|
||||
if( bCtrl )
|
||||
pLB -> SetSel( iIndex, TRUE );
|
||||
else
|
||||
{
|
||||
// unselect all
|
||||
pLB -> SelItemRange( FALSE, 0, pLB -> GetCount() );
|
||||
// select it
|
||||
pLB -> SetSel( iIndex, TRUE );
|
||||
}
|
||||
}
|
||||
OnSelchangeLbAnim();
|
||||
pLB -> Invalidate();
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
SetCapture();
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
return TRUE;
|
||||
}
|
||||
return CFormView::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg WM_LBUTTONUP on ListBox
|
||||
// Author: Mihaela Tancu
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgAnimList::OnLButtonUpLbAnim(MSG* pMsg)
|
||||
{
|
||||
m_p_oParentDLL -> mfn_iSetIndexListBox( -1);
|
||||
m_p_oStatePrevious = NULL;
|
||||
m_p_oStateTarget = NULL;
|
||||
|
||||
if (GetCapture() != this)
|
||||
return FALSE; // If this window (view) didn't capture the mouse,
|
||||
// then the user isn't in this window.
|
||||
ReleaseCapture(); // Release the mouse capture established at
|
||||
// the beginning of the mouse drag.
|
||||
SetCursor(M_GetMainApp()->LoadStandardCursor(IDC_ARROW));
|
||||
|
||||
|
||||
CListBox *pLB = (CListBox *)(CWnd::FromHandle(::GetDlgItem( m_p_oParentDLL->mfn_hGetDlgActionContentsHwnd(), IDC_LIST_STATES)));
|
||||
POINT xPos, sPos;
|
||||
|
||||
GetCursorPos(&xPos);
|
||||
sPos = xPos;
|
||||
CRect oRect;
|
||||
pLB -> ScreenToClient(&xPos);
|
||||
pLB -> GetClientRect( oRect );
|
||||
m_p_oParentDLL -> mfn_iSetIndexListBox( -1);
|
||||
|
||||
if( !oRect.PtInRect(xPos)) return 1;
|
||||
|
||||
//test if the mouse cursor is on one item from the list box
|
||||
CPoint oPoint(xPos);
|
||||
BOOL bOutside;
|
||||
|
||||
if (!M_GetCurrentAction()->m_oListOfStates.IsEmpty())
|
||||
{
|
||||
int iIndex = pLB->ItemFromPoint(oPoint, bOutside ) ;
|
||||
if (iIndex != LB_ERR)
|
||||
m_p_oParentDLL->mfn_vChangeState( ((CPA_State *) pLB->GetItemData(iIndex)) );
|
||||
else
|
||||
m_p_oParentDLL->mfn_vChangeState( NULL );
|
||||
|
||||
if (iIndex > 0)
|
||||
m_p_oStatePrevious = (CPA_State *) pLB->GetItemData(iIndex-1);
|
||||
m_p_oStateTarget = (CPA_State *) pLB->GetItemData(iIndex);
|
||||
|
||||
CRect oRectItem;
|
||||
pLB->GetItemRect(iIndex,&oRectItem);
|
||||
|
||||
//prepare the informations for creating the states from animations
|
||||
if(oRectItem.PtInRect(xPos))
|
||||
// if the mouse cursor is on one item from the list box
|
||||
// save the index of that item
|
||||
{ m_p_oParentDLL -> mfn_iSetIndexListBox( iIndex);
|
||||
if (iIndex > 0)
|
||||
m_p_oStatePrevious = (CPA_State *) pLB->GetItemData(iIndex-1);
|
||||
m_p_oStateTarget = (CPA_State *) pLB->GetItemData(iIndex);
|
||||
}
|
||||
else
|
||||
{ // if the cursor is not on one item!!! (put the states on null)
|
||||
m_p_oStatePrevious = NULL;
|
||||
m_p_oStateTarget = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
CMenu oPopMenu;
|
||||
// create popup on the mouse position
|
||||
oPopMenu . CreatePopupMenu () ;
|
||||
// fill menu
|
||||
oPopMenu . AppendMenu( MF_STRING , C_uiPMCreateNormalMove, "Normal States");
|
||||
if (!M_GetCurrentAction()->m_oListOfStates.IsEmpty())
|
||||
oPopMenu . AppendMenu( MF_STRING , C_uiPMCreateTransitionalMove, "Transitional States");
|
||||
// register for TUT module
|
||||
TUT_M_vGetTutDll ();
|
||||
TUT_M_vRegisterMenu (this -> m_hWnd , oPopMenu . m_hMenu , sPos.x, sPos.y);
|
||||
oPopMenu . TrackPopupMenu ( TPM_LEFTALIGN|TPM_RIGHTBUTTON, sPos.x, sPos.y , this);
|
||||
oPopMenu . DestroyMenu ();
|
||||
|
||||
return CFormView::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg WM_MOUSE on ListBox
|
||||
// Author: Mihaela Tancu
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::OnMouseMove(UINT nFlags, CPoint pt)
|
||||
{
|
||||
POINT point;
|
||||
GetCursorPos(&point);
|
||||
if (nFlags & MK_LBUTTON)
|
||||
{
|
||||
CListBox *pLB = (CListBox *)(CWnd::FromHandle(::GetDlgItem( m_p_oParentDLL->mfn_hGetDlgActionContentsHwnd(), IDC_LIST_STATES)));
|
||||
CRect oRect;
|
||||
pLB -> GetWindowRect( oRect );
|
||||
if(oRect.PtInRect(point))
|
||||
// change the mouse cursor if it is in the Action Contents list box rect
|
||||
SetCursor(M_GetMainApp()->LoadCursor(IDC_POINTER_CURSOR));
|
||||
else
|
||||
// change the mouse cursor if it is not in the Action Contents List box rect
|
||||
SetCursor(M_GetMainApp()->LoadStandardCursor(IDC_NO));
|
||||
}
|
||||
}
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg WM_RBUTTONDOWN on ListBox
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgAnimList::OnRButtonDownLbAnim(MSG* pMsg)
|
||||
{
|
||||
CListBox *pLB = M_LBAnim();
|
||||
int iNbSelected = pLB -> GetSelCount();
|
||||
BOOL bCanCreate = ( ( iNbSelected > 0 ) && ( M_GetCurrentAction() != NULL ) );
|
||||
POINT xPos;
|
||||
CMenu oPopupMenu ;
|
||||
|
||||
xPos.x = LOWORD(pMsg->lParam);
|
||||
xPos.y = HIWORD(pMsg->lParam);
|
||||
|
||||
// create popup menu
|
||||
oPopupMenu . CreatePopupMenu () ;
|
||||
// fill menu
|
||||
oPopupMenu . AppendMenu( MF_STRING + ( bCanCreate ? MF_ENABLED : MF_GRAYED) , C_uiPMCreateNormal , "Create Normal State(s)" ) ;
|
||||
oPopupMenu . AppendMenu( MF_STRING + ( bCanCreate ? MF_ENABLED : MF_GRAYED) , C_uiPMCreateTransitional , "Create Transitional State(s)" ) ;
|
||||
// display menu
|
||||
pLB->ClientToScreen(&xPos);
|
||||
// ALX
|
||||
TUT_M_vGetTutDll ();
|
||||
TUT_M_vRegisterMenu (this -> m_hWnd , oPopupMenu . m_hMenu , xPos . x , xPos . y);
|
||||
// End ALX
|
||||
oPopupMenu . TrackPopupMenu ( TPM_LEFTALIGN|TPM_RIGHTBUTTON, xPos.x, xPos.y, this);
|
||||
oPopupMenu . DestroyMenu ();
|
||||
|
||||
return CFormView::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg BN_CLICKED on BT Create
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::OnBtCreatestates()
|
||||
{
|
||||
CMenu oPopMenu;
|
||||
CRect oRect;
|
||||
|
||||
M_BTCreate() -> GetWindowRect( oRect );
|
||||
// create popup
|
||||
oPopMenu . CreatePopupMenu () ;
|
||||
// fill menu
|
||||
oPopMenu . AppendMenu( MF_STRING , C_uiPMCreateNormal, "Normal States");
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
if (!M_GetCurrentAction()->m_oListOfStates.IsEmpty())
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
||||
oPopMenu . AppendMenu( MF_STRING , C_uiPMCreateTransitional, "Transitional States");
|
||||
TUT_M_vGetTutDll ();
|
||||
TUT_M_vRegisterMenu (this -> m_hWnd , oPopMenu . m_hMenu , oRect . left, oRect . bottom);
|
||||
oPopMenu . TrackPopupMenu ( TPM_LEFTALIGN|TPM_RIGHTBUTTON, oRect . left, oRect . bottom , this);
|
||||
oPopMenu . DestroyMenu ();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg LBN_SELCHANGE on ListBox
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::OnSelchangeLbAnim()
|
||||
{
|
||||
CListBox *pLB = M_LBAnim();
|
||||
int iNbSelected = pLB -> GetSelCount();
|
||||
|
||||
if ( iNbSelected < 2 )
|
||||
{
|
||||
// unselect all
|
||||
for ( int i=0 ; i<M_LBAnim()->GetCount() ; i++ )
|
||||
pLB -> SetItemData( i, 0 );
|
||||
|
||||
if ( iNbSelected == 1 )
|
||||
{
|
||||
// select first
|
||||
int *a_iNewSelection = (int*) malloc( iNbSelected * sizeof( int ) );
|
||||
pLB -> GetSelItems( iNbSelected, a_iNewSelection );
|
||||
pLB -> SetItemData( *a_iNewSelection, 1 );
|
||||
free( a_iNewSelection );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// one item has been select or unselect
|
||||
//
|
||||
for ( int i=0 ; i<M_LBAnim()->GetCount() ; i++ )
|
||||
{
|
||||
if( pLB -> GetSel( i ) && ( pLB -> GetItemData( i ) == 0 ) )
|
||||
{
|
||||
// new selection
|
||||
pLB -> SetItemData( i, iNbSelected );
|
||||
break;
|
||||
}
|
||||
else if ( !pLB -> GetSel( i ) && ( pLB -> GetItemData( i ) != 0 ) )
|
||||
{
|
||||
// unselect item
|
||||
DWORD dwLast = pLB -> GetItemData( i );
|
||||
// shift next items
|
||||
for ( int j=0 ; j<M_LBAnim()->GetCount() ; j++ )
|
||||
{
|
||||
if( pLB -> GetItemData( j ) > dwLast )
|
||||
pLB -> SetItemData( j, pLB -> GetItemData( j ) - 1 );
|
||||
}
|
||||
pLB -> SetItemData( i, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
M_BTCreate() -> EnableWindow( (BOOL)iNbSelected && (BOOL)M_GetCurrentAction() );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Author : MT
|
||||
// Creation : 13/08/97
|
||||
//
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::mfn_vOnDrawItemListBoxAnimation(LPDRAWITEMSTRUCT lpDIS)
|
||||
{
|
||||
CDC *pDC = CDC::FromHandle( lpDIS->hDC );
|
||||
char szText[100];
|
||||
CListBox *pLB = M_LBAnim();
|
||||
BOOL bSelected = (lpDIS->itemState & ODS_SELECTED );
|
||||
int iIndex = (int)pLB -> GetItemData( lpDIS->itemID );
|
||||
|
||||
pDC->FillSolidRect( &lpDIS->rcItem, GetSysColor( COLOR_WINDOW ));
|
||||
pDC->SetBkMode( TRANSPARENT);
|
||||
pDC->SetTextColor( GetSysColor( COLOR_WINDOWTEXT ) );
|
||||
|
||||
// display animation name
|
||||
lpDIS->rcItem.left += 1;
|
||||
pLB->GetText( lpDIS->itemID, szText );
|
||||
pDC->DrawText( szText, strlen(szText), &lpDIS->rcItem, DT_SINGLELINE | DT_LEFT | DT_VCENTER );
|
||||
// display selected index
|
||||
if ( bSelected && iIndex )
|
||||
{
|
||||
itoa( iIndex, szText, 10 );
|
||||
lpDIS->rcItem.right -= 2;
|
||||
pDC->DrawText( szText, strlen(szText), &lpDIS->rcItem, DT_SINGLELINE | DT_RIGHT | DT_VCENTER );
|
||||
lpDIS->rcItem.right += 2;
|
||||
lpDIS->rcItem.left -= 1;
|
||||
pDC->InvertRect( &lpDIS->rcItem );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Set Parent DLL
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::mfn_vSetParentDLL(TAction_Interface * _p_oDLL)
|
||||
{
|
||||
m_p_oParentDLL = _p_oDLL;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Set Current Family
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::mfn_vSetFamily(CPA_Family * _p_oFamily)
|
||||
{
|
||||
// GetCurrent FamilySelected
|
||||
int iCurrent = M_CBFamily() -> GetCurSel();
|
||||
// select current family
|
||||
int iIndex = -1;
|
||||
if( _p_oFamily )
|
||||
{
|
||||
iIndex = M_CBFamily() -> FindStringExact( -1, _p_oFamily -> GetName() );
|
||||
if ( iIndex == CB_ERR )
|
||||
iIndex = -1;
|
||||
}
|
||||
if( iIndex != iCurrent )
|
||||
{
|
||||
M_CBFamily() -> SetCurSel( iIndex );
|
||||
OnSelchangeComboFamily();
|
||||
}
|
||||
else
|
||||
M_LBAnim() -> SetSel( -1, FALSE );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Fill ListBox Animation
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::mfn_vFillLBAnimations(CPA_Family * _p_oFamily)
|
||||
{
|
||||
CListBox *pLB = M_LBAnim();
|
||||
|
||||
pLB -> ResetContent();
|
||||
M_BTCreate() -> EnableWindow( FALSE );
|
||||
if( _p_oFamily )
|
||||
{
|
||||
CPA_List<CPA_BaseObject> oList;
|
||||
|
||||
_p_oFamily -> GetMainWorld() -> fn_lFindObjects( &oList, "", C_szAnimationTypeName, (CPA_BaseObject*)_p_oFamily );
|
||||
POSITION xPos = oList . GetHeadPosition();
|
||||
while( xPos )
|
||||
{
|
||||
CPA_BaseObject *p_oAnim = oList . GetNext( xPos );
|
||||
int iIndex = pLB -> AddString( p_oAnim -> GetName() );
|
||||
if( iIndex != LB_ERR )
|
||||
pLB -> SetItemData( iIndex, (DWORD) 0);
|
||||
}
|
||||
}
|
||||
pLB -> SetSel( -1, FALSE );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : fill ComboBox Families
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::mfn_vFillCBFamilies(void)
|
||||
{
|
||||
CComboBox *pCB = M_CBFamily();
|
||||
|
||||
pCB -> ResetContent();
|
||||
M_BTCreate() -> EnableWindow( FALSE );
|
||||
|
||||
CPA_BaseObjectList *p_oList = m_p_oParentDLL -> GetMainWorld() -> fn_p_oGetOriginalObjectList( C_szFamilyTypeName );
|
||||
if( p_oList )
|
||||
{
|
||||
Position xPos = p_oList -> GetHeadPosition();
|
||||
while( xPos )
|
||||
{
|
||||
CPA_BaseObject *p_oFamily = p_oList -> GetNext( xPos );
|
||||
if( p_oFamily -> fn_bIsAvailable() )
|
||||
{
|
||||
int iIndex = pCB -> AddString( p_oFamily -> GetName() );
|
||||
if( iIndex != CB_ERR )
|
||||
pCB -> SetItemData( iIndex, (DWORD) p_oFamily );
|
||||
}
|
||||
}
|
||||
}
|
||||
pCB -> SetCurSel( -1 );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Create new states
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::mfn_vCreateStates(BOOL _bNormal)
|
||||
{
|
||||
CListBox *pLB = M_LBAnim();
|
||||
DWORD dwNbSelected = pLB -> GetSelCount();
|
||||
CPA_BaseObjectList *p_oAnimList;
|
||||
ASSERT( (BOOL) dwNbSelected );
|
||||
|
||||
p_oAnimList = m_p_oParentDLL -> GetMainWorld() -> fn_p_oGetOriginalObjectList( C_szAnimationTypeName );
|
||||
|
||||
int *a_iSelectedIndexes = (int*) malloc( dwNbSelected * sizeof(int));
|
||||
|
||||
pLB -> GetSelItems( dwNbSelected, a_iSelectedIndexes );
|
||||
|
||||
State_CreateFromAnims *p_oCreate = new State_CreateFromAnims( m_p_oParentDLL, M_GetCurrentAction() );
|
||||
|
||||
if( M_GetCurrentState() )
|
||||
p_oCreate -> mfn_vSetMecaCard( M_GetCurrentState() -> mfn_p_oGetMecaCard() );
|
||||
|
||||
p_oCreate -> mfn_vSetNormalState( _bNormal );
|
||||
|
||||
for( DWORD dwNum = 1; dwNum < dwNbSelected+1; dwNum++ )
|
||||
{
|
||||
// search selected item with order iNum
|
||||
int dwJ = 0;
|
||||
while( ( dwJ < dwNbSelected+1 ) && ( pLB -> GetItemData( a_iSelectedIndexes[dwJ] ) != dwNum ) )
|
||||
dwJ++;
|
||||
ASSERT( dwJ < dwNbSelected );
|
||||
|
||||
CString csAnim;
|
||||
|
||||
pLB -> GetText( a_iSelectedIndexes[dwJ], csAnim );
|
||||
|
||||
CPA_Animation *p_oAnimation = (CPA_Animation*) p_oAnimList -> fn_p_oFindObject( csAnim, C_szAnimationTypeName, M_GetCurrentFamily() );
|
||||
ASSERT( p_oAnimation );
|
||||
|
||||
p_oCreate -> mfn_vAddAnim( p_oAnimation );
|
||||
}
|
||||
M_MakeDo( p_oCreate );
|
||||
|
||||
free( a_iSelectedIndexes );
|
||||
|
||||
pLB -> SetSel( -1, FALSE );
|
||||
M_BTCreate() -> EnableWindow( FALSE );
|
||||
}
|
||||
|
||||
// CPA_Ed_1 Mihaela Tancu begin
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Create new states by dragging an animation at one position
|
||||
// Author: Mihaela Tancu
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgAnimList::mfn_vCreateStatesMove(BOOL _bNormal)
|
||||
{
|
||||
CListBox *pLB = M_LBAnim();
|
||||
DWORD dwNbSelected = pLB -> GetSelCount();
|
||||
CPA_BaseObjectList *p_oAnimList;
|
||||
ASSERT( (BOOL) dwNbSelected );
|
||||
|
||||
// used for invalidate the display of the list box
|
||||
M_LBAnim()->SetRedraw(FALSE);
|
||||
|
||||
p_oAnimList = m_p_oParentDLL -> GetMainWorld() -> fn_p_oGetOriginalObjectList( C_szAnimationTypeName );
|
||||
|
||||
int *a_iSelectedIndexes = (int*) malloc( dwNbSelected * sizeof(int));
|
||||
|
||||
pLB -> GetSelItems( dwNbSelected, a_iSelectedIndexes );
|
||||
|
||||
State_CreateFromAnimsMove *p_oCreate = new State_CreateFromAnimsMove( m_p_oParentDLL, M_GetCurrentAction(),
|
||||
m_p_oStatePrevious, m_p_oStateTarget,NULL);
|
||||
|
||||
if( M_GetCurrentState() )
|
||||
p_oCreate -> mfn_vSetMecaCard( M_GetCurrentState() -> mfn_p_oGetMecaCard() );
|
||||
|
||||
p_oCreate -> mfn_vSetNormalState( _bNormal );
|
||||
|
||||
for( DWORD dwNum = 1; dwNum < dwNbSelected+1; dwNum++ )
|
||||
{
|
||||
// search selected item with order iNum
|
||||
int dwJ = 0;
|
||||
while( ( dwJ < dwNbSelected+1 ) && ( pLB -> GetItemData( a_iSelectedIndexes[dwJ] ) != dwNum ) )
|
||||
dwJ++;
|
||||
ASSERT( dwJ < dwNbSelected );
|
||||
|
||||
CString csAnim;
|
||||
|
||||
pLB -> GetText( a_iSelectedIndexes[dwJ], csAnim );
|
||||
|
||||
CPA_Animation *p_oAnimation = (CPA_Animation*) p_oAnimList -> fn_p_oFindObject( csAnim, C_szAnimationTypeName, M_GetCurrentFamily() );
|
||||
ASSERT( p_oAnimation );
|
||||
|
||||
p_oCreate -> mfn_vAddAnim( p_oAnimation );
|
||||
}
|
||||
M_MakeDo( p_oCreate );
|
||||
|
||||
free( a_iSelectedIndexes );
|
||||
|
||||
M_LBAnim()->SetRedraw(TRUE);
|
||||
|
||||
pLB -> SetSel( -1, FALSE );
|
||||
M_BTCreate() -> EnableWindow( FALSE );
|
||||
}
|
||||
|
||||
// CPA_Ed_1 Mihaela Tancu end
|
144
Rayman_X/cpa/tempgrp/TAc/src/DlgInput.cpp
Normal file
144
Rayman_X/cpa/tempgrp/TAc/src/DlgInput.cpp
Normal file
@@ -0,0 +1,144 @@
|
||||
// dlginputtext.cpp : implementation file
|
||||
//
|
||||
#include "stdafx.h"
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
|
||||
#include "DlgInput.hpp"
|
||||
|
||||
#include "..\Main\Inc\_EditID.h"
|
||||
#include "TUT.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgInputText dialog
|
||||
|
||||
|
||||
CDlgInputText::CDlgInputText(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CDlgInputText::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgInputText)
|
||||
m_Data_EditText = _T("");
|
||||
//}}AFX_DATA_INIT
|
||||
m_oCstMessage = "";
|
||||
m_oCstTitle = "";
|
||||
m_csDefaultValue = "";
|
||||
m_xPoint . x = 0;
|
||||
m_xPoint . y = 0;
|
||||
m_bSelect = FALSE;
|
||||
}
|
||||
|
||||
|
||||
void CDlgInputText::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgInputText)
|
||||
DDX_Text(pDX, IDC_EDIT_TEXT, m_Data_EditText);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgInputText, CDialog)
|
||||
//{{AFX_MSG_MAP(CDlgInputText)
|
||||
ON_WM_DESTROY()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgInputText set data methods
|
||||
|
||||
void CDlgInputText::SetMessage(char *_szMessage)
|
||||
{
|
||||
m_oCstMessage = _szMessage;
|
||||
}
|
||||
|
||||
char * CDlgInputText::GetInputText()
|
||||
{
|
||||
return (char*)(LPCTSTR)m_Data_EditText;
|
||||
}
|
||||
|
||||
void CDlgInputText::SetTitle(char *_szTitle)
|
||||
{
|
||||
m_oCstTitle = _szTitle;
|
||||
}
|
||||
|
||||
void CDlgInputText::SetPos(POINT *_pPoint)
|
||||
{
|
||||
memcpy ( &m_xPoint, _pPoint, sizeof POINT ) ;
|
||||
}
|
||||
|
||||
void CDlgInputText::SetSelect(BOOL _bSelect /*=TRUE*/ )
|
||||
{
|
||||
m_bSelect = _bSelect;
|
||||
}
|
||||
|
||||
void CDlgInputText::SetDefaultValue(char *_szValue)
|
||||
{
|
||||
m_csDefaultValue = _szValue;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgInputText message handlers
|
||||
|
||||
BOOL CDlgInputText::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
SetWindowText(m_oCstTitle);
|
||||
GetDlgItem(IDC_STATIC_TEXT)->SetWindowText(m_oCstMessage);
|
||||
m_Data_EditText = m_csDefaultValue;
|
||||
GetDlgItem(IDC_EDIT_TEXT) -> SetWindowText( m_Data_EditText );
|
||||
if( m_bSelect )
|
||||
{
|
||||
((CEdit*)GetDlgItem(IDC_EDIT_TEXT)) -> SetSel( 0, -1 ); // select text
|
||||
}
|
||||
|
||||
CRect oRect;
|
||||
CSize oScreenSize( GetSystemMetrics( SM_CXSCREEN ), GetSystemMetrics( SM_CYSCREEN ) ) ;
|
||||
|
||||
GetClientRect(&oRect);
|
||||
oRect += m_xPoint;
|
||||
// dialog must be in screen
|
||||
if ( oRect . right >= oScreenSize . cx )
|
||||
{
|
||||
oRect . OffsetRect ( -(oRect . right - oScreenSize . cx + 10), 0 );
|
||||
}
|
||||
if ( oRect . bottom >= oScreenSize . cy )
|
||||
{
|
||||
oRect . OffsetRect ( 0, -(oRect . bottom - oScreenSize . cy + 10) );
|
||||
}
|
||||
MoveWindow( &oRect ) ;
|
||||
|
||||
// register controls for TUT
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vRegisterControlID( IDC_EDIT_TEXT, "TAC_INPUT_TEXT", TUT_e_TextEdit );
|
||||
TUT_M_vRegisterControlID( IDOK, "TAC_INPUT_OK", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDCANCEL, "TAC_INPUT_CANCEL",TUT_e_Button );
|
||||
//
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
void CDlgInputText::OnOK()
|
||||
{
|
||||
// TODO: Add extra validation here
|
||||
UpdateData(TRUE);
|
||||
if( !m_Data_EditText.IsEmpty() )
|
||||
CDialog::OnOK();
|
||||
}
|
||||
|
||||
void CDlgInputText::OnDestroy()
|
||||
{
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vUnregisterControlID( IDC_EDIT_TEXT );
|
||||
TUT_M_vUnregisterControlID( IDOK );
|
||||
TUT_M_vUnregisterControlID( IDCANCEL );
|
||||
|
||||
CDialog::OnDestroy();
|
||||
}
|
371
Rayman_X/cpa/tempgrp/TAc/src/DlgNmLst.cpp
Normal file
371
Rayman_X/cpa/tempgrp/TAc/src/DlgNmLst.cpp
Normal file
@@ -0,0 +1,371 @@
|
||||
// DlgNmLst.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "OAc.h"
|
||||
#include "TFA.h"
|
||||
#include "x:\cpa\main\inc\_editid.h"
|
||||
#include "TUT.h"
|
||||
|
||||
#include "ACInterf.hpp"
|
||||
#include "DlgNmLst.hpp"
|
||||
#include "FAModif.hpp"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/*=============================================================================
|
||||
MACROS
|
||||
=============================================================================*/
|
||||
#define M_BT( nID ) ( (CButton*) GetDlgItem( nID ) )
|
||||
#define M_BTChecked( nID ) (M_BT( nID ) -> GetCheck() )
|
||||
|
||||
#define M_BTZDm() M_BT( IDC_RADIO_ZDM )
|
||||
#define M_BTZDe() M_BT( IDC_RADIO_ZDE )
|
||||
#define M_BTZDd() M_BT( IDC_RADIO_ZDD )
|
||||
#define M_BTZDr() M_BT( IDC_RADIO_ZDR )
|
||||
#define M_BTEdit() M_BT( IDC_BT_EDITSTATE )
|
||||
#define M_BTZDeChecked() M_BTChecked( IDC_RADIO_ZDE )
|
||||
#define M_BTZDmChecked() M_BTChecked( IDC_RADIO_ZDM )
|
||||
#define M_BTZDdChecked() M_BTChecked( IDC_RADIO_ZDD )
|
||||
#define M_BTZDrChecked() M_BTChecked( IDC_RADIO_ZDR )
|
||||
|
||||
#define M_LBNames() ( (CListBox*) GetDlgItem( IDC_LB_NAMES ) )
|
||||
|
||||
#define M_GetClientRect( pWnd, poRect ) (pWnd) -> GetWindowRect( poRect );ScreenToClient( poRect )
|
||||
#define M_GetClientRectId( Id, poRect ) M_GetClientRect( GetDlgItem( Id ), poRect )
|
||||
#define M_SetClientRect( pWnd, poRect ) (pWnd) -> MoveWindow( poRect )
|
||||
#define M_SetClientRectId( Id, poRect ) M_SetClientRect( GetDlgItem( Id ), poRect )
|
||||
|
||||
#define M_MakeDo( p_oModif ) m_p_oDLL -> M_GetEditManager() -> AskFor( p_oModif )
|
||||
|
||||
#define M_GetCurrentNameList() m_p_oDLL -> mfn_p_oGetCurrentNamesList()
|
||||
|
||||
/*=============================================================================
|
||||
CONSTANTS
|
||||
=============================================================================*/
|
||||
#define C_iBorderSize 2
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgNameList
|
||||
|
||||
IMPLEMENT_DYNCREATE(CDlgNameList, CFormView)
|
||||
|
||||
CDlgNameList::CDlgNameList()
|
||||
: CFormView(CDlgNameList::IDD)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgNameList)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
m_bFirstShow = TRUE;
|
||||
m_p_oCurrentFamily = NULL;
|
||||
}
|
||||
|
||||
CDlgNameList::~CDlgNameList()
|
||||
{
|
||||
}
|
||||
|
||||
void CDlgNameList::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CFormView::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgNameList)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
BOOL CDlgNameList::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext)
|
||||
{
|
||||
BOOL bResult = CFormView::Create( lpszClassName, lpszWindowName, dwRequestedStyle, rect, pParentWnd, nID, pContext );
|
||||
// register controls
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vRegisterControlID( IDC_RADIO_ZDD, "TAC_ZAM_NAMESLIST_ZDD", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_RADIO_ZDE, "TAC_ZAM_NAMESLIST_ZDE", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_RADIO_ZDM, "TAC_ZAM_NAMESLIST_ZDM", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_RADIO_ZDR, "TAC_ZAM_NAMESLIST_ZDR", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_LB_NAMES, "TAC_ZAM_NAMESLIST_LIST", TUT_e_ListBox );
|
||||
TUT_M_vRegisterControlID( IDC_BT_EDITSTATE, "TAC_ZAM_NAMESLIST_SWAP", TUT_e_Button );
|
||||
//
|
||||
return bResult;
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgNameList, CFormView)
|
||||
//{{AFX_MSG_MAP(CDlgNameList)
|
||||
ON_BN_CLICKED(IDC_RADIO_ZDD, OnRadioZdx)
|
||||
ON_BN_CLICKED(IDC_BT_EDITSTATE, OnBtEditstate)
|
||||
ON_LBN_SELCHANGE(IDC_LB_NAMES, OnSelchangeLbNames)
|
||||
ON_BN_CLICKED(IDC_RADIO_ZDE, OnRadioZdx)
|
||||
ON_BN_CLICKED(IDC_RADIO_ZDM, OnRadioZdx)
|
||||
ON_BN_CLICKED(IDC_RADIO_ZDR, OnRadioZdx)
|
||||
ON_WM_SHOWWINDOW()
|
||||
ON_WM_SIZE()
|
||||
ON_WM_DESTROY()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgNameList diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CDlgNameList::AssertValid() const
|
||||
{
|
||||
CFormView::AssertValid();
|
||||
}
|
||||
|
||||
void CDlgNameList::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CFormView::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgNameList message handlers
|
||||
|
||||
void CDlgNameList::OnDestroy()
|
||||
{
|
||||
// register controls
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vUnregisterControlID( IDC_RADIO_ZDD );
|
||||
TUT_M_vUnregisterControlID( IDC_RADIO_ZDE );
|
||||
TUT_M_vUnregisterControlID( IDC_RADIO_ZDM );
|
||||
TUT_M_vUnregisterControlID( IDC_RADIO_ZDR );
|
||||
TUT_M_vUnregisterControlID( IDC_LB_NAMES );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_EDITSTATE );
|
||||
//
|
||||
CFormView::OnDestroy();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message WM_SHOWWINDOW
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgNameList::OnShowWindow(BOOL bShow, UINT nStatus)
|
||||
{
|
||||
CFormView::OnShowWindow(bShow, nStatus);
|
||||
|
||||
if(bShow && m_bFirstShow)
|
||||
{
|
||||
M_BTZDm() -> SetCheck( 1 ); // active ZDm Type
|
||||
}
|
||||
m_bFirstShow = FALSE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message WM_SIZE
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgNameList::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
if(GetDlgItem(IDC_LB_NAMES))
|
||||
{
|
||||
CRect oRectDlg, oRectList, oRectBTSwap, oRectBTZDe, oRectBTZDd, oRectBTZDm, oRectBTZDr;
|
||||
int iSize,iSpace;
|
||||
|
||||
// get pos
|
||||
M_GetClientRect( this, &oRectDlg );
|
||||
M_GetClientRectId( IDC_BT_EDITSTATE, &oRectBTSwap );
|
||||
M_GetClientRectId( IDC_RADIO_ZDE, &oRectBTZDe );
|
||||
M_GetClientRectId( IDC_RADIO_ZDD, &oRectBTZDd );
|
||||
M_GetClientRectId( IDC_RADIO_ZDM, &oRectBTZDm );
|
||||
M_GetClientRectId( IDC_RADIO_ZDR, &oRectBTZDr );
|
||||
M_GetClientRectId( IDC_LB_NAMES, &oRectList );
|
||||
|
||||
iSize = oRectBTZDe . Width();
|
||||
iSpace = (oRectDlg . Width() - (iSize<<1) - (C_iBorderSize<<1)) / 3;
|
||||
// Left Align
|
||||
oRectBTSwap . left = oRectList . left = oRectDlg . left + C_iBorderSize;
|
||||
oRectBTZDd . left = oRectBTZDm . left = oRectDlg . left + C_iBorderSize + iSpace;
|
||||
oRectBTZDe . left = oRectBTZDr . left = oRectBTZDd . left + iSize + iSpace;
|
||||
// Right Align
|
||||
oRectBTSwap . right = oRectBTZDm . right = oRectList . right = oRectDlg . right - C_iBorderSize;
|
||||
// Bottom Align
|
||||
oRectList . bottom = max( oRectList . top, oRectDlg . bottom - C_iBorderSize );
|
||||
|
||||
// BTs
|
||||
oRectBTZDd . right = oRectBTZDd . left + iSize;
|
||||
oRectBTZDm . right = oRectBTZDm . left + iSize;
|
||||
oRectBTZDe . right = oRectBTZDe . left + iSize;
|
||||
oRectBTZDr . right = oRectBTZDr . left + iSize;
|
||||
|
||||
// set pos
|
||||
M_SetClientRectId( IDC_BT_EDITSTATE, &oRectBTSwap );
|
||||
M_SetClientRectId( IDC_RADIO_ZDE, &oRectBTZDe );
|
||||
M_SetClientRectId( IDC_RADIO_ZDD, &oRectBTZDd );
|
||||
M_SetClientRectId( IDC_RADIO_ZDM, &oRectBTZDm );
|
||||
M_SetClientRectId( IDC_RADIO_ZDR, &oRectBTZDr );
|
||||
M_SetClientRectId( IDC_LB_NAMES, &oRectList );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message BN_CLICKED on Radio button
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgNameList::OnRadioZdx()
|
||||
{
|
||||
CListBox *pLB = M_LBNames();
|
||||
mfn_vFillLBNames( m_p_oCurrentFamily, mfn_vGetZoneType() );
|
||||
if( pLB -> GetCount() > 0 )
|
||||
pLB -> SetCurSel( 0 );
|
||||
else
|
||||
pLB -> SetCurSel( -1 );
|
||||
M_LBNames() -> Invalidate();
|
||||
OnSelchangeLbNames();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message BN_CLICKED on Edit Button
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgNameList::OnBtEditstate()
|
||||
{
|
||||
Family_StateChange *p_oNLChange = new Family_StateChange( m_p_oDLL, C_eMode, (void*)TRUE, (void*)FALSE );
|
||||
M_MakeDo( p_oNLChange );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message LBN_SELCHANGE on ListBox
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgNameList::OnSelchangeLbNames()
|
||||
{
|
||||
CListBox *pLB = M_LBNames();
|
||||
int iIndex = pLB -> GetCurSel();
|
||||
CPA_tdoNameList *p_oNameList = NULL;
|
||||
|
||||
if( iIndex != LB_ERR )
|
||||
p_oNameList = (CPA_tdoNameList*) pLB -> GetItemData( iIndex );
|
||||
|
||||
Family_StateChange *p_oNLChange = new Family_StateChange( m_p_oDLL, C_eNameList, p_oNameList, M_GetCurrentNameList() );
|
||||
M_MakeDo( p_oNLChange );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Set Current Family
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgNameList::mfn_vSetFamily(CPA_Family * _p_oFamily)
|
||||
{
|
||||
CListBox *pLB = M_LBNames();
|
||||
CPA_tdoNameList *p_oNameList = NULL;
|
||||
|
||||
mfn_vFillLBNames( _p_oFamily, mfn_vGetZoneType() );
|
||||
|
||||
GetDlgItem( IDC_RADIO_ZDD ) -> EnableWindow( _p_oFamily != NULL );
|
||||
GetDlgItem( IDC_RADIO_ZDM ) -> EnableWindow( _p_oFamily != NULL );
|
||||
GetDlgItem( IDC_RADIO_ZDE ) -> EnableWindow( _p_oFamily != NULL );
|
||||
GetDlgItem( IDC_RADIO_ZDR ) -> EnableWindow( _p_oFamily != NULL );
|
||||
|
||||
m_p_oCurrentFamily = _p_oFamily;
|
||||
|
||||
// select first item
|
||||
if( pLB -> GetCount() > 0 )
|
||||
m_p_oDLL -> mfn_vSetCurrentNameList( (CPA_tdoNameList*) pLB -> GetItemData( 0 ) );
|
||||
else
|
||||
m_p_oDLL -> mfn_vSetCurrentNameList( NULL );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Get Zone Type
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgNameList::mfn_vSetCurrentNamesList(CPA_tdoNameList *_p_oNamesList)
|
||||
{
|
||||
CListBox *pLB = M_LBNames();
|
||||
|
||||
pLB -> SetCurSel( -1 );
|
||||
|
||||
if( _p_oNamesList )
|
||||
{
|
||||
int iIndex = -1;
|
||||
tde_ZoneType eType = C_eError;
|
||||
|
||||
if( _p_oNamesList -> fn_bIsOfType( C_szZDeNameListType ) )
|
||||
eType = C_eZDe;
|
||||
else if( _p_oNamesList -> fn_bIsOfType( C_szZDmNameListType ) )
|
||||
eType = C_eZDm;
|
||||
else if( _p_oNamesList -> fn_bIsOfType( C_szZDdNameListType ) )
|
||||
eType = C_eZDd;
|
||||
else if( _p_oNamesList -> fn_bIsOfType( C_szZDrNameListType ) )
|
||||
eType = C_eZDr;
|
||||
|
||||
mfn_vSetZoneType( eType );
|
||||
mfn_vFillLBNames( (CPA_Family*)_p_oNamesList -> GetOwner(), eType );
|
||||
|
||||
// select
|
||||
iIndex = pLB -> FindStringExact( -1, _p_oNamesList -> GetName() );
|
||||
if( iIndex != LB_ERR )
|
||||
pLB -> SetCurSel( iIndex );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Get Zone Type
|
||||
// ----------------------------------------------------------------------------
|
||||
tde_ZoneType CDlgNameList::mfn_vGetZoneType()
|
||||
{
|
||||
if( M_BTZDeChecked() )
|
||||
return C_eZDe;
|
||||
else if( M_BTZDmChecked() )
|
||||
return C_eZDm;
|
||||
else if( M_BTZDdChecked() )
|
||||
return C_eZDd;
|
||||
else if( M_BTZDrChecked() )
|
||||
return C_eZDr;
|
||||
else
|
||||
return C_eError;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Fill ListBox
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgNameList::mfn_vSetZoneType(tde_ZoneType _eType)
|
||||
{
|
||||
M_BTZDm() -> SetCheck( _eType == C_eZDm );
|
||||
M_BTZDd() -> SetCheck( _eType == C_eZDd );
|
||||
M_BTZDe() -> SetCheck( _eType == C_eZDe );
|
||||
M_BTZDr() -> SetCheck( _eType == C_eZDr );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Fill ListBox
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgNameList::mfn_vFillLBNames(CPA_Family * _p_oFamily, tde_ZoneType _eZone)
|
||||
{
|
||||
CListBox *pLB = M_LBNames();
|
||||
|
||||
pLB -> ResetContent();
|
||||
|
||||
if( _p_oFamily )
|
||||
{
|
||||
CPA_List<CPA_BaseObject> oList;
|
||||
|
||||
switch( _eZone )
|
||||
{
|
||||
case C_eZDe:
|
||||
_p_oFamily -> GetMainWorld() -> fn_lFindObjects( &oList, "", C_szZDeNameListType, _p_oFamily);
|
||||
break;
|
||||
case C_eZDm:
|
||||
_p_oFamily -> GetMainWorld() -> fn_lFindObjects( &oList, "", C_szZDmNameListType, _p_oFamily);
|
||||
break;
|
||||
case C_eZDd:
|
||||
_p_oFamily -> GetMainWorld() -> fn_lFindObjects( &oList, "", C_szZDdNameListType, _p_oFamily);
|
||||
break;
|
||||
case C_eZDr:
|
||||
_p_oFamily -> GetMainWorld() -> fn_lFindObjects( &oList, "", C_szZDrNameListType, _p_oFamily);
|
||||
break;
|
||||
case C_eError:
|
||||
break;
|
||||
}
|
||||
|
||||
POSITION xPos = oList . GetHeadPosition();
|
||||
while( xPos )
|
||||
{
|
||||
CPA_tdoNameList *p_oNameList = (CPA_tdoNameList*) oList . GetNext( xPos );
|
||||
int iIndex = pLB -> AddString( p_oNameList -> GetName() );
|
||||
if( iIndex != LB_ERR )
|
||||
pLB -> SetItemData( iIndex, (DWORD) p_oNameList );
|
||||
}
|
||||
}
|
||||
}
|
92
Rayman_X/cpa/tempgrp/TAc/src/DlgNwSt.cpp
Normal file
92
Rayman_X/cpa/tempgrp/TAc/src/DlgNwSt.cpp
Normal file
@@ -0,0 +1,92 @@
|
||||
// DlgNwSt.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "DlgNwSt.hpp"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
#define M_BtNormal() ( (CButton*)GetDlgItem( ID_RB_NORMAL ) )
|
||||
#define M_BtTransition() ( (CButton*)GetDlgItem( ID_RB_TRANSITIONAL ) )
|
||||
#define M_EditName() ( (CEdit*) GetDlgItem( IDC_EDIT_TEXT ) )
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgNewState dialog
|
||||
|
||||
|
||||
CDlgNewState::CDlgNewState(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CDlgNewState::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgNewState)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
csName = "";
|
||||
bNormal = TRUE;
|
||||
}
|
||||
|
||||
|
||||
void CDlgNewState::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgNewState)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgNewState, CDialog)
|
||||
//{{AFX_MSG_MAP(CDlgNewState)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgNewState message handlers
|
||||
|
||||
void CDlgNewState::OnOK()
|
||||
{
|
||||
// TODO: Add extra validation here
|
||||
M_EditName() -> GetWindowText( csName );
|
||||
if( !csName.IsEmpty() )
|
||||
{
|
||||
bNormal = ( M_BtNormal() -> GetCheck() ? TRUE : FALSE );
|
||||
CDialog::OnOK();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL CDlgNewState::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
CRect oRect;
|
||||
CSize oScreenSize( GetSystemMetrics( SM_CXSCREEN ), GetSystemMetrics( SM_CYSCREEN ) ) ;
|
||||
|
||||
GetClientRect(&oRect);
|
||||
oRect += m_xPoint;
|
||||
// dialog must be in screen
|
||||
if ( oRect . right >= oScreenSize . cx )
|
||||
{
|
||||
oRect . OffsetRect ( -(oRect . right - oScreenSize . cx + 10), 0 );
|
||||
}
|
||||
if ( oRect . bottom >= oScreenSize . cy )
|
||||
{
|
||||
oRect . OffsetRect ( 0, -(oRect . bottom - oScreenSize . cy + 10) );
|
||||
}
|
||||
MoveWindow( &oRect ) ;
|
||||
|
||||
M_EditName() -> SetWindowText( csName );
|
||||
M_BtNormal() -> SetCheck( bNormal );
|
||||
M_BtTransition() -> SetCheck( !bNormal );
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
void CDlgNewState::SetPos(POINT *_pPoint)
|
||||
{
|
||||
memcpy ( &m_xPoint, _pPoint, sizeof POINT ) ;
|
||||
}
|
242
Rayman_X/cpa/tempgrp/TAc/src/DlgSelect.cpp
Normal file
242
Rayman_X/cpa/tempgrp/TAc/src/DlgSelect.cpp
Normal file
@@ -0,0 +1,242 @@
|
||||
// DlgSelect.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "TFa.h"
|
||||
|
||||
#include "DlgSelect.hpp"
|
||||
|
||||
#include "..\Main\Inc\_EditID.h"
|
||||
#include "TUT.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// MACRO
|
||||
|
||||
#define M_LB() ((CListBox*)GetDlgItem(IDC_LBOX))
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgSelection dialog
|
||||
|
||||
|
||||
CDlgSelection::CDlgSelection(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CDlgSelection::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgSelection)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
m_p_oFamily = NULL;
|
||||
m_oListOfSelectedObjects . RemoveAll();
|
||||
}
|
||||
|
||||
|
||||
void CDlgSelection::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgSelection)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgSelection, CDialog)
|
||||
//{{AFX_MSG_MAP(CDlgSelection)
|
||||
ON_WM_DESTROY()
|
||||
ON_WM_DRAWITEM()
|
||||
ON_LBN_DBLCLK(IDC_LBOX, OnDblclkLbox)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgSelection message handlers
|
||||
|
||||
void CDlgSelection::OnDestroy()
|
||||
{
|
||||
// unregister controls
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vUnregisterControlID( IDC_LBOX );
|
||||
TUT_M_vUnregisterControlID( IDOK );
|
||||
TUT_M_vUnregisterControlID( IDCANCEL );
|
||||
//
|
||||
CDialog::OnDestroy();
|
||||
}
|
||||
void CDlgSelection::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS)
|
||||
{
|
||||
// TODO: Add your message handler code here and/or call default
|
||||
if ( (nIDCtl == IDC_LBOX) && (M_LB()->IsWindowEnabled() ) && (lpDIS->itemID != LB_ERR) )
|
||||
{
|
||||
OnDrawItemListBox( lpDIS );
|
||||
}
|
||||
else
|
||||
CDialog::OnDrawItem(nIDCtl, lpDIS);
|
||||
}
|
||||
|
||||
BOOL CDlgSelection::PreTranslateMessage(MSG* pMsg)
|
||||
{
|
||||
// TODO: Add your specialized code here and/or call the base class
|
||||
|
||||
return CDialog::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
BOOL CDlgSelection::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// register controls
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vRegisterControlID( IDC_LBOX, "TAC_SELSTATES_LIST", TUT_e_ListBox);
|
||||
TUT_M_vRegisterControlID( IDOK, "TAC_SELSTATES_OK", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDCANCEL, "TAC_SELSTATES_CANCEL",TUT_e_Button );
|
||||
//
|
||||
|
||||
if( m_p_oFamily )
|
||||
mfn_vFillListBox();
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
void CDlgSelection::OnDblclkLbox()
|
||||
{
|
||||
CListBox *pLB = M_LB();
|
||||
BOOL bOutside;
|
||||
int iIndex;
|
||||
|
||||
// search item under cursor
|
||||
CPoint oPoint;
|
||||
|
||||
GetCursorPos( &oPoint );
|
||||
pLB -> ScreenToClient( &oPoint );
|
||||
|
||||
iIndex = pLB->ItemFromPoint(oPoint, bOutside ) ;
|
||||
if( ! bOutside && ( iIndex != LB_ERR ) )
|
||||
{
|
||||
BOOL bSelState = (BOOL) pLB -> GetSel( iIndex ) ;
|
||||
CPA_State *p_oState = (CPA_State*) pLB -> GetItemData( iIndex );
|
||||
CPA_Action *p_oAction = p_oState -> mfn_p_oGetAction();
|
||||
int iBegin = iIndex - 1;
|
||||
int iEnd = iIndex + 1;
|
||||
|
||||
while( (iBegin > 0) && ( ((CPA_State*) pLB -> GetItemData( iBegin ))-> mfn_p_oGetAction() == p_oAction ) )
|
||||
{
|
||||
iBegin--;
|
||||
}
|
||||
iBegin++;
|
||||
|
||||
while( (iEnd < pLB -> GetCount() ) && ( ((CPA_State*) pLB -> GetItemData( iEnd ))-> mfn_p_oGetAction() == p_oAction ) )
|
||||
{
|
||||
iEnd++;
|
||||
}
|
||||
iEnd--;
|
||||
pLB -> SelItemRange( bSelState, iBegin, iEnd );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CDlgSelection::OnCancel()
|
||||
{
|
||||
m_oListOfSelectedObjects . RemoveAll();
|
||||
CDialog::OnCancel();
|
||||
}
|
||||
|
||||
void CDlgSelection::OnOK()
|
||||
{
|
||||
// TODO: Add extra validation here
|
||||
mfn_vFillListWithSelectedObjects();
|
||||
CDialog::OnOK();
|
||||
}
|
||||
|
||||
void CDlgSelection::OnDrawItemListBox(LPDRAWITEMSTRUCT lpDIS)
|
||||
{
|
||||
CDC *pDC = CDC::FromHandle( lpDIS->hDC );
|
||||
BOOL bSelected = (lpDIS->itemState & ODS_SELECTED );
|
||||
CPA_State *p_oState = (CPA_State*)M_LB()->GetItemData( lpDIS->itemID );
|
||||
|
||||
pDC->FillSolidRect( &lpDIS->rcItem, GetSysColor( COLOR_WINDOW ));
|
||||
|
||||
pDC->SetBkMode( TRANSPARENT);
|
||||
pDC->SetTextColor( GetSysColor( COLOR_WINDOWTEXT ) );
|
||||
|
||||
// display action name
|
||||
lpDIS->rcItem.left += 2;
|
||||
pDC->DrawText( p_oState -> mfn_p_oGetAction() -> GetName(), &lpDIS->rcItem, DT_SINGLELINE | DT_LEFT | DT_VCENTER );
|
||||
// display state name
|
||||
lpDIS->rcItem.right -= 2;
|
||||
pDC->DrawText( p_oState -> GetName(), &lpDIS->rcItem, DT_SINGLELINE | DT_RIGHT | DT_VCENTER );
|
||||
|
||||
lpDIS->rcItem.left -= 2;
|
||||
lpDIS->rcItem.right += 2;
|
||||
|
||||
if (bSelected)
|
||||
pDC->InvertRect( &lpDIS->rcItem );
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgSelection owner methods
|
||||
void CDlgSelection::mfn_vSetFamily(CPA_Family *_p_oFamily)
|
||||
{
|
||||
m_p_oFamily = _p_oFamily;
|
||||
}
|
||||
|
||||
void CDlgSelection::mfn_vFillListBox(void)
|
||||
{
|
||||
CListBox *pLB = M_LB();
|
||||
POSITION xPosAct, xPosSta;
|
||||
|
||||
pLB -> ResetContent();
|
||||
|
||||
xPosAct = m_p_oFamily -> m_oListOfActions . GetHeadPosition();
|
||||
while( xPosAct )
|
||||
{
|
||||
CPA_Action *p_oAction = m_p_oFamily -> m_oListOfActions . GetNext( xPosAct );
|
||||
//
|
||||
xPosSta = p_oAction -> m_oListOfStates . GetHeadPosition();
|
||||
while( xPosSta )
|
||||
{
|
||||
CPA_State *p_oState = p_oAction -> m_oListOfStates . GetNext( xPosSta );
|
||||
int iIndex = pLB -> AddString( p_oAction -> GetName() + " - " + p_oState -> GetName() );
|
||||
|
||||
if( iIndex != LB_ERR )
|
||||
pLB -> SetItemData( iIndex, (DWORD) p_oState );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CDlgSelection::mfn_vFillListWithSelectedObjects(void)
|
||||
{
|
||||
CListBox *pLB = M_LB();
|
||||
int iNbSel = pLB -> GetSelCount();
|
||||
|
||||
m_oListOfSelectedObjects . RemoveAll();
|
||||
|
||||
if( iNbSel > 0 )
|
||||
{
|
||||
// get selected items
|
||||
int *a_iIdxSel = (int*) malloc( iNbSel * sizeof( int ) );
|
||||
pLB -> GetSelItems( iNbSel, a_iIdxSel );
|
||||
// fill list
|
||||
for( int i=0 ; i< iNbSel ; i++ )
|
||||
{
|
||||
CPA_BaseObject* p_oState = (CPA_BaseObject*) pLB -> GetItemData( a_iIdxSel[i] );
|
||||
m_oListOfSelectedObjects . AddTail( p_oState );
|
||||
}
|
||||
free( a_iIdxSel );
|
||||
}
|
||||
}
|
||||
|
1753
Rayman_X/cpa/tempgrp/TAc/src/DlgState.cpp
Normal file
1753
Rayman_X/cpa/tempgrp/TAc/src/DlgState.cpp
Normal file
File diff suppressed because it is too large
Load Diff
866
Rayman_X/cpa/tempgrp/TAc/src/DlgZA.cpp
Normal file
866
Rayman_X/cpa/tempgrp/TAc/src/DlgZA.cpp
Normal file
@@ -0,0 +1,866 @@
|
||||
// DlgZA.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "OAc.h"
|
||||
|
||||
#include "ACInterf.hpp"
|
||||
|
||||
#include "DlgZA.hpp"
|
||||
#include "DLGZALst.hpp"
|
||||
#include "DlgInput.hpp"
|
||||
#include "ZAModif.hpp"
|
||||
#include "FAModif.hpp"
|
||||
|
||||
#include "..\Main\Inc\_EditID.h"
|
||||
#include "TUT.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// MACROS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define M_Control( CType, nID) ( ( CType*) GetDlgItem( nID ) )
|
||||
#define M_LB( nID ) M_Control( CListBox, nID )
|
||||
#define M_BT( nID ) M_Control( CButton, nID )
|
||||
|
||||
#define M_Enable( nID, bEnable ) GetDlgItem( nID ) -> EnableWindow( bEnable )
|
||||
#define M_bEnabled( nID ) GetDlgItem( nID ) -> IsWindowEnabled()
|
||||
|
||||
#define M_LBZA() M_LB( IDC_LIST_ZA )
|
||||
#define M_LBZonesList() M_LB( IDC_LIST_ZONES )
|
||||
//#define M_BTAction() M_BT( IDC_BT_ACTION )
|
||||
|
||||
#define M_GetClientRect( pWnd, poRect ) (pWnd) -> GetWindowRect( poRect );ScreenToClient( poRect )
|
||||
#define M_GetClientRectId( Id, poRect ) M_GetClientRect( GetDlgItem( Id ), poRect )
|
||||
#define M_SetClientRect( pWnd, poRect ) (pWnd) -> MoveWindow( poRect )
|
||||
#define M_SetClientRectId( Id, poRect ) M_SetClientRect( GetDlgItem( Id ), poRect )
|
||||
|
||||
#define M_MakeDo( p_oModif ) m_p_oDLL -> M_GetEditManager() -> AskFor ( p_oModif )
|
||||
|
||||
// Popup Menu ID
|
||||
#define C_uiPMDefault 2000
|
||||
#define C_uiPMAdd (C_uiPMDefault + 1)
|
||||
#define C_uiPMCopy (C_uiPMDefault + 2)
|
||||
#define C_uiPMDel (C_uiPMDefault + 3)
|
||||
#define C_uiPMRename (C_uiPMDefault + 4)
|
||||
|
||||
#define C_iBorderSize 2
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgZonesActivation
|
||||
|
||||
IMPLEMENT_DYNCREATE(CDlgZonesActivation, CFormView)
|
||||
|
||||
CDlgZonesActivation::CDlgZonesActivation()
|
||||
: CFormView(CDlgZonesActivation::IDD)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgZonesActivation)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
m_oCrossDC.CreateCompatibleDC( NULL );
|
||||
m_oCrossBitmap.LoadBitmap( IDB_BITMAP_ALLOWED );
|
||||
m_oCrossDC.SelectObject(m_oCrossBitmap);
|
||||
// create italic font
|
||||
PLOGFONT plfItalic = (PLOGFONT) LocalAlloc(LPTR, sizeof(LOGFONT));
|
||||
lstrcpy(plfItalic->lfFaceName, "MS Sans Serif");
|
||||
plfItalic->lfItalic = TRUE;
|
||||
plfItalic->lfWeight = FW_NORMAL ;
|
||||
plfItalic->lfHeight = 8;
|
||||
plfItalic->lfEscapement = 0;
|
||||
m_oItalicFont.CreateFontIndirect(plfItalic);
|
||||
// create bold font
|
||||
PLOGFONT plf = (PLOGFONT) LocalAlloc(LPTR, sizeof(LOGFONT));
|
||||
lstrcpy(plf->lfFaceName, "MS Sans Serif");
|
||||
plf->lfWeight = FW_BOLD ;
|
||||
plf->lfHeight = 8;
|
||||
plf->lfEscapement = 0;
|
||||
m_oBoldFont.CreateFontIndirect(plf);
|
||||
//
|
||||
m_p_oDLL = NULL;
|
||||
m_p_oDlgZAList = NULL;
|
||||
m_p_oCurrentNamesList = NULL;
|
||||
m_p_oCurrentZA = NULL;
|
||||
//
|
||||
m_bFirstShow = TRUE;
|
||||
|
||||
}
|
||||
|
||||
CDlgZonesActivation::~CDlgZonesActivation()
|
||||
{
|
||||
m_oCrossDC.DeleteDC();
|
||||
m_oItalicFont.DeleteObject();
|
||||
m_oBoldFont.DeleteObject();
|
||||
}
|
||||
|
||||
void CDlgZonesActivation::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CFormView::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgZonesActivation)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
BOOL CDlgZonesActivation::Create( LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext )
|
||||
{
|
||||
BOOL bResult = CFormView::Create( lpszClassName, lpszWindowName, dwRequestedStyle, rect, pParentWnd, nID, pContext );
|
||||
// register controls
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vRegisterControlID( IDC_LIST_ZA, "TAC_ZAM_ZA_LIST", TUT_e_ListBox );
|
||||
TUT_M_vRegisterControlID( IDC_LIST_ZONES, "TAC_ZAM_ZA_LISTZONES", TUT_e_ListBox );
|
||||
TUT_M_vRegisterControlID( IDC_BT_NEW, "TAC_ZAM_ZA_BTNEW", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_RENAME, "TAC_ZAM_ZA_BTRENAME", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_COPY, "TAC_ZAM_ZA_BTCOPY", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_DELETE, "TAC_ZAM_ZA_BTDELETE", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_DEFAULT, "TAC_ZAM_ZA_BTDEFAULT", TUT_e_Button );
|
||||
//
|
||||
return bResult;
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgZonesActivation, CFormView)
|
||||
//{{AFX_MSG_MAP(CDlgZonesActivation)
|
||||
ON_WM_DESTROY()
|
||||
ON_WM_DRAWITEM()
|
||||
ON_WM_SHOWWINDOW()
|
||||
ON_LBN_SELCHANGE(IDC_LIST_ZA, OnSelchangeZAList)
|
||||
ON_BN_CLICKED(IDC_BT_NEW, OnBtAdd)
|
||||
ON_BN_CLICKED(IDC_BT_RENAME, OnBtRename)
|
||||
ON_BN_CLICKED(IDC_BT_COPY, OnBtCopy)
|
||||
ON_BN_CLICKED(IDC_BT_DELETE, OnBtDelete)
|
||||
ON_BN_CLICKED(IDC_BT_DEFAULT, OnBtDefault)
|
||||
ON_WM_SIZE()
|
||||
ON_LBN_DBLCLK(IDC_LIST_ZA, OnDblclkListZa)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgZonesActivation diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CDlgZonesActivation::AssertValid() const
|
||||
{
|
||||
CFormView::AssertValid();
|
||||
}
|
||||
|
||||
void CDlgZonesActivation::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CFormView::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgZonesActivation message handlers
|
||||
|
||||
void CDlgZonesActivation::OnDestroy()
|
||||
{
|
||||
// register controls
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vUnregisterControlID( IDC_LIST_ZA );
|
||||
TUT_M_vUnregisterControlID( IDC_LIST_ZONES );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_NEW );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_RENAME );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_COPY );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_DELETE );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_DEFAULT );
|
||||
//
|
||||
CFormView::OnDestroy();
|
||||
}
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgZonesActivation::PreTranslateMessage(MSG* pMsg)
|
||||
{
|
||||
BOOL bResult = FALSE;
|
||||
|
||||
if ( (pMsg->hwnd == GetDlgItem(IDC_LIST_ZONES)->m_hWnd) && // mouse under Zones List
|
||||
(m_p_oCurrentZA) )
|
||||
{
|
||||
if(pMsg->message == WM_LBUTTONDOWN)
|
||||
bResult = mfn_bOnLButtonDownLBZones ( pMsg ) ;
|
||||
else if(pMsg->message == WM_KEYDOWN)
|
||||
bResult = mfn_bOnKeyDownLBZones( pMsg );
|
||||
else
|
||||
bResult = CFormView::PreTranslateMessage(pMsg);
|
||||
}
|
||||
if ( (pMsg->hwnd == GetDlgItem(IDC_LIST_ZA)->m_hWnd) ) // mouse under ZA List
|
||||
{
|
||||
if(pMsg->message == WM_RBUTTONDOWN)
|
||||
bResult = mfn_bOnRButtonDownLBZA ( pMsg ) ;
|
||||
else
|
||||
bResult = CFormView::PreTranslateMessage(pMsg);
|
||||
}
|
||||
else
|
||||
bResult = CFormView::PreTranslateMessage(pMsg);
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Description : intercept the popup menu entry
|
||||
// ---------------------------------------------------------------------------*/
|
||||
BOOL CDlgZonesActivation::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case C_uiPMAdd: OnBtAdd(); break;
|
||||
case C_uiPMCopy: OnBtCopy(); break;
|
||||
case C_uiPMDel: OnBtDelete(); break;
|
||||
case C_uiPMRename: OnBtRename(); break;
|
||||
case C_uiPMDefault: OnBtDefault(); break;
|
||||
default :
|
||||
return CFormView::OnCommand(wParam, lParam);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message WM_DRAWITEM
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS)
|
||||
{
|
||||
if ( (nIDCtl == IDC_LIST_ZONES) &&
|
||||
(M_LBZonesList()->IsWindowEnabled() ) &&
|
||||
(lpDIS->itemID != LB_ERR) )
|
||||
{
|
||||
OnDrawZonesListItem( lpDIS );
|
||||
}
|
||||
else if ( (nIDCtl == IDC_LIST_ZA) &&
|
||||
(M_LBZA()->IsWindowEnabled() ) &&
|
||||
(lpDIS->itemID != LB_ERR) )
|
||||
{
|
||||
OnDrawZAListItem( lpDIS );
|
||||
}
|
||||
else
|
||||
CFormView::OnDrawItem(nIDCtl, lpDIS);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :handle function for message WM_INITDIALOG
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::OnShowWindow(BOOL bShow, UINT nStatus)
|
||||
{
|
||||
CFormView::OnShowWindow(bShow, nStatus);
|
||||
/*
|
||||
if(bShow && m_bFirstShow)
|
||||
{
|
||||
mfn_vSetCurrentNamesList( NULL );
|
||||
}
|
||||
m_bFirstShow = FALSE;
|
||||
*/
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message WM_SIZE
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
//if( cx < 300 ) cx = 300;
|
||||
//if( cy < 170 ) cy = 170;
|
||||
CFormView::OnSize(nType, cx, cy);
|
||||
|
||||
if( M_LBZA() )
|
||||
{
|
||||
CRect oRectDlg, oRectLBZA, oRectLBZn, oRectSTZn;
|
||||
CSize oSize;
|
||||
|
||||
// get current pos
|
||||
M_GetClientRect( this, &oRectDlg );
|
||||
M_GetClientRectId( IDC_LIST_ZA, &oRectLBZA );
|
||||
M_GetClientRectId( IDC_LIST_ZONES, &oRectLBZn );
|
||||
M_GetClientRectId( IDC_ST_ZONES, &oRectSTZn );
|
||||
|
||||
// minimum size
|
||||
oSize = oRectDlg . Size();
|
||||
if( cx < 350 ) oRectDlg . right = abs( oRectDlg . left ) + 350;
|
||||
if( cy < 170 ) oRectDlg . bottom = abs( oRectDlg . top ) + 170;
|
||||
|
||||
// place LBs
|
||||
oSize . cx = (oRectDlg . Width() - (C_iBorderSize<<2)) >> 1;
|
||||
|
||||
oRectLBZA . left = oRectDlg . left + C_iBorderSize;
|
||||
oRectLBZA . right = oRectLBZA . left + oSize . cx;
|
||||
oRectLBZn . right = oRectDlg . right - C_iBorderSize;
|
||||
oRectLBZn . left = oRectLBZn . right - oSize . cx;
|
||||
|
||||
oRectLBZA . bottom = oRectLBZn . bottom = oRectDlg . bottom - C_iBorderSize;
|
||||
|
||||
// place Static
|
||||
oSize = oRectSTZn . Size();
|
||||
oRectSTZn . left = oRectLBZn . left;
|
||||
oRectSTZn . right = oRectSTZn . left + oSize . cx;
|
||||
|
||||
// get current pos
|
||||
//M_SetClientRect( this, &oRectDlg );
|
||||
M_SetClientRectId( IDC_LIST_ZA, &oRectLBZA );
|
||||
M_SetClientRectId( IDC_LIST_ZONES, &oRectLBZn );
|
||||
M_SetClientRectId( IDC_ST_ZONES, &oRectSTZn );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message CBN_SELCHANGE on CB ZAList
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::OnSelchangeZAList()
|
||||
{
|
||||
if( !mfn_bVerifyNamesListCoherence( TRUE ) )
|
||||
return;
|
||||
|
||||
//
|
||||
CListBox *pLB = M_LBZA();
|
||||
int iIndex = pLB -> GetCurSel();
|
||||
|
||||
CPA_ZonesActivating *p_oZA = NULL;
|
||||
|
||||
if( iIndex != LB_ERR )
|
||||
p_oZA = (CPA_ZonesActivating*) pLB -> GetItemData( iIndex );
|
||||
|
||||
Family_StateChange *p_oZAChange = new Family_StateChange( m_p_oDLL, C_eZA, p_oZA, m_p_oCurrentZA );
|
||||
M_MakeDo( p_oZAChange );
|
||||
|
||||
mfn_vUpdateButtons();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message LBN_DBLCLK on ListBox ZA
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::OnDblclkListZa()
|
||||
{
|
||||
if( m_p_oDlgZAList && m_p_oCurrentZA )
|
||||
m_p_oDlgZAList -> mfn_vSetZA( m_p_oCurrentZA, TRUE );
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Owner handle msg functions
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message WM_DRAWITEM on List box
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::OnDrawZonesListItem( LPDRAWITEMSTRUCT lpDIS )
|
||||
{
|
||||
CDC *pDC = CDC::FromHandle( lpDIS->hDC );
|
||||
char szText[100];
|
||||
CListBox *pLB = M_LBZonesList();
|
||||
BOOL bSelected = (lpDIS->itemState & ODS_SELECTED );
|
||||
BOOL bChecked = (pLB->GetItemData( lpDIS->itemID ) ? TRUE : FALSE);
|
||||
CFont *xFntPrev;
|
||||
|
||||
pDC->FillSolidRect( &lpDIS->rcItem, GetSysColor( COLOR_WINDOW ));
|
||||
|
||||
if ( m_p_oCurrentZA )
|
||||
{
|
||||
if (bChecked)
|
||||
pDC->BitBlt( lpDIS->rcItem.left + 2, lpDIS->rcItem.top + 1, 12, 12, &m_oCrossDC, 0, 0, SRCAND );
|
||||
}
|
||||
else
|
||||
xFntPrev = pDC->SelectObject( &m_oItalicFont );
|
||||
|
||||
pDC->SetBkMode( TRANSPARENT);
|
||||
pDC->SetTextColor( GetSysColor( COLOR_WINDOWTEXT ) );
|
||||
|
||||
pLB -> GetText(lpDIS->itemID, szText ) ;
|
||||
lpDIS->rcItem.left += 16;
|
||||
pDC->DrawText( szText, strlen(szText), &lpDIS->rcItem, DT_SINGLELINE | DT_LEFT | DT_VCENTER );
|
||||
lpDIS->rcItem.left -= 1;
|
||||
if (bSelected)
|
||||
pDC->InvertRect( &lpDIS->rcItem );
|
||||
// restore font
|
||||
if ( !m_p_oCurrentZA )
|
||||
pDC->SelectObject( xFntPrev );
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message WM_DRAWITEM on List box
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::OnDrawZAListItem( LPDRAWITEMSTRUCT lpDIS )
|
||||
{
|
||||
CDC *pDC = CDC::FromHandle( lpDIS->hDC );
|
||||
CListBox *pLB = M_LBZA();
|
||||
BOOL bSelected = (lpDIS->itemState & ODS_SELECTED );
|
||||
CPA_ZonesActivating *p_oZA = (CPA_ZonesActivating*) pLB->GetItemData( lpDIS->itemID );
|
||||
CPA_BaseObject *p_oDefaultZA = ( m_p_oCurrentNamesList ? m_p_oCurrentNamesList -> m_fnp_oGetDefaultZA() : NULL );
|
||||
CFont *xFntPrev;
|
||||
char szText[100];
|
||||
|
||||
pDC->FillSolidRect( &lpDIS->rcItem, GetSysColor( COLOR_WINDOW ));
|
||||
|
||||
if ( p_oZA == p_oDefaultZA )
|
||||
xFntPrev = pDC->SelectObject( &m_oBoldFont );
|
||||
|
||||
pDC->SetBkMode( TRANSPARENT);
|
||||
pDC->SetTextColor( GetSysColor( COLOR_WINDOWTEXT ) );
|
||||
|
||||
pLB -> GetText(lpDIS->itemID, szText ) ;
|
||||
pDC->DrawText( szText, strlen(szText), &lpDIS->rcItem, DT_SINGLELINE | DT_LEFT | DT_VCENTER );
|
||||
|
||||
if (bSelected)
|
||||
pDC->InvertRect( &lpDIS->rcItem );
|
||||
// restore font
|
||||
if ( p_oZA == p_oDefaultZA )
|
||||
pDC->SelectObject( xFntPrev );
|
||||
|
||||
}
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message WM_LBUTTONDOWN on ListBox Zones
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgZonesActivation::mfn_bOnLButtonDownLBZones(MSG *pMsg)
|
||||
{
|
||||
if( !mfn_bVerifyNamesListCoherence( TRUE ) )
|
||||
return CFormView::PreTranslateMessage(pMsg);
|
||||
|
||||
//
|
||||
CListBox *pLB = M_LBZonesList();
|
||||
POINT xPos;
|
||||
CRect oRect;
|
||||
BOOL bOutside;
|
||||
int iIndex;
|
||||
BOOL bResult = TRUE;
|
||||
|
||||
xPos.x = LOWORD(pMsg->lParam);
|
||||
xPos.y = HIWORD(pMsg->lParam);
|
||||
|
||||
iIndex = pLB -> ItemFromPoint ( xPos, bOutside ) ;
|
||||
pLB -> GetItemRect ( iIndex , &oRect ) ;
|
||||
if( (oRect . PtInRect ( xPos ) ) && ( xPos.x < 16 ) )
|
||||
{
|
||||
BOOL bChecked = (pLB->GetItemData( iIndex ) ? TRUE : FALSE);
|
||||
|
||||
if( m_p_oCurrentZA )
|
||||
{
|
||||
ZA_Modify *p_oZAModif = new ZA_Modify( m_p_oDLL, m_p_oCurrentZA, iIndex, !bChecked );
|
||||
M_MakeDo( p_oZAModif ) ;
|
||||
bResult = TRUE;
|
||||
}
|
||||
else
|
||||
bResult = CFormView::PreTranslateMessage(pMsg);
|
||||
}
|
||||
else
|
||||
bResult = CFormView::PreTranslateMessage(pMsg);
|
||||
|
||||
pLB -> Invalidate();
|
||||
return bResult;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgZonesActivation::mfn_bOnKeyDownLBZones(MSG *pMsg)
|
||||
{
|
||||
if( !mfn_bVerifyNamesListCoherence( TRUE ) )
|
||||
return CFormView::PreTranslateMessage(pMsg);
|
||||
|
||||
//
|
||||
int nVirtKey = (int) pMsg -> wParam;
|
||||
CListBox *pLB = M_LBZonesList();
|
||||
int iIndex = pLB -> GetCurSel();
|
||||
BOOL bResult = TRUE;
|
||||
|
||||
if( ( nVirtKey == VK_SPACE ) && ( iIndex != LB_ERR ) && m_p_oCurrentZA )
|
||||
{
|
||||
BOOL bChecked = ( pLB->GetItemData( iIndex ) ? TRUE : FALSE );
|
||||
ZA_Modify *p_oZAModif = new ZA_Modify( m_p_oDLL, m_p_oCurrentZA, iIndex, !bChecked );
|
||||
M_MakeDo( p_oZAModif ) ;
|
||||
bResult = TRUE;
|
||||
}
|
||||
else
|
||||
bResult = CFormView::PreTranslateMessage(pMsg);
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message WM_RBUTTONDOWN on ListBox ZA
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgZonesActivation::mfn_bOnRButtonDownLBZA(MSG *pMsg)
|
||||
{
|
||||
if( !mfn_bVerifyNamesListCoherence( TRUE ) )
|
||||
return CFormView::PreTranslateMessage(pMsg);
|
||||
|
||||
//
|
||||
// create and display the context popmenu
|
||||
CMenu oPopMenu;
|
||||
POINT xPos;
|
||||
|
||||
xPos.x = LOWORD(pMsg->lParam);
|
||||
xPos.y = HIWORD(pMsg->lParam);
|
||||
// create
|
||||
oPopMenu . CreatePopupMenu () ;
|
||||
// fill
|
||||
oPopMenu . AppendMenu( MF_STRING + ( M_bEnabled( IDC_BT_NEW ) ? MF_ENABLED : MF_GRAYED ), C_uiPMAdd, "New");
|
||||
oPopMenu . AppendMenu( MF_STRING + ( M_bEnabled( IDC_BT_COPY ) ? MF_ENABLED : MF_GRAYED ), C_uiPMCopy, "Copy");
|
||||
oPopMenu . AppendMenu( MF_STRING + ( M_bEnabled( IDC_BT_RENAME ) ? MF_ENABLED : MF_GRAYED ), C_uiPMRename, "Rename");
|
||||
oPopMenu . AppendMenu( MF_STRING + ( M_bEnabled( IDC_BT_DELETE ) ? MF_ENABLED : MF_GRAYED ), C_uiPMDel, "Delete");
|
||||
oPopMenu . AppendMenu( MF_SEPARATOR );
|
||||
oPopMenu . AppendMenu( MF_STRING + ( M_bEnabled( IDC_BT_DEFAULT ) ? MF_ENABLED : MF_GRAYED ), C_uiPMDefault, "Set As Default ZA");
|
||||
|
||||
// display
|
||||
M_LBZA() -> ClientToScreen(&xPos);
|
||||
// ALX
|
||||
TUT_M_vGetTutDll ();
|
||||
TUT_M_vRegisterMenu (this -> m_hWnd , oPopMenu . m_hMenu , xPos . x , xPos . y);
|
||||
// End ALX
|
||||
oPopMenu . TrackPopupMenu ( TPM_LEFTALIGN|TPM_RIGHTBUTTON, xPos.x, xPos.y, this);
|
||||
oPopMenu . DestroyMenu ();
|
||||
return CFormView::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Owner methods
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : add a new ZA
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::OnBtAdd()
|
||||
{
|
||||
if( !mfn_bVerifyNamesListCoherence( TRUE ) )
|
||||
return;
|
||||
|
||||
//
|
||||
HINSTANCE hOldInst = AfxGetResourceHandle();
|
||||
AfxSetResourceHandle( m_p_oDLL -> GetDLLIdentity() -> hModule );
|
||||
|
||||
CDlgInputText *p_oDlgInput = new CDlgInputText();
|
||||
CRect oRect;
|
||||
M_LBZA()->GetWindowRect(&oRect);
|
||||
CPoint oPoint(oRect.left, oRect.top);
|
||||
|
||||
p_oDlgInput->SetTitle( "Create new activation" );
|
||||
p_oDlgInput->SetMessage("Activation Name :");
|
||||
p_oDlgInput->SetPos(&oPoint);
|
||||
p_oDlgInput->SetDefaultValue( C_szZATypeName );
|
||||
p_oDlgInput->SetSelect( TRUE );
|
||||
if(p_oDlgInput->DoModal() == IDOK)
|
||||
{
|
||||
ZA_New *p_oZANew = new ZA_New( m_p_oDLL, m_p_oCurrentNamesList, p_oDlgInput->GetInputText() );
|
||||
M_MakeDo( p_oZANew ) ;
|
||||
}
|
||||
delete p_oDlgInput;
|
||||
AfxSetResourceHandle( hOldInst );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : rename a ZA
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::OnBtRename()
|
||||
{
|
||||
if( !mfn_bVerifyNamesListCoherence( TRUE ) )
|
||||
return;
|
||||
|
||||
//
|
||||
CListBox *pLB = M_LBZA();
|
||||
int iIndex = pLB -> GetCurSel();
|
||||
|
||||
if( iIndex != LB_ERR )
|
||||
{
|
||||
CPA_ZonesActivating *p_oZA = (CPA_ZonesActivating*)pLB -> GetItemData( iIndex );
|
||||
|
||||
HINSTANCE hOldInst = AfxGetResourceHandle();
|
||||
AfxSetResourceHandle( m_p_oDLL -> GetDLLIdentity() -> hModule );
|
||||
|
||||
CDlgInputText *p_oDlgInput = new CDlgInputText();
|
||||
CRect oRect;
|
||||
char szTitle[200];
|
||||
char *szZAName = p_oZA->fn_p_szGetName();
|
||||
|
||||
pLB->GetWindowRect(&oRect);
|
||||
CPoint oPoint(oRect.left, oRect.top);
|
||||
sprintf(szTitle,"Rename activation \"%s\"",szZAName );
|
||||
p_oDlgInput->SetTitle(szTitle);
|
||||
p_oDlgInput->SetMessage("New Name :");
|
||||
p_oDlgInput->SetPos(&oPoint);
|
||||
p_oDlgInput->SetDefaultValue( szZAName );
|
||||
p_oDlgInput->SetSelect( TRUE );
|
||||
if(p_oDlgInput->DoModal() == IDOK)
|
||||
{
|
||||
ZA_Rename *p_oZARename = new ZA_Rename(m_p_oDLL, p_oZA, p_oDlgInput->GetInputText());
|
||||
M_MakeDo( p_oZARename ) ;
|
||||
}
|
||||
delete p_oDlgInput;
|
||||
AfxSetResourceHandle( hOldInst );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : copy current ZA
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::OnBtCopy()
|
||||
{
|
||||
if( !mfn_bVerifyNamesListCoherence( TRUE ) )
|
||||
return;
|
||||
|
||||
//
|
||||
CListBox *pLB = M_LBZA();
|
||||
int iIndex = pLB -> GetCurSel();
|
||||
|
||||
if( iIndex != LB_ERR )
|
||||
{
|
||||
ZA_Copy *p_oZACopy = new ZA_Copy( m_p_oDLL, (CPA_ZonesActivating*)pLB -> GetItemData( iIndex ) );
|
||||
M_MakeDo( p_oZACopy ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : delete current ZA
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::OnBtDelete()
|
||||
{
|
||||
if( !mfn_bVerifyNamesListCoherence( TRUE ) )
|
||||
return;
|
||||
|
||||
//
|
||||
CListBox *pLB = M_LBZA();
|
||||
int iIndex = pLB -> GetCurSel();
|
||||
|
||||
if( iIndex != LB_ERR )
|
||||
{
|
||||
ZA_Delete *p_oZADelete = new ZA_Delete(m_p_oDLL, (CPA_ZonesActivating*)pLB -> GetItemData( iIndex ));
|
||||
M_MakeDo( p_oZADelete ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : set current ZA as default ZA of current NameList
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::OnBtDefault()
|
||||
{
|
||||
if( !mfn_bVerifyNamesListCoherence( TRUE ) )
|
||||
return;
|
||||
|
||||
//
|
||||
CListBox *pLB = M_LBZA();
|
||||
int iIndex = pLB -> GetCurSel();
|
||||
|
||||
if( iIndex != LB_ERR )
|
||||
{
|
||||
ZA_Default *p_oZADefault = new ZA_Default(m_p_oDLL, (CPA_ZonesActivating*)pLB -> GetItemData( iIndex ));
|
||||
M_MakeDo( p_oZADefault ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::mfn_vSetCurrentNamesList(CPA_tdoNameList *_p_oNamesList)
|
||||
{
|
||||
CListBox *pLB = M_LBZA();
|
||||
int iIndex = -1;
|
||||
|
||||
m_p_oCurrentNamesList = _p_oNamesList;
|
||||
// fill ListBox
|
||||
mfn_vFillLBZA( m_p_oCurrentNamesList );
|
||||
mfn_vFillLBZones( m_p_oCurrentNamesList );
|
||||
// select first ZA
|
||||
m_p_oCurrentZA = NULL;
|
||||
if( pLB -> GetCount() > 0 )
|
||||
{
|
||||
iIndex = 0;
|
||||
m_p_oCurrentZA = (CPA_ZonesActivating*)pLB -> GetItemData( iIndex );
|
||||
}
|
||||
// update according to selection
|
||||
/*MM
|
||||
pLB -> SetCurSel( iIndex );
|
||||
mfn_vUpdateButtons();
|
||||
M_LBZA() -> Invalidate();
|
||||
M_LBZonesList() -> Invalidate();
|
||||
MM*/
|
||||
m_p_oDLL -> mfn_vSetCurrentZA( m_p_oCurrentZA );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::mfn_vUpdateDisplay( CPA_ZonesActivating *_p_oZA, int _iIndex )
|
||||
{
|
||||
CListBox *pLBZn = M_LBZonesList();
|
||||
CListBox *pLBZA = M_LBZA();
|
||||
|
||||
if( _p_oZA )
|
||||
{
|
||||
CPA_tdoNameList *p_oNamesList = (CPA_tdoNameList*) _p_oZA -> GetOwner();
|
||||
if( p_oNamesList != m_p_oCurrentNamesList )
|
||||
mfn_vSetCurrentNamesList( p_oNamesList );
|
||||
else
|
||||
mfn_vFillLBZA( m_p_oCurrentNamesList );
|
||||
|
||||
mfn_iSelectStringExact( pLBZA, _p_oZA -> GetName() );
|
||||
mfn_vUpdateFlags( _p_oZA );
|
||||
m_p_oCurrentZA = _p_oZA;
|
||||
//
|
||||
if( ( _iIndex >= 0 ) && ( _iIndex < pLBZn -> GetCount() ) )
|
||||
pLBZn -> SetCurSel( _iIndex );
|
||||
else
|
||||
pLBZn -> SetCurSel( -1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
pLBZn -> SetCurSel( -1 );
|
||||
mfn_vFillLBZones( m_p_oCurrentNamesList );
|
||||
m_p_oCurrentZA = _p_oZA;
|
||||
pLBZA -> SetCurSel( -1 );
|
||||
}
|
||||
/*
|
||||
if( m_p_oDlgZAList )
|
||||
m_p_oDlgZAList -> mfn_vSetZA( m_p_oCurrentZA, FALSE );
|
||||
*/
|
||||
mfn_vUpdateButtons();
|
||||
pLBZn -> Invalidate();
|
||||
pLBZA -> Invalidate();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : fill CB ZAList
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::mfn_vFillLBZA( CPA_tdoNameList *_p_oNamesList )
|
||||
{
|
||||
CListBox *pLB = M_LBZA();
|
||||
|
||||
pLB -> ResetContent();
|
||||
if ( _p_oNamesList )
|
||||
{
|
||||
// get list
|
||||
CPA_List<CPA_BaseObject> oList;
|
||||
m_p_oDLL -> fn_lFindObjects (&oList, "", C_szZATypeName, (CPA_BaseObject*)_p_oNamesList );
|
||||
// fill comboBox
|
||||
POSITION xPos = oList . GetHeadPosition();
|
||||
while ( xPos )
|
||||
{
|
||||
CPA_ZonesActivating *p_oZA = (CPA_ZonesActivating*) oList . GetNext( xPos );
|
||||
int iIndex = pLB -> AddString( p_oZA -> GetName() );
|
||||
if( iIndex != LB_ERR )
|
||||
pLB -> SetItemData( iIndex, (DWORD) p_oZA );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : fill LB Zones ( names )
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::mfn_vFillLBZones( CPA_tdoNameList *_p_oNamesList )
|
||||
{
|
||||
CListBox *pLB = M_LBZonesList();
|
||||
|
||||
pLB -> ResetContent();
|
||||
|
||||
if ( _p_oNamesList )
|
||||
{
|
||||
POSITION stPos = _p_oNamesList -> GetHeadPosition();
|
||||
while ( stPos )
|
||||
{
|
||||
tdoObjectName *p_oName = _p_oNamesList -> GetNext( stPos );
|
||||
|
||||
int iIndex = pLB -> AddString( p_oName -> GetName() );
|
||||
if( iIndex != LB_ERR )
|
||||
pLB -> SetItemData( iIndex, (DWORD) FALSE );
|
||||
}
|
||||
}
|
||||
pLB -> Invalidate();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : update flags with ZAList
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::mfn_vUpdateFlags( CPA_ZonesActivating *_p_oZA )
|
||||
{
|
||||
CListBox *pLB = M_LBZonesList();
|
||||
int iMaxIndex = pLB -> GetCount();
|
||||
|
||||
// reset flags
|
||||
for ( int iIdx = 0 ; iIdx < iMaxIndex ; iIdx++ )
|
||||
pLB -> SetItemData( iIdx, (DWORD) FALSE );
|
||||
|
||||
// update flags
|
||||
if ( _p_oZA )
|
||||
{
|
||||
POSITION stPos = _p_oZA -> m_oListOfZDxNameIdx . GetHeadPosition();
|
||||
while ( stPos )
|
||||
{
|
||||
CPA_ZdxIndex *p_oZdxIndex = _p_oZA -> m_oListOfZDxNameIdx . GetNext( stPos ) ;
|
||||
|
||||
int iIndex = (int)p_oZdxIndex -> mfn_usGetIndex();
|
||||
if( ( iIndex >= 0 ) && ( iIndex < iMaxIndex ) )
|
||||
pLB -> SetItemData( iIndex, (DWORD) TRUE );
|
||||
}
|
||||
}
|
||||
mfn_vUpdateButtons();
|
||||
pLB -> Invalidate();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZonesActivation::mfn_vUpdateButtons(void)
|
||||
{
|
||||
int iIndex = M_LBZA() -> GetCurSel();
|
||||
|
||||
M_Enable(IDC_BT_NEW, (BOOL)m_p_oCurrentNamesList );
|
||||
M_Enable(IDC_BT_COPY, (iIndex != LB_ERR) );
|
||||
M_Enable(IDC_BT_RENAME, (iIndex != LB_ERR) );
|
||||
M_Enable(IDC_BT_DELETE, (iIndex != LB_ERR) );
|
||||
if( ( iIndex != LB_ERR ) && (BOOL)m_p_oCurrentNamesList )
|
||||
{
|
||||
M_Enable(IDC_BT_DEFAULT, ( ((CPA_BaseObject*)M_LBZA()->GetItemData(iIndex)) != m_p_oCurrentNamesList -> m_fnp_oGetDefaultZA() ) );
|
||||
}
|
||||
else
|
||||
M_Enable(IDC_BT_DEFAULT, FALSE );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
int CDlgZonesActivation::mfn_iSelectStringExact(CListBox *_pLB, CString _csEntry)
|
||||
{
|
||||
|
||||
int iIndex = _pLB -> FindStringExact( -1, _csEntry );
|
||||
if( iIndex != LB_ERR )
|
||||
_pLB -> SetCurSel( iIndex );
|
||||
return iIndex;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgZonesActivation::mfn_bVerifyNamesListCoherence(BOOL _bUpdateDisplay /*=TRUE*/)
|
||||
{
|
||||
CListBox *pLB = M_LBZA();
|
||||
CPA_BaseObject *p_oZAList = m_p_oDLL -> mfn_p_oGetCurrentZAList();
|
||||
|
||||
if ( (p_oZAList) && (pLB -> GetCount() > 0) )
|
||||
{
|
||||
CPA_BaseObject *p_oZANamesList = ((CPA_BaseObject*) pLB -> GetItemData( 0 ) ) -> GetOwner();
|
||||
CPA_BaseObject *p_oZAListNamesList = p_oZAList -> GetOwner();
|
||||
|
||||
if( p_oZANamesList != p_oZAListNamesList )
|
||||
{
|
||||
if( _bUpdateDisplay )
|
||||
mfn_vSetCurrentNamesList( m_p_oDLL -> mfn_p_oGetCurrentNamesList() );
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
439
Rayman_X/cpa/tempgrp/TAc/src/DlgZAL.cpp
Normal file
439
Rayman_X/cpa/tempgrp/TAc/src/DlgZAL.cpp
Normal file
@@ -0,0 +1,439 @@
|
||||
// DlgZAL.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "TFa.h"
|
||||
#include "OAc.h"
|
||||
|
||||
#include "ACInterf.hpp"
|
||||
|
||||
#include "DlgZAL.hpp"
|
||||
#include "DlgInput.hpp"
|
||||
#include "ZAModif.hpp"
|
||||
#include "FAModif.hpp"
|
||||
|
||||
#include "X:\Cpa\Main\inc\_EditID.h"
|
||||
#include "TUT.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// MACROS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define M_LBZAList() ( (CListBox*) GetDlgItem( IDC_LB_ZALIST ) )
|
||||
|
||||
#define M_Enable( nID, bEnable ) GetDlgItem( nID ) -> EnableWindow( bEnable )
|
||||
#define M_bEnabled( nID ) GetDlgItem( nID ) -> IsWindowEnabled()
|
||||
|
||||
#define M_GetClientRect( pWnd, poRect ) (pWnd) -> GetWindowRect( poRect );ScreenToClient( poRect )
|
||||
#define M_GetClientRectId( Id, poRect ) M_GetClientRect( GetDlgItem( Id ), poRect )
|
||||
#define M_SetClientRect( pWnd, poRect ) (pWnd) -> MoveWindow( poRect )
|
||||
#define M_SetClientRectId( Id, poRect ) M_SetClientRect( GetDlgItem( Id ), poRect )
|
||||
|
||||
#define M_MakeDo( p_oModif ) m_p_oDLL -> M_GetEditManager() -> AskFor ( p_oModif )
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// CONSTANTS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define C_uiPMFirst 2000
|
||||
#define C_uiPMNew (C_uiPMFirst+1)
|
||||
#define C_uiPMCopy (C_uiPMFirst+2)
|
||||
#define C_uiPMRename (C_uiPMFirst+3)
|
||||
#define C_uiPMDelete (C_uiPMFirst+4)
|
||||
|
||||
#define C_iBorderSize 4
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgZAL
|
||||
|
||||
IMPLEMENT_DYNCREATE(CDlgZAL, CFormView)
|
||||
|
||||
CDlgZAL::CDlgZAL()
|
||||
: CFormView(CDlgZAL::IDD)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgZAL)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
m_p_oDLL = NULL;
|
||||
m_p_oCurrentNamesList = NULL;
|
||||
m_p_oCurrentZAList = NULL;
|
||||
m_bFirstShow = TRUE;
|
||||
}
|
||||
|
||||
CDlgZAL::~CDlgZAL()
|
||||
{
|
||||
}
|
||||
|
||||
void CDlgZAL::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CFormView::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgZAL)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
BOOL CDlgZAL::Create( LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext )
|
||||
{
|
||||
BOOL bResult = CFormView::Create( lpszClassName, lpszWindowName, dwRequestedStyle, rect, pParentWnd, nID, pContext );
|
||||
// register controls
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vRegisterControlID( IDC_LB_ZALIST, "TAC_ZAM_ZALIST_LIST", TUT_e_ListBox );
|
||||
TUT_M_vRegisterControlID( IDC_BT_NEW, "TAC_ZAM_ZALIST_BTNEW", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_RENAME, "TAC_ZAM_ZALIST_BTRENAME", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_COPY, "TAC_ZAM_ZALIST_BTCOPY", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_DELETE, "TAC_ZAM_ZALIST_BTDELETE", TUT_e_Button );
|
||||
//
|
||||
return bResult;
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgZAL, CFormView)
|
||||
//{{AFX_MSG_MAP(CDlgZAL)
|
||||
ON_WM_DESTROY()
|
||||
ON_WM_SIZE()
|
||||
ON_BN_CLICKED(IDC_BT_COPY, OnBtCopy)
|
||||
ON_BN_CLICKED(IDC_BT_DELETE, OnBtDelete)
|
||||
ON_BN_CLICKED(IDC_BT_NEW, OnBtNew)
|
||||
ON_BN_CLICKED(IDC_BT_RENAME, OnBtRename)
|
||||
ON_LBN_SELCHANGE(IDC_LB_ZALIST, OnSelchangeLbZalist)
|
||||
ON_WM_SHOWWINDOW()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgZAL diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CDlgZAL::AssertValid() const
|
||||
{
|
||||
CFormView::AssertValid();
|
||||
}
|
||||
|
||||
void CDlgZAL::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CFormView::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgZAL message handlers
|
||||
|
||||
void CDlgZAL::OnDestroy()
|
||||
{
|
||||
// register controls
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vUnregisterControlID( IDC_LB_ZALIST );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_NEW );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_RENAME );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_COPY );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_DELETE );
|
||||
//
|
||||
CFormView::OnDestroy();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAL::OnShowWindow(BOOL bShow, UINT nStatus)
|
||||
{
|
||||
CFormView::OnShowWindow(bShow, nStatus);
|
||||
/*
|
||||
if( m_bFirstShow && bShow )
|
||||
{
|
||||
mfn_vSetCurrentNameList( NULL );
|
||||
}
|
||||
m_bFirstShow = FALSE;
|
||||
*/
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAL::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
if( M_LBZAList() )
|
||||
{
|
||||
CRect oRectDlg, oRectBTNew, oRectBTCopy, oRectBTRename, oRectBTDelete, oRectLB;
|
||||
int iWidth;
|
||||
|
||||
// Get Pos
|
||||
M_GetClientRect( this, &oRectDlg );
|
||||
M_GetClientRectId( IDC_BT_NEW, &oRectBTNew );
|
||||
M_GetClientRectId( IDC_BT_COPY, &oRectBTCopy );
|
||||
M_GetClientRectId( IDC_BT_RENAME, &oRectBTRename );
|
||||
M_GetClientRectId( IDC_BT_DELETE, &oRectBTDelete );
|
||||
M_GetClientRectId( IDC_LB_ZALIST, &oRectLB );
|
||||
|
||||
// BTs
|
||||
oRectBTNew . left = oRectBTRename . left = oRectDlg . left + C_iBorderSize;
|
||||
oRectBTCopy . right = oRectBTDelete . right = oRectDlg . right - C_iBorderSize;
|
||||
iWidth = ((oRectDlg . Width() - (C_iBorderSize << 1) ) >> 1);
|
||||
oRectBTNew . right = oRectBTRename . right = oRectBTNew . left + iWidth;
|
||||
oRectBTCopy . left = oRectBTDelete . left = oRectBTCopy . right - iWidth;
|
||||
|
||||
// LB
|
||||
oRectLB . left = oRectDlg . left + C_iBorderSize;
|
||||
oRectLB . right = oRectDlg . right - C_iBorderSize;
|
||||
oRectLB . bottom = oRectDlg . bottom - C_iBorderSize;
|
||||
|
||||
// Set Pos
|
||||
M_SetClientRectId( IDC_BT_NEW, &oRectBTNew );
|
||||
M_SetClientRectId( IDC_BT_COPY, &oRectBTCopy );
|
||||
M_SetClientRectId( IDC_BT_RENAME, &oRectBTRename );
|
||||
M_SetClientRectId( IDC_BT_DELETE, &oRectBTDelete );
|
||||
M_SetClientRectId( IDC_LB_ZALIST, &oRectLB );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgZAL::PreTranslateMessage(MSG* pMsg)
|
||||
{
|
||||
if( (pMsg->hwnd == GetDlgItem(IDC_LB_ZALIST)->m_hWnd) && (pMsg->message == WM_RBUTTONDOWN) )
|
||||
{
|
||||
// create and display the context popmenu
|
||||
CMenu oPopMenu;
|
||||
POINT xPos;
|
||||
|
||||
xPos.x = LOWORD(pMsg->lParam);
|
||||
xPos.y = HIWORD(pMsg->lParam);
|
||||
// create
|
||||
oPopMenu . CreatePopupMenu () ;
|
||||
// fill
|
||||
oPopMenu . AppendMenu( MF_STRING + ( M_bEnabled( IDC_BT_NEW ) ? MF_ENABLED : MF_GRAYED ), C_uiPMNew, "New");
|
||||
oPopMenu . AppendMenu( MF_STRING + ( M_bEnabled( IDC_BT_COPY ) ? MF_ENABLED : MF_GRAYED ), C_uiPMCopy, "Copy");
|
||||
oPopMenu . AppendMenu( MF_STRING + ( M_bEnabled( IDC_BT_RENAME ) ? MF_ENABLED : MF_GRAYED ), C_uiPMRename, "Rename");
|
||||
oPopMenu . AppendMenu( MF_STRING + ( M_bEnabled( IDC_BT_DELETE ) ? MF_ENABLED : MF_GRAYED ), C_uiPMDelete, "Delete");
|
||||
// display
|
||||
M_LBZAList() -> ClientToScreen(&xPos);
|
||||
TUT_M_vGetTutDll ();
|
||||
TUT_M_vRegisterMenu (this -> m_hWnd , oPopMenu . m_hMenu , xPos . x , xPos . y);
|
||||
oPopMenu . TrackPopupMenu ( TPM_LEFTALIGN|TPM_RIGHTBUTTON, xPos.x, xPos.y, this);
|
||||
oPopMenu . DestroyMenu ();
|
||||
}
|
||||
return CFormView::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgZAL::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case C_uiPMNew: OnBtNew(); break;
|
||||
case C_uiPMRename: OnBtRename(); break;
|
||||
case C_uiPMCopy: OnBtCopy(); break;
|
||||
case C_uiPMDelete: OnBtDelete(); break;
|
||||
default :
|
||||
return CFormView::OnCommand(wParam, lParam);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAL::OnBtCopy()
|
||||
{
|
||||
if( m_p_oCurrentZAList )
|
||||
{
|
||||
ZAList_Copy *p_oZAListCopy = new ZAList_Copy( m_p_oDLL, m_p_oCurrentZAList );
|
||||
M_MakeDo( p_oZAListCopy );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAL::OnBtDelete()
|
||||
{
|
||||
if( m_p_oCurrentZAList )
|
||||
{
|
||||
ZAList_Delete *p_oZAListDelete = new ZAList_Delete( m_p_oDLL, m_p_oCurrentZAList );
|
||||
M_MakeDo( p_oZAListDelete );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAL::OnBtNew()
|
||||
{
|
||||
HINSTANCE hOldInst = AfxGetResourceHandle();
|
||||
AfxSetResourceHandle( m_p_oDLL -> GetDLLIdentity() -> hModule );
|
||||
|
||||
CDlgInputText *p_oDlgInput = new CDlgInputText();
|
||||
CRect oRect;
|
||||
|
||||
M_LBZAList() -> GetWindowRect( &oRect );
|
||||
CPoint oPoint( oRect.left, oRect.top );
|
||||
|
||||
p_oDlgInput -> SetTitle( "Create new list" );
|
||||
p_oDlgInput -> SetMessage( "New List Name :" );
|
||||
p_oDlgInput -> SetPos( &oPoint );
|
||||
p_oDlgInput -> SetDefaultValue( C_szZAListTypeName );
|
||||
p_oDlgInput -> SetSelect( TRUE );
|
||||
if( p_oDlgInput -> DoModal() == IDOK )
|
||||
{
|
||||
ZAList_New *p_oNewZAList = new ZAList_New( m_p_oDLL, m_p_oCurrentNamesList, p_oDlgInput -> GetInputText() );
|
||||
M_MakeDo( p_oNewZAList ) ;
|
||||
}
|
||||
delete p_oDlgInput;
|
||||
AfxSetResourceHandle( hOldInst );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAL::OnBtRename()
|
||||
{
|
||||
if( m_p_oCurrentZAList )
|
||||
{
|
||||
HINSTANCE hOldInst = AfxGetResourceHandle();
|
||||
AfxSetResourceHandle( m_p_oDLL -> GetDLLIdentity() -> hModule );
|
||||
|
||||
CDlgInputText *p_oDlgInput = new CDlgInputText();
|
||||
CRect oRect;
|
||||
char szTitle[200];
|
||||
char *szZAListName = m_p_oCurrentZAList -> fn_p_szGetName();
|
||||
|
||||
M_LBZAList() -> GetWindowRect( &oRect );
|
||||
CPoint oPoint( oRect.left, oRect.top );
|
||||
sprintf( szTitle, "Rename List \"%s\"", szZAListName );
|
||||
p_oDlgInput -> SetTitle( szTitle );
|
||||
p_oDlgInput -> SetMessage( "New Name :" );
|
||||
p_oDlgInput -> SetPos( &oPoint );
|
||||
p_oDlgInput -> SetDefaultValue( szZAListName );
|
||||
p_oDlgInput -> SetSelect( TRUE );
|
||||
if( p_oDlgInput -> DoModal() == IDOK )
|
||||
{
|
||||
ZAList_Rename *p_oZAListRename = new ZAList_Rename( m_p_oDLL, m_p_oCurrentZAList, p_oDlgInput->GetInputText() );
|
||||
M_MakeDo( p_oZAListRename );
|
||||
}
|
||||
delete p_oDlgInput;
|
||||
AfxSetResourceHandle( hOldInst );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAL::OnSelchangeLbZalist()
|
||||
{
|
||||
CListBox *pLB = M_LBZAList();
|
||||
int iIndex = pLB -> GetCurSel();
|
||||
|
||||
if( iIndex != LB_ERR )
|
||||
{
|
||||
Family_StateChange *p_oZAListChange = new Family_StateChange( m_p_oDLL, C_eZAList, (CPA_ZonesActivatingList*) pLB -> GetItemData( iIndex ), m_p_oCurrentZAList );
|
||||
M_MakeDo( p_oZAListChange );
|
||||
}
|
||||
else
|
||||
m_p_oCurrentZAList = NULL;
|
||||
|
||||
mfn_vUpdateButtons();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAL::mfn_vSetCurrentNameList(CPA_tdoNameList * _p_oNameList)
|
||||
{
|
||||
CListBox *pLB = M_LBZAList();
|
||||
|
||||
m_p_oCurrentNamesList = _p_oNameList;
|
||||
mfn_vFillLBZAList( m_p_oCurrentNamesList );
|
||||
// select first item
|
||||
if( pLB -> GetCount() > 0 )
|
||||
m_p_oDLL -> mfn_vSetCurrentZAList( (CPA_ZonesActivatingList*) pLB -> GetItemData( 0 ) );
|
||||
else
|
||||
m_p_oDLL -> mfn_vSetCurrentZAList( NULL );
|
||||
/*MM
|
||||
mfn_vSetCurrentZAList( NULL );
|
||||
mfn_vUpdateButtons();
|
||||
MM*/
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAL::mfn_vSetCurrentZAList(CPA_ZonesActivatingList * _p_oZAList)
|
||||
{
|
||||
if( _p_oZAList )
|
||||
{
|
||||
m_p_oCurrentNamesList = (CPA_tdoNameList *) _p_oZAList -> GetOwner();
|
||||
mfn_vFillLBZAList( m_p_oCurrentNamesList );
|
||||
mfn_iSelectStringExact( M_LBZAList(), _p_oZAList -> GetName() );
|
||||
m_p_oCurrentZAList = _p_oZAList;
|
||||
}
|
||||
else
|
||||
{
|
||||
M_LBZAList() -> SetCurSel( -1 );
|
||||
m_p_oCurrentZAList = NULL;
|
||||
}
|
||||
mfn_vUpdateButtons();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAL::mfn_vFillLBZAList(CPA_tdoNameList * _p_oNameList)
|
||||
{
|
||||
CListBox *pLB = M_LBZAList();
|
||||
|
||||
pLB -> ResetContent();
|
||||
|
||||
if ( _p_oNameList )
|
||||
{
|
||||
// get list
|
||||
CPA_List<CPA_BaseObject> oList;
|
||||
m_p_oDLL -> fn_lFindObjects (&oList, "", C_szZAListTypeName, (CPA_BaseObject*)_p_oNameList );
|
||||
// fill comboBox
|
||||
POSITION xPos = oList . GetHeadPosition();
|
||||
while ( xPos )
|
||||
{
|
||||
CPA_ZonesActivatingList *p_oZAList = (CPA_ZonesActivatingList*) oList . GetNext( xPos );
|
||||
int iIndex = pLB -> AddString( p_oZAList -> GetName() );
|
||||
if( iIndex != LB_ERR )
|
||||
pLB -> SetItemData( iIndex, (DWORD) p_oZAList );
|
||||
}
|
||||
oList . RemoveAll();
|
||||
}
|
||||
pLB -> SetCurSel( -1 );
|
||||
m_p_oCurrentZAList = NULL;
|
||||
mfn_vUpdateButtons();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAL::mfn_vUpdateButtons()
|
||||
{
|
||||
M_Enable(IDC_BT_NEW, (m_p_oCurrentNamesList != NULL) );
|
||||
M_Enable(IDC_BT_COPY, (m_p_oCurrentZAList != NULL) );
|
||||
M_Enable(IDC_BT_RENAME, (m_p_oCurrentZAList != NULL) );
|
||||
M_Enable(IDC_BT_DELETE, (m_p_oCurrentZAList != NULL) );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
int CDlgZAL::mfn_iSelectStringExact(CListBox * _pLB, CString _csName)
|
||||
{
|
||||
int iIndex = _pLB -> FindStringExact( -1, _csName );
|
||||
if( iIndex != LB_ERR )
|
||||
_pLB -> SetCurSel( iIndex );
|
||||
return iIndex;
|
||||
}
|
554
Rayman_X/cpa/tempgrp/TAc/src/DlgZALst.cpp
Normal file
554
Rayman_X/cpa/tempgrp/TAc/src/DlgZALst.cpp
Normal file
@@ -0,0 +1,554 @@
|
||||
// DlgZALst.cpp : implementation file
|
||||
//
|
||||
|
||||
//#undef _DEBUG
|
||||
#include "stdafx.h"
|
||||
//#define _DEBUG
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "TFa.h"
|
||||
#include "OAc.h"
|
||||
|
||||
#include "ACInterf.hpp"
|
||||
|
||||
#include "DlgInput.hpp"
|
||||
#include "DlgZALst.hpp"
|
||||
#include "DlgZA.hpp"
|
||||
#include "ZAModif.hpp"
|
||||
#include "FAModif.hpp"
|
||||
|
||||
#include "..\Main\Inc\_EditID.h"
|
||||
#include "TUT.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// MACROS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define M_BT( nID ) ( (CButton*) GetDlgItem( nID ) )
|
||||
#define M_BTExtAction() M_BT( IDC_BT_EXTENDACTION )
|
||||
#define M_BTExtFamily() M_BT( IDC_BT_EXTENDFAMILY )
|
||||
//#define M_BTAction() M_BT( IDC_BT_ACT )
|
||||
|
||||
#define M_LBStates() ( (CListBox*) GetDlgItem( IDC_LB_STATES ) )
|
||||
|
||||
#define M_Enable( nID, bEnable ) GetDlgItem( nID ) -> EnableWindow( bEnable )
|
||||
|
||||
#define M_GetClientRect( pWnd, poRect ) (pWnd) -> GetWindowRect( poRect );ScreenToClient( poRect )
|
||||
#define M_GetClientRectId( Id, poRect ) M_GetClientRect( GetDlgItem( Id ), poRect )
|
||||
#define M_SetClientRect( pWnd, poRect ) (pWnd) -> MoveWindow( poRect )
|
||||
#define M_SetClientRectId( Id, poRect ) M_SetClientRect( GetDlgItem( Id ), poRect )
|
||||
|
||||
#define M_MakeDo( p_oModif ) m_p_oDLL -> M_GetEditManager() -> AskFor ( p_oModif )
|
||||
|
||||
// Popup Menu ID
|
||||
#define C_uiPMDefault 2000
|
||||
#define C_uiPMExtendAction (C_uiPMDefault + 1)
|
||||
#define C_uiPMExtendFamily (C_uiPMDefault + 2)
|
||||
#define C_uiPMZA (C_uiPMDefault + 10) // must be the greater
|
||||
|
||||
#define C_iBorderSize 4
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgZAList dialog
|
||||
|
||||
IMPLEMENT_DYNCREATE(CDlgZAList, CFormView)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : constructor
|
||||
// ----------------------------------------------------------------------------
|
||||
CDlgZAList::CDlgZAList()
|
||||
: CFormView(CDlgZAList::IDD)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CDlgZAList)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
m_p_oDLL = NULL;
|
||||
m_p_oCurrentZAList = NULL;
|
||||
m_p_oCurrentZA = NULL;
|
||||
m_bFirstShow = TRUE;
|
||||
m_p_oDlgZA = NULL;
|
||||
m_p_oCurrentAction = NULL;
|
||||
m_oListOfSelectedStates . RemoveAll();
|
||||
//
|
||||
m_oListOfZA . RemoveAll();
|
||||
}
|
||||
|
||||
|
||||
void CDlgZAList::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CFormView::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgZAList)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
BOOL CDlgZAList::Create( LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
||||
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
||||
CCreateContext* pContext )
|
||||
{
|
||||
BOOL bResult = CFormView::Create( lpszClassName, lpszWindowName, dwRequestedStyle, rect, pParentWnd, nID, pContext );
|
||||
// register controls
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vRegisterControlID( IDC_LB_STATES, "TAC_ZAM_ZALISTCONTENTS_LIST", TUT_e_ListBox );
|
||||
TUT_M_vRegisterControlID( IDC_BT_EXTENDACTION, "TAC_ZAM_ZALISTCONTENTS_BTEXTENDACTION", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDC_BT_EXTENDFAMILY, "TAC_ZAM_ZALISTCONTENTS_BTEXTENDFAMILY", TUT_e_Button );
|
||||
//
|
||||
return bResult;
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgZAList, CFormView)
|
||||
//{{AFX_MSG_MAP(CDlgZAList)
|
||||
ON_WM_DESTROY()
|
||||
ON_BN_CLICKED(IDC_BT_EXTENDACTION, OnBtExtendaction)
|
||||
ON_BN_CLICKED(IDC_BT_EXTENDFAMILY, OnBtExtendfamily)
|
||||
ON_WM_SHOWWINDOW()
|
||||
ON_WM_SIZE()
|
||||
ON_WM_DRAWITEM()
|
||||
ON_LBN_SELCHANGE(IDC_LB_STATES, OnSelchangeLbStates)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgZAList message handlers
|
||||
|
||||
void CDlgZAList::OnDestroy()
|
||||
{
|
||||
// register controls
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vUnregisterControlID( IDC_LB_STATES );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_EXTENDACTION );
|
||||
TUT_M_vUnregisterControlID( IDC_BT_EXTENDFAMILY );
|
||||
//
|
||||
CFormView::OnDestroy();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Description : intercept the popup menu entry
|
||||
// ---------------------------------------------------------------------------*/
|
||||
BOOL CDlgZAList::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
int iIndexZA;
|
||||
POSITION xPos;
|
||||
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case C_uiPMExtendAction:
|
||||
OnBtExtendaction();
|
||||
break;
|
||||
case C_uiPMExtendFamily:
|
||||
OnBtExtendfamily();
|
||||
break;
|
||||
default :
|
||||
iIndexZA = LOWORD(wParam) - C_uiPMZA;
|
||||
if( ( iIndexZA >= 0 ) && ( iIndexZA < m_oListOfZA . GetCount() ) )
|
||||
{
|
||||
xPos = m_oListOfZA . FindIndex( iIndexZA );
|
||||
if( xPos )
|
||||
mfn_vSetZA( (CPA_ZonesActivating*)m_oListOfZA . GetAt( xPos ), TRUE );
|
||||
}
|
||||
else
|
||||
return CFormView::OnCommand(wParam, lParam);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg WM_SHOWWINDOW
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::OnShowWindow(BOOL bShow, UINT nStatus)
|
||||
{
|
||||
CFormView::OnShowWindow(bShow, nStatus);
|
||||
/*
|
||||
if(bShow && m_bFirstShow)
|
||||
{
|
||||
mfn_vSetCurrentNamesList( NULL );
|
||||
mfn_vAddAction( NULL, TRUE );
|
||||
}
|
||||
m_bFirstShow = FALSE;
|
||||
*/
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg WM_SIZE
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
if( M_LBStates() )
|
||||
{
|
||||
CRect oRectDlg, oRectLB, oRectBTExtendAction, oRectBTExtendFamily;
|
||||
CSize oSize;
|
||||
|
||||
// get current pos
|
||||
M_GetClientRect( this, &oRectDlg );
|
||||
M_GetClientRectId( IDC_LB_STATES, &oRectLB );
|
||||
M_GetClientRectId( IDC_BT_EXTENDACTION, &oRectBTExtendAction );
|
||||
M_GetClientRectId( IDC_BT_EXTENDFAMILY, &oRectBTExtendFamily );
|
||||
|
||||
// place BTs Extend
|
||||
oSize = oRectBTExtendAction . Size();
|
||||
oSize . cx = (oRectDlg . Width() - C_iBorderSize * 3) / 2;
|
||||
|
||||
oRectBTExtendAction . bottom = oRectBTExtendFamily . bottom = oRectDlg . bottom - C_iBorderSize;
|
||||
oRectBTExtendAction . top = oRectBTExtendFamily . top = oRectBTExtendFamily . bottom - oSize . cy;
|
||||
|
||||
oRectBTExtendAction . left = oRectDlg . left + C_iBorderSize;
|
||||
oRectBTExtendFamily . right = oRectDlg . right - C_iBorderSize;
|
||||
|
||||
oRectBTExtendAction . right = oRectBTExtendAction . left + oSize . cx;
|
||||
oRectBTExtendFamily . left = oRectBTExtendFamily . right - oSize . cx;
|
||||
|
||||
// place LB
|
||||
oRectLB . right = oRectBTExtendFamily . right;
|
||||
oRectLB . bottom = max( oRectLB . top, oRectBTExtendAction . top - (C_iBorderSize<<1) );
|
||||
|
||||
// set current pos
|
||||
M_SetClientRectId( IDC_LB_STATES, &oRectLB );
|
||||
M_SetClientRectId( IDC_BT_EXTENDACTION, &oRectBTExtendAction );
|
||||
M_SetClientRectId( IDC_BT_EXTENDFAMILY, &oRectBTExtendFamily );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Translate all messages
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgZAList::PreTranslateMessage(MSG* pMsg)
|
||||
{
|
||||
if( ( pMsg->hwnd == GetDlgItem(IDC_LB_STATES)->m_hWnd ) &&
|
||||
( pMsg -> message == WM_RBUTTONDOWN ) )
|
||||
{
|
||||
return OnRButtonDownLbStates( pMsg );
|
||||
}
|
||||
|
||||
return CFormView::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg WM_DRAWITEM
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS)
|
||||
{
|
||||
if ( (nIDCtl == IDC_LB_STATES) &&
|
||||
(M_LBStates()->IsWindowEnabled() ) &&
|
||||
(lpDIS->itemID != LB_ERR) )
|
||||
{
|
||||
OnDrawListItem( lpDIS );
|
||||
}
|
||||
else
|
||||
CFormView::OnDrawItem(nIDCtl, lpDIS);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg WM_RBUTTONDOWN on ListBox
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL CDlgZAList::OnRButtonDownLbStates(MSG* pMsg)
|
||||
{
|
||||
UINT nFlags = MF_STRING + ( (m_p_oCurrentZAList != NULL) && !m_oListOfSelectedStates . IsEmpty() ? MF_ENABLED : MF_GRAYED );
|
||||
POINT xPoint;
|
||||
CMenu oPopupMenu ;
|
||||
POSITION xPos;
|
||||
int iIndex;
|
||||
|
||||
// fill list of ZA
|
||||
m_oListOfZA . RemoveAll();
|
||||
if( m_p_oCurrentZAList != NULL )
|
||||
{
|
||||
m_p_oDLL -> fn_lFindObjects (&m_oListOfZA, "", C_szZATypeName, (CPA_BaseObject*)m_p_oCurrentZAList->GetOwner() );
|
||||
}
|
||||
// fill Menu
|
||||
xPoint.x = LOWORD(pMsg->lParam);
|
||||
xPoint.y = HIWORD(pMsg->lParam);
|
||||
|
||||
// create popup menu
|
||||
oPopupMenu . CreatePopupMenu () ;
|
||||
// fill menu
|
||||
oPopupMenu . AppendMenu( MF_STRING + (M_BTExtAction() -> IsWindowEnabled() ? MF_ENABLED : MF_GRAYED ), C_uiPMExtendAction, "Extend To Action" );
|
||||
oPopupMenu . AppendMenu( MF_STRING + (M_BTExtFamily() -> IsWindowEnabled() ? MF_ENABLED : MF_GRAYED ), C_uiPMExtendFamily, "Extend To Family" );
|
||||
if( m_oListOfZA . GetCount() > 0 )
|
||||
oPopupMenu . AppendMenu( MF_SEPARATOR );
|
||||
xPos = m_oListOfZA . GetHeadPosition();
|
||||
iIndex = 0;
|
||||
while( xPos )
|
||||
{
|
||||
CPA_BaseObject *p_oZA = m_oListOfZA . GetNext( xPos );
|
||||
oPopupMenu . AppendMenu( nFlags , C_uiPMZA + iIndex , (char*)(LPCTSTR)p_oZA -> GetName() ) ;
|
||||
iIndex++;
|
||||
}
|
||||
// display menu
|
||||
M_LBStates() -> ClientToScreen(&xPoint);
|
||||
// ALX
|
||||
TUT_M_vGetTutDll ();
|
||||
TUT_M_vRegisterMenu (this -> m_hWnd , oPopupMenu . m_hMenu , xPoint . x , xPoint . y);
|
||||
// End ALX
|
||||
oPopupMenu . TrackPopupMenu ( TPM_LEFTALIGN|TPM_RIGHTBUTTON, xPoint.x, xPoint.y, this);
|
||||
oPopupMenu . DestroyMenu ();
|
||||
|
||||
return CFormView::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg BN_CLICKED on Bt 'Extend to Action'
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::OnBtExtendaction()
|
||||
{
|
||||
if ( (m_p_oCurrentZA != NULL) && (m_p_oCurrentAction != NULL) )
|
||||
{
|
||||
ZAList_ExtendToAction *p_oZAAction = new ZAList_ExtendToAction( m_p_oDLL, m_p_oCurrentAction, m_p_oCurrentZAList, m_p_oCurrentZA, &m_oListOfSelectedStates );
|
||||
M_MakeDo( p_oZAAction ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg BN_CLICKED on Bt 'Extend to Family'
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::OnBtExtendfamily()
|
||||
{
|
||||
if ( m_p_oCurrentZA != NULL )
|
||||
{
|
||||
ZAList_ExtendToFamily *p_oZAFamily = new ZAList_ExtendToFamily( m_p_oDLL, m_p_oCurrentZAList, m_p_oCurrentZA, &m_oListOfSelectedStates );
|
||||
M_MakeDo( p_oZAFamily ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for msg CBN_SELCHANGE on CB 'Names List'
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::OnSelchangeLbStates()
|
||||
{
|
||||
CListBox *pLB = M_LBStates();
|
||||
int iNbSel = pLB -> GetSelCount();
|
||||
|
||||
// update list of selected states
|
||||
m_oListOfSelectedStates . RemoveAll();
|
||||
if( iNbSel > 0 )
|
||||
{
|
||||
int *a_iIdxSel = (int*) malloc( iNbSel * sizeof( int ) );
|
||||
pLB -> GetSelItems( iNbSel, a_iIdxSel );
|
||||
// first State, init Action and ZA
|
||||
CPA_State* p_oState = (CPA_State*) pLB -> GetItemData( a_iIdxSel[0] );
|
||||
m_oListOfSelectedStates . AddTail( p_oState );
|
||||
m_p_oCurrentAction = p_oState -> mfn_p_oGetAction();
|
||||
if( m_p_oCurrentZAList )
|
||||
m_p_oCurrentZA = m_p_oCurrentZAList -> mfn_p_oGetZAFromState( p_oState );
|
||||
// next states
|
||||
for( int i=1 ; i< iNbSel ; i++ )
|
||||
{
|
||||
CPA_State* p_oState = (CPA_State*) pLB -> GetItemData( a_iIdxSel[i] );
|
||||
m_oListOfSelectedStates . AddTail( p_oState );
|
||||
if( p_oState -> mfn_p_oGetAction() != m_p_oCurrentAction )
|
||||
m_p_oCurrentAction = NULL;
|
||||
if( m_p_oCurrentZAList && (m_p_oCurrentZA != m_p_oCurrentZAList -> mfn_p_oGetZAFromState( p_oState )) )
|
||||
m_p_oCurrentZA = NULL;
|
||||
}
|
||||
}
|
||||
// update display
|
||||
if( m_p_oDlgZA )
|
||||
m_p_oDlgZA -> mfn_vUpdateDisplay( m_p_oCurrentZA, 0 );
|
||||
|
||||
mfn_vUpdateButtons();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgZAList owner functions
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : fill LB of States
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::mfn_vFillLBStates(CPA_Action *_p_oAction, BOOL _bReplace /*=FALSE*/)
|
||||
{
|
||||
CListBox *pLB = M_LBStates();
|
||||
|
||||
if(_bReplace)
|
||||
pLB -> ResetContent();
|
||||
|
||||
if( _p_oAction )
|
||||
{
|
||||
POSITION stPos = _p_oAction -> m_oListOfStates . GetHeadPosition();
|
||||
while( stPos )
|
||||
{
|
||||
CPA_State *p_oState = _p_oAction -> m_oListOfStates . GetNext( stPos );
|
||||
int iIndex = pLB -> AddString( p_oState -> GetName() );
|
||||
if( iIndex != LB_ERR )
|
||||
pLB -> SetItemData( iIndex, (DWORD) p_oState );
|
||||
}
|
||||
}
|
||||
pLB -> SetCurSel( -1 );
|
||||
m_oListOfSelectedStates . RemoveAll();
|
||||
m_p_oCurrentAction = NULL;
|
||||
m_p_oCurrentZA = NULL;
|
||||
mfn_vUpdateButtons();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Set Current Names List
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::mfn_vSetCurrentNamesList( CPA_tdoNameList *_p_oNameList)
|
||||
{
|
||||
//m_p_oCurrentZAList = NULL;
|
||||
//m_p_oCurrentZA = NULL;
|
||||
mfn_vUpdateStates( &m_oListOfSelectedStates );
|
||||
//
|
||||
mfn_vUpdateButtons();
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Set Current ZAList
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::mfn_vSetCurrentZAList( CPA_ZonesActivatingList *_p_oZAList )
|
||||
{
|
||||
m_p_oCurrentZAList = _p_oZAList;
|
||||
mfn_vUpdateStates( &m_oListOfSelectedStates );
|
||||
mfn_vUpdateButtons();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::mfn_vSetZA(CPA_ZonesActivating * _p_oZA, BOOL _bApply /*=TRUE*/ )
|
||||
{
|
||||
m_p_oCurrentZA = _p_oZA;
|
||||
if( _bApply && ( m_oListOfSelectedStates . GetCount() > 0 ) && m_p_oCurrentZAList && _p_oZA )
|
||||
{
|
||||
ZAList_SetZAToState *p_oZAState = new ZAList_SetZAToState( m_p_oDLL, m_p_oCurrentZAList, &m_oListOfSelectedStates);
|
||||
//
|
||||
POSITION xPos = m_oListOfSelectedStates . GetHeadPosition();
|
||||
// first State, init Action
|
||||
CPA_State *p_oState = m_oListOfSelectedStates . GetNext( xPos );
|
||||
p_oZAState -> mfn_vAddZAToState( _p_oZA, p_oState );
|
||||
m_p_oCurrentAction = p_oState -> mfn_p_oGetAction();
|
||||
while( xPos )
|
||||
{
|
||||
// next states
|
||||
p_oState = m_oListOfSelectedStates . GetNext( xPos );
|
||||
p_oZAState -> mfn_vAddZAToState( _p_oZA, p_oState );
|
||||
if( p_oState -> mfn_p_oGetAction() != m_p_oCurrentAction )
|
||||
m_p_oCurrentAction = NULL;
|
||||
}
|
||||
if( m_p_oDlgZA )
|
||||
m_p_oDlgZA -> mfn_vUpdateDisplay( _p_oZA, 0);
|
||||
|
||||
M_MakeDo( p_oZAState ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
OnSelchangeLbStates();
|
||||
M_LBStates() -> Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::mfn_vUpdateStates(CPA_List<CPA_State> *_p_oListOfStates)
|
||||
{
|
||||
CListBox *pLB = M_LBStates();
|
||||
int iIdx = pLB -> GetCount();
|
||||
CPA_State *p_oState;
|
||||
|
||||
// unselect all
|
||||
if( iIdx == 1 )
|
||||
pLB -> SetCurSel( -1 );
|
||||
else if( iIdx > 0 )
|
||||
pLB -> SelItemRange( FALSE, 0, iIdx - 1 );
|
||||
m_p_oCurrentZA = NULL;
|
||||
// select
|
||||
if( _p_oListOfStates -> GetCount() > 0 )
|
||||
{
|
||||
// update LB States
|
||||
POSITION xPos = _p_oListOfStates -> GetHeadPosition();
|
||||
// init current ZA
|
||||
if( xPos && m_p_oCurrentZAList )
|
||||
m_p_oCurrentZA = m_p_oCurrentZAList -> mfn_p_oGetZAFromState( _p_oListOfStates -> GetHead() );
|
||||
// select states and update current ZA
|
||||
while( xPos )
|
||||
{
|
||||
p_oState = _p_oListOfStates -> GetNext( xPos );
|
||||
mfn_iSelectStringExact( pLB, p_oState -> GetName () );
|
||||
// get ZA from state
|
||||
if( m_p_oCurrentZAList && ( m_p_oCurrentZA != m_p_oCurrentZAList -> mfn_p_oGetZAFromState( p_oState ) ) )
|
||||
m_p_oCurrentZA = NULL;
|
||||
}
|
||||
// update DlgZA
|
||||
if( m_p_oDlgZA && m_p_oCurrentZAList )
|
||||
m_p_oDlgZA -> mfn_vUpdateDisplay( m_p_oCurrentZA, 0 );
|
||||
//
|
||||
}
|
||||
mfn_vUpdateButtons();
|
||||
M_LBStates() -> Invalidate();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : handle function for message WM_DRAWITEM on List box
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::OnDrawListItem( LPDRAWITEMSTRUCT lpDIS )
|
||||
{
|
||||
CDC *pDC = CDC::FromHandle( lpDIS->hDC );
|
||||
char szText[100];
|
||||
CListBox *pLB = M_LBStates();
|
||||
BOOL bSelected = (lpDIS->itemState & ODS_SELECTED );
|
||||
CPA_State *p_oState = (CPA_State*) pLB->GetItemData( lpDIS->itemID );
|
||||
|
||||
pDC->FillSolidRect( &lpDIS->rcItem, GetSysColor( COLOR_WINDOW ));
|
||||
|
||||
pDC->SetBkMode( TRANSPARENT );
|
||||
pDC->SetTextColor( GetSysColor( COLOR_WINDOWTEXT ) );
|
||||
|
||||
// write state
|
||||
pLB -> GetText(lpDIS->itemID, szText ) ;
|
||||
lpDIS->rcItem.left += 1;
|
||||
pDC->DrawText( szText, strlen(szText), &lpDIS->rcItem, DT_SINGLELINE | DT_LEFT | DT_VCENTER );
|
||||
// write ZA
|
||||
if( m_p_oCurrentZAList )
|
||||
{
|
||||
CPA_ZonesActivating *p_oZA = m_p_oCurrentZAList -> mfn_p_oGetZAFromState( p_oState );
|
||||
if( p_oZA )
|
||||
{
|
||||
lpDIS->rcItem.right -= 2;
|
||||
pDC->DrawText( p_oZA -> GetName(), &lpDIS->rcItem, DT_SINGLELINE | DT_RIGHT | DT_VCENTER );
|
||||
lpDIS->rcItem.right += 2;
|
||||
}
|
||||
}
|
||||
|
||||
lpDIS->rcItem.left -= 1;
|
||||
if (bSelected)
|
||||
pDC->InvertRect( &lpDIS->rcItem );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::mfn_vAddAction( CPA_Action *_p_oAction, BOOL _bReplace /*=FALSE*/ )
|
||||
{
|
||||
mfn_vFillLBStates( _p_oAction, _bReplace );
|
||||
M_LBStates() -> Invalidate();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
int CDlgZAList::mfn_iSelectStringExact(CListBox *_pLB, CString _csEntry)
|
||||
{
|
||||
int iIndex = _pLB -> FindStringExact( -1, _csEntry );
|
||||
if( iIndex != LB_ERR )
|
||||
_pLB -> SetSel( iIndex, TRUE );
|
||||
return iIndex;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description :
|
||||
// ----------------------------------------------------------------------------
|
||||
void CDlgZAList::mfn_vUpdateButtons()
|
||||
{
|
||||
M_BTExtAction() -> EnableWindow( (m_p_oCurrentZAList != NULL) && (m_p_oCurrentAction != NULL) && (m_p_oCurrentZA != NULL) );
|
||||
M_BTExtFamily() -> EnableWindow( (m_p_oCurrentZAList != NULL) && (m_p_oCurrentZA != NULL) );
|
||||
}
|
331
Rayman_X/cpa/tempgrp/TAc/src/FAModif.cpp
Normal file
331
Rayman_X/cpa/tempgrp/TAc/src/FAModif.cpp
Normal file
@@ -0,0 +1,331 @@
|
||||
//#################################################################################
|
||||
//
|
||||
// BASE IMPLEMENTATION CLASS OF DLL interface Modification
|
||||
//
|
||||
//#################################################################################
|
||||
//
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "TFa.h"
|
||||
#include "TAn.h"
|
||||
|
||||
#include "FAModif.hpp"
|
||||
#include "ACInterf.hpp"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Family_DelAllActions
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : constructor
|
||||
// ----------------------------------------------------------------------------
|
||||
Family_DelAllActions::Family_DelAllActions(TAction_Interface *_p_oParentDLL, CPA_Family *_p_oFamily)
|
||||
:CPA_Modif(0, "Delete all actions", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL ;
|
||||
m_p_oFamily = _p_oFamily ;
|
||||
m_p_oInitialAction = NULL;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : destructor
|
||||
// ----------------------------------------------------------------------------
|
||||
Family_DelAllActions::~Family_DelAllActions()
|
||||
{
|
||||
if( HasBeenDone() )
|
||||
{
|
||||
// delete all actions
|
||||
POSITION stPosAction = m_oListOfActionsDeleted . GetHeadPosition () ;
|
||||
while ( stPosAction )
|
||||
{
|
||||
CPA_Action *p_oAction = m_oListOfActionsDeleted . GetNext ( stPosAction ) ;
|
||||
// delete all states of action
|
||||
POSITION stPosState = p_oAction -> m_oListOfStates . GetHeadPosition () ;
|
||||
while ( stPosState )
|
||||
{
|
||||
delete p_oAction -> m_oListOfStates . GetNext ( stPosState ) ;
|
||||
}
|
||||
delete p_oAction ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Do 'DelAllActions'
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL Family_DelAllActions::Do()
|
||||
{
|
||||
// modify data
|
||||
// save initial action
|
||||
m_p_oInitialAction = m_p_oFamily -> mfn_p_oGetInitialAction() ;
|
||||
// remove all actions from family
|
||||
m_oListOfActionsDeleted . RemoveAll () ;
|
||||
m_oListOfStates . RemoveAll();
|
||||
m_oListOfInitialStates . RemoveAll();
|
||||
//
|
||||
while( ! m_p_oFamily -> m_oListOfActions . IsEmpty() )
|
||||
{
|
||||
CPA_Action *p_oAction = m_p_oFamily -> m_oListOfActions . GetHead();
|
||||
// save action
|
||||
m_oListOfActionsDeleted . AddTail( p_oAction );
|
||||
// save default state
|
||||
m_oListOfInitialStates . AddTail( p_oAction -> mfn_p_oGetDefaultState() );
|
||||
// remove all state from action
|
||||
while( ! p_oAction -> m_oListOfStates . IsEmpty() )
|
||||
{
|
||||
CPA_State *p_oState = p_oAction -> m_oListOfStates . GetHead();
|
||||
// save state
|
||||
m_oListOfStates . AddTail( p_oState );
|
||||
// unvalidate && unsave
|
||||
p_oState -> fn_bUnValidate () ;
|
||||
p_oState -> fn_vNotifyUnSave();
|
||||
// remove from action
|
||||
p_oAction -> mfn_vRemoveState( p_oState );
|
||||
}
|
||||
// remove action
|
||||
m_p_oFamily -> mfn_vRemoveAction( p_oAction );
|
||||
//
|
||||
g_oCoherenceManager . m_fn_vDeleteObject( p_oAction );
|
||||
// unvalidate && unsave
|
||||
p_oAction -> fn_bUnValidate () ;
|
||||
p_oAction -> fn_vNotifyUnSave();
|
||||
}
|
||||
//
|
||||
// no Initial Action
|
||||
m_p_oFamily -> mfn_vSetInitialAction( NULL ) ;
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vAllActionsDeleted ( m_p_oFamily ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : undo 'DelAllActions'
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL Family_DelAllActions::Undo()
|
||||
{
|
||||
// restore all actions
|
||||
POSITION stPosAction = m_oListOfActionsDeleted . GetHeadPosition () ;
|
||||
while ( stPosAction )
|
||||
{
|
||||
CPA_Action *p_oAction = m_oListOfActionsDeleted . GetNext ( stPosAction ) ;
|
||||
m_p_oFamily -> mfn_vAddAction( p_oAction ) ;
|
||||
// Re-register action
|
||||
p_oAction -> fn_bValidate();
|
||||
p_oAction -> fn_vNotifyRestore();
|
||||
}
|
||||
// restore all states
|
||||
POSITION stPosState = m_oListOfStates . GetHeadPosition () ;
|
||||
while ( stPosState )
|
||||
{
|
||||
CPA_State *p_oState = m_oListOfStates . GetNext ( stPosState ) ;
|
||||
p_oState -> mfn_p_oGetAction() -> mfn_vAddState( p_oState );
|
||||
// Re-register state
|
||||
p_oState -> fn_bValidate();
|
||||
p_oState -> fn_vNotifyRestore();
|
||||
}
|
||||
// restore all initial states
|
||||
stPosState = m_oListOfInitialStates . GetHeadPosition () ;
|
||||
while ( stPosState )
|
||||
{
|
||||
CPA_State *p_oState = m_oListOfStates . GetNext ( stPosState ) ;
|
||||
p_oState -> mfn_p_oGetAction() -> mfn_vSetDefaultState( p_oState );
|
||||
}
|
||||
// uses coherence manager
|
||||
stPosAction = m_oListOfActionsDeleted . GetHeadPosition () ;
|
||||
while ( stPosAction )
|
||||
{
|
||||
CPA_Action *p_oAction = m_oListOfActionsDeleted . GetNext ( stPosAction ) ;
|
||||
g_oCoherenceManager . m_fn_vRestoreObject( p_oAction );
|
||||
}
|
||||
// restore Initial Action
|
||||
m_p_oFamily -> mfn_vSetInitialAction( m_p_oInitialAction ) ;
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vSetCurrentFamily ( m_p_oFamily ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Family_StateChange
|
||||
|
||||
Family_StateChange::Family_StateChange(TAction_Interface *_p_oParentDLL, long _lTypeOfChange,
|
||||
void *_p_vAfter, void *_p_vBefore,
|
||||
long _lAfter /*=0*/, long _lBefore /*=0*/)
|
||||
:CPA_Modif(0, "" , FALSE )
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_lTypeOfChange = _lTypeOfChange;
|
||||
m_p_vBefore = _p_vBefore;
|
||||
m_p_vAfter = _p_vAfter;
|
||||
m_lBefore = _lBefore;
|
||||
m_lAfter = _lAfter;
|
||||
//
|
||||
switch( m_lTypeOfChange )
|
||||
{
|
||||
case C_eNone : SetName(""); break;
|
||||
case C_eMode : SetName("Swap Editor Mode"); break;
|
||||
case C_eFamily : SetName("Select Family"); break;
|
||||
case C_eAction : SetName("Select Action"); break;
|
||||
case C_eActionList :
|
||||
SetName("Select Action");
|
||||
//
|
||||
if( m_lBefore )
|
||||
{
|
||||
m_p_vBefore = (int*) malloc( m_lBefore * sizeof(int) );
|
||||
memcpy( m_p_vBefore, _p_vBefore, m_lBefore * sizeof(int) );
|
||||
}
|
||||
else
|
||||
m_p_vBefore = NULL;
|
||||
//
|
||||
if( m_lAfter )
|
||||
{
|
||||
m_p_vAfter = (int*) malloc( m_lAfter * sizeof(int) );
|
||||
memcpy( m_p_vAfter, _p_vAfter, m_lAfter * sizeof(int) );
|
||||
}
|
||||
else
|
||||
m_p_vAfter = NULL;
|
||||
break;
|
||||
case C_eState : SetName("Select State"); break;
|
||||
case C_eNameList : SetName("Select List of Names"); break;
|
||||
case C_eZAList : SetName("Select List of Activations"); break;
|
||||
case C_eZA : SetName("Select Activation"); break;
|
||||
}
|
||||
}
|
||||
|
||||
Family_StateChange::~Family_StateChange()
|
||||
{
|
||||
if( m_lTypeOfChange == C_eActionList )
|
||||
{
|
||||
if( m_p_vBefore ) free( (int*)m_p_vBefore );
|
||||
if( m_p_vAfter ) free( (int*)m_p_vAfter );
|
||||
}
|
||||
}
|
||||
|
||||
// actions
|
||||
BOOL Family_StateChange::Do()
|
||||
{
|
||||
return ( mfn_bSomethingToDo() && mfn_vMakeChange( m_p_vAfter, m_lAfter ) );
|
||||
}
|
||||
|
||||
BOOL Family_StateChange::Undo()
|
||||
{
|
||||
return ( mfn_bSomethingToDo() && mfn_vMakeChange( m_p_vBefore, m_lBefore ) );
|
||||
}
|
||||
|
||||
BOOL Family_StateChange::mfn_bSomethingToDo()
|
||||
{
|
||||
switch( m_lTypeOfChange )
|
||||
{
|
||||
case C_eNone : return FALSE;
|
||||
case C_eMode :
|
||||
case C_eFamily :
|
||||
case C_eAction :
|
||||
case C_eState :
|
||||
case C_eNameList:
|
||||
case C_eZAList :
|
||||
case C_eZA : return ( m_p_vAfter != m_p_vBefore );
|
||||
case C_eActionList: return ( ( m_p_vAfter != m_p_vBefore ) || ( m_lAfter != m_lBefore ) );
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL Family_StateChange::mfn_vMakeChange(void *_p_vValue, long _lValue)
|
||||
{
|
||||
switch( m_lTypeOfChange )
|
||||
{
|
||||
case C_eNone :
|
||||
break;
|
||||
case C_eMode :
|
||||
m_p_oParentDLL -> mfn_vSetEditMode( (BOOL)_p_vValue, FALSE );
|
||||
break;
|
||||
case C_eFamily :
|
||||
m_p_oParentDLL -> mfn_vSetCurrentFamily( (CPA_Family*)_p_vValue );
|
||||
break;
|
||||
case C_eAction :
|
||||
m_p_oParentDLL -> mfn_vSetCurrentAction( (CPA_Action*)_p_vValue );
|
||||
break;
|
||||
case C_eActionList:
|
||||
m_p_oParentDLL -> mfn_vSetCurrentActionList( (int*)_p_vValue, _lValue );
|
||||
break;
|
||||
case C_eState :
|
||||
m_p_oParentDLL -> mfn_vSetCurrentState( (CPA_State*)_p_vValue );
|
||||
break;
|
||||
case C_eNameList:
|
||||
m_p_oParentDLL -> mfn_vSetCurrentNameList( (CPA_tdoNameList*)_p_vValue );
|
||||
break;
|
||||
case C_eZAList :
|
||||
m_p_oParentDLL -> mfn_vSetCurrentZAList( (CPA_ZonesActivatingList*)_p_vValue );
|
||||
break;
|
||||
case C_eZA :
|
||||
m_p_oParentDLL -> mfn_vSetCurrentZA( (CPA_ZonesActivating*)_p_vValue );
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class Family_ModifInitialAction
|
||||
|
||||
Family_ModifInitialAction::Family_ModifInitialAction(TAction_Interface *_p_oParentDLL, CPA_Family *_p_oFamily, CPA_Action *_p_oNewInitialAction)
|
||||
:CPA_Modif(0, "Change Initial Action" , FALSE )
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oFamily = _p_oFamily;
|
||||
m_p_oNewInitialAction = _p_oNewInitialAction;
|
||||
m_p_oPreviousInitialAction = m_p_oFamily -> mfn_p_oGetInitialAction();
|
||||
}
|
||||
|
||||
Family_ModifInitialAction::~Family_ModifInitialAction()
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : Do 'ModifInitialAction'
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL Family_ModifInitialAction::Do()
|
||||
{
|
||||
m_p_oFamily -> mfn_vSetInitialAction( m_p_oNewInitialAction );
|
||||
|
||||
m_p_oNewInitialAction -> fn_vNotifySave();
|
||||
m_p_oPreviousInitialAction -> fn_vNotifySave();
|
||||
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vActionCreated( m_p_oFamily, m_p_oNewInitialAction );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : UnDo 'ModifInitialAction'
|
||||
// ----------------------------------------------------------------------------
|
||||
BOOL Family_ModifInitialAction::Undo()
|
||||
{
|
||||
m_p_oFamily -> mfn_vSetInitialAction( m_p_oPreviousInitialAction );
|
||||
|
||||
m_p_oNewInitialAction -> fn_vNotifySave();
|
||||
m_p_oPreviousInitialAction -> fn_vNotifySave();
|
||||
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vActionCreated( m_p_oFamily, m_p_oPreviousInitialAction );
|
||||
|
||||
return TRUE;
|
||||
}
|
2092
Rayman_X/cpa/tempgrp/TAc/src/STModif.cpp
Normal file
2092
Rayman_X/cpa/tempgrp/TAc/src/STModif.cpp
Normal file
File diff suppressed because it is too large
Load Diff
6
Rayman_X/cpa/tempgrp/TAc/src/StdAfx.cpp
Normal file
6
Rayman_X/cpa/tempgrp/TAc/src/StdAfx.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// ACPProject.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
783
Rayman_X/cpa/tempgrp/TAc/src/ZAModif.cpp
Normal file
783
Rayman_X/cpa/tempgrp/TAc/src/ZAModif.cpp
Normal file
@@ -0,0 +1,783 @@
|
||||
//#################################################################################
|
||||
//
|
||||
// BASE IMPLEMENTATION CLASS OF DLL interface Modification
|
||||
//
|
||||
//#################################################################################
|
||||
//
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ACP_Base.h"
|
||||
#include "incITF.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "TFa.h"
|
||||
#include "TAn.h"
|
||||
#include "OAc.h"
|
||||
|
||||
#include "ZAModif.hpp"
|
||||
#include "ACInterf.hpp"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// MACROS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define M_ForEachElement(oList,p_oElement,Pos)\
|
||||
for( p_oElement = (oList) . GetHeadElement( Pos ) ;\
|
||||
p_oElement ;\
|
||||
p_oElement = (oList) . GetNextElement( Pos )\
|
||||
)
|
||||
|
||||
#define M_ForEachEntry(oMap,p_oKey,p_oValue,Pos)\
|
||||
Pos = (oMap) . GetStartPosition();\
|
||||
if(Pos)\
|
||||
for( p_oKey = NULL, p_oValue = NULL, (oMap) . GetNextAssoc( Pos, p_oKey, p_oValue ) ;\
|
||||
Pos ;\
|
||||
p_oKey = NULL, p_oValue = NULL, (oMap) . GetNextAssoc( Pos, p_oKey, p_oValue ) )
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_New
|
||||
|
||||
ZAList_New::ZAList_New(TAction_Interface *_p_oParentDLL, CPA_tdoNameList *_p_oNameList, CString _csName)
|
||||
:CPA_Modif(0, "New List of Activations", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oNameList = _p_oNameList;
|
||||
m_p_oZAList = NULL;
|
||||
m_csName = _csName;
|
||||
}
|
||||
|
||||
ZAList_New::~ZAList_New()
|
||||
{
|
||||
if ( !HasBeenDone() && m_p_oZAList )
|
||||
{
|
||||
delete m_p_oZAList;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL ZAList_New::Do()
|
||||
{
|
||||
if ( m_p_oZAList == NULL )
|
||||
{
|
||||
m_p_oZAList = new CPA_ZonesActivatingList( m_p_oParentDLL, m_p_oNameList, m_csName );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
m_p_oZAList -> fn_bValidate();
|
||||
m_p_oZAList -> fn_vNotifySave();
|
||||
}
|
||||
|
||||
m_p_oNameList -> fn_vUpdateReference( m_p_oZAList );
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAListCreated( m_p_oZAList );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ZAList_New::Undo()
|
||||
{
|
||||
m_p_oZAList -> fn_bUnValidate();
|
||||
m_p_oZAList -> fn_vNotifyUnSave();
|
||||
m_p_oNameList -> fn_vUpdateReference( m_p_oZAList );
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAListDeleted ( m_p_oNameList ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_Copy
|
||||
|
||||
ZAList_Copy::ZAList_Copy(TAction_Interface *_p_oParentDLL, CPA_ZonesActivatingList *_p_oSourceZAList)
|
||||
:CPA_Modif(0, "Copy of List of Activations", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oSourceZAList = _p_oSourceZAList;
|
||||
m_p_oTargetZAList = NULL;
|
||||
}
|
||||
|
||||
ZAList_Copy::~ZAList_Copy()
|
||||
{
|
||||
if( !HasBeenDone() && m_p_oTargetZAList )
|
||||
delete m_p_oTargetZAList;
|
||||
}
|
||||
|
||||
// actions
|
||||
BOOL ZAList_Copy::Do()
|
||||
{
|
||||
if( m_p_oTargetZAList == NULL )
|
||||
{
|
||||
m_p_oTargetZAList = m_p_oSourceZAList -> mfn_p_oDuplicateZAList();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_p_oTargetZAList -> fn_bValidate();
|
||||
m_p_oTargetZAList -> fn_vNotifySave();
|
||||
}
|
||||
((CPA_SaveObject*)m_p_oTargetZAList -> GetOwner()) -> fn_vUpdateReference( m_p_oTargetZAList );
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAListCreated( m_p_oTargetZAList );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ZAList_Copy::Undo()
|
||||
{
|
||||
m_p_oTargetZAList -> fn_bUnValidate();
|
||||
m_p_oTargetZAList -> fn_vNotifyUnSave();
|
||||
((CPA_SaveObject*)m_p_oTargetZAList -> GetOwner()) -> fn_vUpdateReference( m_p_oTargetZAList );
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAListDeleted ( (CPA_tdoNameList*)m_p_oSourceZAList -> GetOwner() ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_Rename
|
||||
|
||||
ZAList_Rename::ZAList_Rename(TAction_Interface *_p_oParentDLL, CPA_ZonesActivatingList *_p_oZAList, CString _csName)
|
||||
:CPA_Modif(0, "Rename List of Activations", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oZAList = _p_oZAList;
|
||||
m_csName = _csName;
|
||||
}
|
||||
|
||||
ZAList_Rename::~ZAList_Rename()
|
||||
{
|
||||
}
|
||||
|
||||
// actions
|
||||
BOOL ZAList_Rename::Do()
|
||||
{
|
||||
CString csLastName = m_p_oZAList -> GetName();
|
||||
|
||||
// delete previous subsection
|
||||
m_p_oZAList -> fn_bUnValidate();
|
||||
((CPA_SaveObject*)m_p_oZAList -> GetOwner()) -> fn_vUpdateReference( m_p_oZAList );
|
||||
// rename
|
||||
m_p_oZAList -> fn_bValidate();
|
||||
tdeMissingCriteria eCriteria = m_p_oZAList -> fn_eRename( m_csName );
|
||||
// save new subsection
|
||||
((CPA_SaveObject*)m_p_oZAList -> GetOwner()) -> fn_vUpdateReference( m_p_oZAList );
|
||||
if( eCriteria != E_mc_None )
|
||||
return FALSE;
|
||||
|
||||
m_csName = csLastName;
|
||||
// notify Coherence Manager
|
||||
g_oCoherenceManager . m_fn_vNotifyObjectModification( m_p_oZAList, 0 );
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAListCreated( m_p_oZAList );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ZAList_Rename::Undo()
|
||||
{
|
||||
return Do();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_Delete
|
||||
|
||||
ZAList_Delete::ZAList_Delete(TAction_Interface *_p_oParentDLL, CPA_ZonesActivatingList *_p_oZAList)
|
||||
:CPA_Modif(0, "Delete List of Activations", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oZAList = _p_oZAList;
|
||||
}
|
||||
|
||||
ZAList_Delete::~ZAList_Delete()
|
||||
{
|
||||
if( HasBeenDone() && m_p_oZAList )
|
||||
{
|
||||
//
|
||||
POSITION xPos;
|
||||
CPA_ActivationState *p_oZAST;
|
||||
M_ForEachElement( m_p_oZAList -> m_oListOfZAState, p_oZAST, xPos )
|
||||
{
|
||||
CPA_ZonesActivating *p_oZA = p_oZAST -> mfn_p_oGetZA();
|
||||
CPA_State *p_oState = p_oZAST -> mfn_p_oGetState();
|
||||
if( p_oState && p_oZA )
|
||||
m_p_oZAList -> mfn_vSetZAFromState( NULL, p_oState );
|
||||
}
|
||||
//
|
||||
delete m_p_oZAList;
|
||||
}
|
||||
}
|
||||
|
||||
// actions
|
||||
BOOL ZAList_Delete::Do()
|
||||
{
|
||||
m_p_oZAList -> fn_bUnValidate();
|
||||
m_p_oZAList -> fn_vNotifyUnSave();
|
||||
((CPA_SaveObject*)m_p_oZAList -> GetOwner()) -> fn_vUpdateReference( m_p_oZAList );
|
||||
g_oCoherenceManager . m_fn_vDeleteObject( m_p_oZAList );
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAListDeleted ( (CPA_tdoNameList*)m_p_oZAList -> GetOwner() ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ZAList_Delete::Undo()
|
||||
{
|
||||
m_p_oZAList -> fn_bValidate();
|
||||
m_p_oZAList -> fn_vNotifyRestore();
|
||||
((CPA_SaveObject*)m_p_oZAList -> GetOwner()) -> fn_vUpdateReference( m_p_oZAList );
|
||||
g_oCoherenceManager . m_fn_vRestoreObject( m_p_oZAList );
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAListCreated ( m_p_oZAList ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_ExtendToFamily
|
||||
|
||||
ZAList_ExtendToFamily::ZAList_ExtendToFamily(TAction_Interface *_p_oParentDLL, CPA_ZonesActivatingList *_p_oZAList,
|
||||
CPA_ZonesActivating *_p_oZA, CPA_List<CPA_State> *_p_oListOfDisplayStates)
|
||||
:CPA_Modif(0, "Extend Activation to Family", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oZAList = _p_oZAList;
|
||||
m_p_oZA = _p_oZA;
|
||||
m_p_oListOfDisplayStates = _p_oListOfDisplayStates;
|
||||
m_oListOfZAState . RemoveAll();
|
||||
}
|
||||
|
||||
ZAList_ExtendToFamily::~ZAList_ExtendToFamily()
|
||||
{
|
||||
m_oListOfZAState . RemoveAll();
|
||||
}
|
||||
|
||||
BOOL ZAList_ExtendToFamily::Do()
|
||||
{
|
||||
CPA_Family *p_oFamily = (CPA_Family*) m_p_oZAList -> GetOwner() -> GetOwner();
|
||||
CPA_ActivationState *p_oStZA = NULL;
|
||||
CPA_State *p_oState = NULL;
|
||||
POSITION xPos;
|
||||
|
||||
// save current Map
|
||||
M_ForEachElement( m_p_oZAList -> m_oListOfZAState, p_oStZA, xPos )
|
||||
{
|
||||
m_oListOfZAState . SetAt( p_oStZA -> mfn_p_oGetState(), p_oStZA -> mfn_p_oGetZA() );
|
||||
}
|
||||
// set map to given ZA
|
||||
M_ForEachElement( p_oFamily -> m_oListOfStates, p_oState, xPos )
|
||||
{
|
||||
m_p_oZAList -> mfn_vSetZAFromState( m_p_oZA, p_oState );
|
||||
}
|
||||
//m_p_oZAList -> fn_vNotifySave();
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAToStateChanged( m_p_oListOfDisplayStates );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ZAList_ExtendToFamily::Undo()
|
||||
{
|
||||
CPA_ActivationState *p_oStZA = NULL;
|
||||
CPA_State *p_oState = NULL;
|
||||
CPA_ZonesActivating *p_oZA = NULL;
|
||||
POSITION xPos;
|
||||
|
||||
// restore previous map
|
||||
M_ForEachElement( m_p_oZAList -> m_oListOfZAState, p_oStZA, xPos )
|
||||
{
|
||||
m_oListOfZAState . SetAt( p_oStZA -> mfn_p_oGetState(), NULL );
|
||||
}
|
||||
M_ForEachEntry( m_oListOfZAState, p_oState, p_oZA, xPos )
|
||||
{
|
||||
m_p_oZAList -> mfn_vSetZAFromState( p_oZA, p_oState);
|
||||
}
|
||||
//m_p_oZAList -> fn_vNotifySave();
|
||||
m_oListOfZAState . RemoveAll();
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAToStateChanged( m_p_oListOfDisplayStates );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_ExtendToAction
|
||||
|
||||
ZAList_ExtendToAction::ZAList_ExtendToAction(TAction_Interface *_p_oParentDLL, CPA_Action *_p_oAction,
|
||||
CPA_ZonesActivatingList *_p_oZAList,
|
||||
CPA_ZonesActivating *_p_oZA, CPA_List<CPA_State> *_p_oListOfDisplayStates)
|
||||
:CPA_Modif(0, "Extend Activation to Action", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oAction = _p_oAction;
|
||||
m_p_oZAList = _p_oZAList;
|
||||
m_p_oZA = _p_oZA;
|
||||
m_p_oListOfDisplayStates = _p_oListOfDisplayStates;
|
||||
m_oListOfZAState . RemoveAll();
|
||||
}
|
||||
|
||||
ZAList_ExtendToAction::~ZAList_ExtendToAction()
|
||||
{
|
||||
m_oListOfZAState . RemoveAll();
|
||||
}
|
||||
|
||||
BOOL ZAList_ExtendToAction::Do()
|
||||
{
|
||||
POSITION xPos;
|
||||
CPA_State *p_oState;
|
||||
|
||||
// save current Map
|
||||
M_ForEachElement( m_p_oAction -> m_oListOfStates, p_oState, xPos )
|
||||
{
|
||||
m_oListOfZAState . SetAt( p_oState, m_p_oZAList -> mfn_p_oGetZAFromState( p_oState ) );
|
||||
}
|
||||
// set map to given ZA
|
||||
M_ForEachElement( m_p_oAction -> m_oListOfStates, p_oState, xPos )
|
||||
{
|
||||
m_p_oZAList -> mfn_vSetZAFromState( m_p_oZA, p_oState );
|
||||
}
|
||||
//m_p_oZAList -> fn_vNotifySave();
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAToStateChanged( m_p_oListOfDisplayStates );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ZAList_ExtendToAction::Undo()
|
||||
{
|
||||
CPA_State *p_oState = NULL;
|
||||
CPA_ZonesActivating *p_oZA = NULL;
|
||||
POSITION xPos;
|
||||
|
||||
// restore previous map
|
||||
M_ForEachEntry( m_oListOfZAState, p_oState, p_oZA, xPos )
|
||||
{
|
||||
m_p_oZAList -> mfn_vSetZAFromState( p_oZA, p_oState );
|
||||
}
|
||||
//m_p_oZAList -> fn_vNotifySave();
|
||||
m_oListOfZAState . RemoveAll();
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAToStateChanged( m_p_oListOfDisplayStates );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZAList_SetZAToState
|
||||
|
||||
ZAList_SetZAToState::ZAList_SetZAToState(TAction_Interface *_p_oParentDLL, CPA_ZonesActivatingList *_p_oZAList,
|
||||
CPA_List<CPA_State> *_p_oListOfDisplayStates)
|
||||
:CPA_Modif(0, "Change Activation to State", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oZAList = _p_oZAList;
|
||||
m_p_oListOfDisplayStates = _p_oListOfDisplayStates;
|
||||
m_oListOfChanged . RemoveAll();
|
||||
}
|
||||
|
||||
ZAList_SetZAToState::~ZAList_SetZAToState()
|
||||
{
|
||||
while( ! m_oListOfChanged . IsEmpty() )
|
||||
{
|
||||
free( m_oListOfChanged . RemoveHead() );
|
||||
}
|
||||
m_oListOfChanged . RemoveAll();
|
||||
}
|
||||
|
||||
void ZAList_SetZAToState::mfn_vAddZAToState( CPA_ZonesActivating *_p_oZA, CPA_State *_p_oState )
|
||||
{
|
||||
tdstZAStates *p_stZAST = (tdstZAStates*) malloc( sizeof(tdstZAStates) );
|
||||
p_stZAST -> m_p_oState = _p_oState;
|
||||
p_stZAST -> m_p_oNewZA = _p_oZA;
|
||||
m_oListOfChanged . AddTail( p_stZAST );
|
||||
}
|
||||
|
||||
BOOL ZAList_SetZAToState::Do()
|
||||
{
|
||||
tdstZAStates *p_stZAST;
|
||||
POSITION xPos;
|
||||
M_ForEachElement( m_oListOfChanged, p_stZAST, xPos )
|
||||
{
|
||||
CPA_ZonesActivating *p_oPreviousZA = m_p_oZAList -> mfn_p_oGetZAFromState( p_stZAST -> m_p_oState );
|
||||
|
||||
m_p_oZAList -> mfn_vSetZAFromState( p_stZAST -> m_p_oNewZA, p_stZAST -> m_p_oState );
|
||||
|
||||
p_stZAST -> m_p_oNewZA = p_oPreviousZA;
|
||||
}
|
||||
//m_p_oZAList -> fn_vNotifySave();
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAToStateChanged( m_p_oListOfDisplayStates );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ZAList_SetZAToState::Undo()
|
||||
{
|
||||
return Do();
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZA_New
|
||||
|
||||
ZA_New::ZA_New(TAction_Interface *_p_oParentDLL, CPA_tdoNameList *_p_oNameList, CString _csName)
|
||||
:CPA_Modif(0, "New Activation", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oNameList = _p_oNameList;
|
||||
m_p_oZA = NULL;
|
||||
m_csName = _csName;
|
||||
}
|
||||
|
||||
ZA_New::~ZA_New()
|
||||
{
|
||||
if ( !HasBeenDone() && m_p_oZA )
|
||||
{
|
||||
delete m_p_oZA;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL ZA_New::Do()
|
||||
{
|
||||
if ( m_p_oZA == NULL )
|
||||
{
|
||||
m_p_oZA = new CPA_ZonesActivating( m_p_oParentDLL, m_p_oNameList, m_csName );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_p_oZA -> fn_bValidate();
|
||||
m_p_oZA -> fn_vNotifySave();
|
||||
}
|
||||
// first ZA ????
|
||||
if( m_p_oNameList -> m_fnp_oGetDefaultZA() == NULL )
|
||||
m_p_oNameList -> m_fnv_SetDefaultZA( m_p_oZA );
|
||||
//
|
||||
m_p_oNameList -> fn_vUpdateReference( m_p_oZA );
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZACreated( m_p_oZA );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ZA_New::Undo()
|
||||
{
|
||||
m_p_oZA -> fn_bUnValidate();
|
||||
// first ZA ????
|
||||
if( m_p_oZA == m_p_oNameList -> m_fnp_oGetDefaultZA() )
|
||||
m_p_oNameList -> m_fnv_SetDefaultZA( NULL );
|
||||
//
|
||||
m_p_oZA -> fn_vNotifyUnSave();
|
||||
m_p_oNameList -> fn_vUpdateReference( m_p_oZA );
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZADeleted ( m_p_oZA ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZA_Modify
|
||||
|
||||
ZA_Modify::ZA_Modify(TAction_Interface *_p_oParentDLL, CPA_ZonesActivating *_p_oZA,
|
||||
unsigned short _usIndex, BOOL _bNewState)
|
||||
:CPA_Modif(0, "Change Activation", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oZA = _p_oZA;
|
||||
m_usIndex = _usIndex;
|
||||
m_bNewState = _bNewState;
|
||||
}
|
||||
|
||||
ZA_Modify::~ZA_Modify()
|
||||
{
|
||||
}
|
||||
|
||||
BOOL ZA_Modify::Do()
|
||||
{
|
||||
m_p_oZA -> mfn_vSetZoneActivation( m_usIndex, m_bNewState);
|
||||
m_p_oZA -> fn_vNotifySave();
|
||||
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAChanged ( m_p_oZA, (int)m_usIndex ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ZA_Modify::Undo()
|
||||
{
|
||||
m_p_oZA -> mfn_vSetZoneActivation( m_usIndex, !m_bNewState);
|
||||
m_p_oZA -> fn_vNotifySave();
|
||||
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAChanged ( m_p_oZA, (int)m_usIndex ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZA_Copy
|
||||
|
||||
ZA_Copy::ZA_Copy(TAction_Interface *_p_oParentDLL, CPA_ZonesActivating *_p_oSourceZA)
|
||||
:CPA_Modif(0, "Copy of Activation", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oSourceZA = _p_oSourceZA;
|
||||
m_p_oTargetZA = NULL;
|
||||
}
|
||||
|
||||
ZA_Copy::~ZA_Copy()
|
||||
{
|
||||
if( !HasBeenDone() && m_p_oTargetZA )
|
||||
delete m_p_oTargetZA;
|
||||
}
|
||||
|
||||
// actions
|
||||
BOOL ZA_Copy::Do()
|
||||
{
|
||||
if( m_p_oTargetZA == NULL )
|
||||
{
|
||||
m_p_oTargetZA = m_p_oSourceZA -> mfn_p_oDuplicateZA();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_p_oTargetZA -> fn_bValidate();
|
||||
m_p_oTargetZA -> fn_vNotifySave();
|
||||
}
|
||||
((CPA_SaveObject*)m_p_oTargetZA -> GetOwner()) -> fn_vUpdateReference( m_p_oTargetZA );
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZACreated( m_p_oTargetZA );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ZA_Copy::Undo()
|
||||
{
|
||||
m_p_oTargetZA -> fn_bUnValidate();
|
||||
m_p_oTargetZA -> fn_vNotifyUnSave();
|
||||
((CPA_SaveObject*)m_p_oTargetZA -> GetOwner()) -> fn_vUpdateReference( m_p_oTargetZA );
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZADeleted ( m_p_oTargetZA ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZA_Rename
|
||||
|
||||
ZA_Rename::ZA_Rename(TAction_Interface *_p_oParentDLL, CPA_ZonesActivating *_p_oZA, CString _csName)
|
||||
:CPA_Modif(0, "Rename Activation", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oZA = _p_oZA;
|
||||
m_csName = _csName;
|
||||
}
|
||||
|
||||
ZA_Rename::~ZA_Rename()
|
||||
{
|
||||
}
|
||||
|
||||
// actions
|
||||
BOOL ZA_Rename::Do()
|
||||
{
|
||||
tdstZAUsed *p_stZAUsed;
|
||||
POSITION xPos;
|
||||
CString csLastName = m_p_oZA -> GetName();
|
||||
|
||||
// delete previous subsection
|
||||
m_p_oZA -> fn_bUnValidate();
|
||||
((CPA_SaveObject*)m_p_oZA -> GetOwner()) -> fn_vUpdateReference( m_p_oZA );
|
||||
// rename
|
||||
m_p_oZA -> fn_bValidate();
|
||||
tdeMissingCriteria eCriteria = m_p_oZA -> fn_eRename( m_csName );
|
||||
// add new subsection
|
||||
((CPA_SaveObject*)m_p_oZA -> GetOwner()) -> fn_vUpdateReference( m_p_oZA );
|
||||
if( eCriteria != E_mc_None )
|
||||
return FALSE;
|
||||
|
||||
m_csName = csLastName;
|
||||
// notify all ZAList using ZA
|
||||
M_ForEachElement( m_p_oZA -> m_oListOfZAListUsing, p_stZAUsed, xPos )
|
||||
{
|
||||
if( p_stZAUsed -> p_oZAList -> fn_bIsValid() )
|
||||
p_stZAUsed -> p_oZAList -> mfn_vZARenamed( m_p_oZA );
|
||||
}
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZACreated( m_p_oZA );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ZA_Rename::Undo()
|
||||
{
|
||||
return Do();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZA_Delete
|
||||
|
||||
ZA_Delete::ZA_Delete(TAction_Interface *_p_oParentDLL, CPA_ZonesActivating *_p_oZA)
|
||||
:CPA_Modif(0, "Delete Activation", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oZA = _p_oZA;
|
||||
m_bDefault = ( m_p_oZA == ((CPA_tdoNameList*) m_p_oZA -> GetOwner()) -> m_fnp_oGetDefaultZA() );
|
||||
}
|
||||
|
||||
ZA_Delete::~ZA_Delete()
|
||||
{
|
||||
if( HasBeenDone() && m_p_oZA )
|
||||
delete m_p_oZA;
|
||||
}
|
||||
|
||||
// actions
|
||||
BOOL ZA_Delete::Do()
|
||||
{
|
||||
tdstZAUsed *p_stZAUsed;
|
||||
POSITION xPos;
|
||||
CPA_tdoNameList *p_oOwnerNameList = (CPA_tdoNameList*) m_p_oZA -> GetOwner();
|
||||
CPA_ZonesActivating *p_oZADefault = (CPA_ZonesActivating*) p_oOwnerNameList -> m_fnp_oGetDefaultZA();
|
||||
|
||||
m_p_oZA -> fn_bUnValidate();
|
||||
m_p_oZA -> fn_vNotifyUnSave();
|
||||
p_oOwnerNameList -> fn_vUpdateReference( m_p_oZA );
|
||||
|
||||
// default ZA ??????
|
||||
if( m_bDefault )
|
||||
{
|
||||
// search new Default ZA
|
||||
p_oOwnerNameList -> m_fnv_SetDefaultZA( NULL );
|
||||
p_oZADefault = m_p_oZA -> mfn_p_oGetDefaultZA();
|
||||
p_oOwnerNameList -> m_fnv_SetDefaultZA( p_oZADefault );
|
||||
}
|
||||
// delete ZA on ZAList
|
||||
M_ForEachElement( m_p_oZA -> m_oListOfZAListUsing, p_stZAUsed, xPos )
|
||||
{
|
||||
if( p_stZAUsed -> p_oZAList -> fn_bIsValid() )
|
||||
p_stZAUsed -> p_oZAList -> mfn_vSetZAFromState( p_oZADefault, p_stZAUsed -> p_oState );
|
||||
}
|
||||
//
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZADeleted ( m_p_oZA ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ZA_Delete::Undo()
|
||||
{
|
||||
tdstZAUsed *p_stZAUsed;
|
||||
POSITION xPos;
|
||||
|
||||
m_p_oZA -> fn_bValidate();
|
||||
m_p_oZA -> fn_vNotifyRestore();
|
||||
((CPA_SaveObject*)m_p_oZA -> GetOwner()) -> fn_vUpdateReference( m_p_oZA );
|
||||
|
||||
// default ZA ????
|
||||
if ( m_bDefault )
|
||||
{
|
||||
CPA_tdoNameList *p_oOwnerNameList = (CPA_tdoNameList*) m_p_oZA -> GetOwner();
|
||||
p_oOwnerNameList -> m_fnv_SetDefaultZA( m_p_oZA );
|
||||
}
|
||||
// restore ZA on ZAList
|
||||
M_ForEachElement( m_p_oZA -> m_oListOfZAListUsing, p_stZAUsed, xPos )
|
||||
{
|
||||
if( p_stZAUsed -> p_oZAList -> fn_bIsValid() )
|
||||
p_stZAUsed -> p_oZAList -> mfn_vSetZAFromState( m_p_oZA, p_stZAUsed -> p_oState );
|
||||
}
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZACreated ( m_p_oZA ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class ZA_Default
|
||||
|
||||
ZA_Default::ZA_Default(TAction_Interface *_p_oParentDLL, CPA_ZonesActivating *_p_oNewZA)
|
||||
:CPA_Modif(0, "Set Default Activation", FALSE)
|
||||
{
|
||||
m_p_oParentDLL = _p_oParentDLL;
|
||||
m_p_oNewDefaultZA = _p_oNewZA;
|
||||
}
|
||||
|
||||
ZA_Default::~ZA_Default()
|
||||
{
|
||||
}
|
||||
|
||||
// actions
|
||||
BOOL ZA_Default::Do()
|
||||
{
|
||||
return mfn_vMakeModif();
|
||||
}
|
||||
|
||||
BOOL ZA_Default::Undo()
|
||||
{
|
||||
return mfn_vMakeModif();
|
||||
}
|
||||
|
||||
BOOL ZA_Default::mfn_vMakeModif()
|
||||
{
|
||||
CPA_tdoNameList *p_oNameList = (CPA_tdoNameList*)m_p_oNewDefaultZA -> GetOwner();
|
||||
CPA_ZonesActivating *p_oCurrentDefault = (CPA_ZonesActivating*)p_oNameList -> m_fnp_oGetDefaultZA();
|
||||
|
||||
if( m_p_oNewDefaultZA == p_oCurrentDefault )
|
||||
return FALSE;
|
||||
|
||||
p_oNameList -> m_fnv_SetDefaultZA( m_p_oNewDefaultZA );
|
||||
p_oNameList -> fn_vUpdateReference( m_p_oNewDefaultZA );
|
||||
p_oNameList -> fn_vUpdateReference( p_oCurrentDefault );
|
||||
|
||||
// update display
|
||||
if( m_p_oParentDLL -> fn_bIsCurrentEditor () )
|
||||
m_p_oParentDLL -> mfn_vZAChanged( m_p_oNewDefaultZA, -1 ) ;
|
||||
|
||||
m_p_oNewDefaultZA = p_oCurrentDefault;
|
||||
|
||||
return TRUE;
|
||||
}
|
112
Rayman_X/cpa/tempgrp/TAc/src/dllcom.cpp
Normal file
112
Rayman_X/cpa/tempgrp/TAc/src/dllcom.cpp
Normal file
@@ -0,0 +1,112 @@
|
||||
//
|
||||
// Common functions for Object DLL capabilities
|
||||
// C. Beaudet
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "afxdllx.h"
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
#include "ACinterf.hpp"
|
||||
#include "x:\cpa\main\inc\_editid.h"
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Global vars
|
||||
static char *gs_p_szCPAVersion = C_szCPAVersion;
|
||||
static AFX_EXTENSION_MODULE NEAR extensionDLL = { NULL, NULL };
|
||||
|
||||
#ifdef DLL_ONLY_ONE_INSTANCE
|
||||
static TAction_Interface *gs_p_oTActionInterface = NULL;
|
||||
#endif
|
||||
|
||||
static CList<CPA_DLLBase*,CPA_DLLBase*> g_oListOfInstances; //private internal
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// functions that are present in all DLL :
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//========================================================================
|
||||
// Get current CPA version
|
||||
//========================================================================
|
||||
extern "C" char __declspec(dllexport) *fn_p_szGetCPAVersion(void)
|
||||
{
|
||||
return gs_p_szCPAVersion;
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// Get type of this DLL
|
||||
//========================================================================
|
||||
extern "C" tdstDLLIdentity __declspec(dllexport) *fn_p_stGetDLLIdentity(void)
|
||||
{
|
||||
g_stTActionIdentity . eType = TOOL_DLL;
|
||||
g_stTActionIdentity . csName = C_szDLLActionName;
|
||||
g_stTActionIdentity . hModule = NULL;
|
||||
g_stTActionIdentity . p_oListOfInstances = &g_oListOfInstances;
|
||||
return &g_stTActionIdentity;
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// DLL int function
|
||||
//========================================================================
|
||||
extern "C" void __declspec(dllexport) fn_vInitDll(void)
|
||||
{
|
||||
new CDynLinkLibrary(extensionDLL);
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// DLL entry point
|
||||
//========================================================================
|
||||
extern "C" int __stdcall DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
if (dwReason == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
if (!AfxInitExtensionModule(extensionDLL, hInstance))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// Get the DLL
|
||||
//========================================================================
|
||||
extern "C" CPA_DLLBase __declspec(dllexport) *fn_p_oGetDLL(long lKey)
|
||||
{
|
||||
#ifdef DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
switch(lKey)
|
||||
{
|
||||
case 0: // the game world
|
||||
if (gs_p_oTActionInterface == NULL)
|
||||
{
|
||||
gs_p_oTActionInterface = new TAction_Interface();
|
||||
ASSERT(gs_p_oTActionInterface != NULL);
|
||||
}
|
||||
return gs_p_oTActionInterface;
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#else //DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
switch(lKey)
|
||||
{
|
||||
case 0: // the game world
|
||||
return new TAction_Interface();
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif //DLL_ONLY_ONE_INSTANCE
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// functions that are present in this type of DLL only :
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
#undef DLL_ONLY_ONE_INSTANCE
|
Reference in New Issue
Block a user