Added insert before and after functions
This commit is contained in:
Родитель
512beb999e
Коммит
be646eb146
|
@ -63,6 +63,18 @@ public:
|
|||
{
|
||||
m_Formats.AddTail(format);
|
||||
}
|
||||
void InsertBefore(CFormat &format, int nIndex)
|
||||
{
|
||||
POSITION pos = m_Formats.FindIndex(nIndex);
|
||||
if (pos != NULL)
|
||||
m_Formats.InsertBefore(pos, format);
|
||||
}
|
||||
void InsertAfter(CFormat &format, int nIndex)
|
||||
{
|
||||
POSITION pos = m_Formats.FindIndex(nIndex);
|
||||
if (pos != NULL)
|
||||
m_Formats.InsertAfter(pos, format);
|
||||
}
|
||||
public:
|
||||
void RemoveNode(int pstn = -1)
|
||||
{
|
||||
|
|
|
@ -62,6 +62,18 @@ public:
|
|||
{
|
||||
m_Items.AddTail(item);
|
||||
}
|
||||
void InsertBefore(CItem& item, int nIndex)
|
||||
{
|
||||
POSITION pos = m_Items.FindIndex(nIndex);
|
||||
if (pos != NULL)
|
||||
m_Items.InsertBefore(pos, item);
|
||||
}
|
||||
void InsertAfter(CItem& item, int nIndex)
|
||||
{
|
||||
POSITION pos = m_Items.FindIndex(nIndex);
|
||||
if (pos != NULL)
|
||||
m_Items.InsertAfter(pos, item);
|
||||
}
|
||||
public:
|
||||
void RemoveNode(int pstn = -1)
|
||||
{
|
||||
|
|
|
@ -63,6 +63,18 @@ public:
|
|||
{
|
||||
m_Languages.AddTail(language);
|
||||
}
|
||||
void InsertBefore(CLanguage &language, int nIndex)
|
||||
{
|
||||
POSITION pos = m_Languages.FindIndex(nIndex);
|
||||
if (pos != NULL)
|
||||
m_Languages.InsertBefore(pos, language);
|
||||
}
|
||||
void InsertAfter(CLanguage &language, int nIndex)
|
||||
{
|
||||
POSITION pos = m_Languages.FindIndex(nIndex);
|
||||
if (pos != NULL)
|
||||
m_Languages.InsertAfter(pos, language);
|
||||
}
|
||||
public:
|
||||
void RemoveNode(int pstn = -1)
|
||||
{
|
||||
|
|
|
@ -63,6 +63,18 @@ public:
|
|||
{
|
||||
m_Presets.AddTail(preset);
|
||||
}
|
||||
void InsertBefore(CPreset &preset, int nIndex)
|
||||
{
|
||||
POSITION pos = m_Presets.FindIndex(nIndex);
|
||||
if (pos != NULL)
|
||||
m_Presets.InsertBefore(pos, preset);
|
||||
}
|
||||
void InsertAfter(CPreset &preset, int nIndex)
|
||||
{
|
||||
POSITION pos = m_Presets.FindIndex(nIndex);
|
||||
if (pos != NULL)
|
||||
m_Presets.InsertAfter(pos, preset);
|
||||
}
|
||||
void InsertNode(CString szName)
|
||||
{
|
||||
CPreset preset;
|
||||
|
|
Загрузка…
Ссылка в новой задаче