Named enums

Is there a better way to define named enums instead of wrapping them in empty pseudo classes like following:

class Rect {

    class Position {
        enum {
            Left,
            Right,
            Full
        }
	}

    class TextAlignment { 
        enum {
            Left,
            Right,
            Center
        }
    }
}