Implement a common Interface for all MenuElements

Also remove CSongMenu and replace it with a factory class
This commit is contained in:
Flamefire committed 2014-10-19 17:17:39 +02:00
1 parent 9479f3b3ff
commit ae7a7fd390
52 files changed
+1043 -1855

No files matched your search

+15 -11
View File
@@ -15,21 +15,25 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using VocaluxeLib.Xml;
namespace VocaluxeLib.Menu
{
interface IMenuElement
public interface IMenuElement
{
string GetThemeName();
bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader);
void UnloadSkin();
void LoadSkin();
void ReloadSkin();
/// <summary>
/// Current extend of the element. Smaller or equal then MaxRect
/// </summary>
SRectF Rect { get; }
/// <summary>
/// Maximum extend of the element. Equal to Rect in most cases
/// </summary>
SRectF MaxRect { get; set; }
bool Selectable { get; }
bool Visible { get; set; }
bool Highlighted { get; set; }
bool Selected { get; set; }
void MoveElement(int stepX, int stepY);
void ResizeElement(int stepW, int stepH);
void Draw();
}
}