Why do you say a vector would be better? List is faster for iterating through than a vector.
Also, I've seen people talk about these stl pointer classes, what are they exactly?
I'm not doing a whole lot with the pointer, its just so i can have a list of all my buttons and check them for being clicked or not, but not all buttons do the same things. Some are on off buttons, some are multistate buttons like on, off, and half, and some are click to do this thing. I made a base virtual class to inherit in the other buttons so I can just have a singular list, which is then encapsulated inside of a handler class so that in the main class of the builder i just have to deal with the handler class which passes info between the main builder class and the buttons. Only way i can think of to update the buttons is the iterate through them all.
The mouse coordinates and state of the mouse buttons get passed to the handler, which then checks it against each button and sets the state of the button accordingly. If the button is used, then the handler will get an enum value from the button which gets passed into an event handler which the main builder class uses to determine what it should do from the button presses. Probably not the easiest way to go about it, but it prevents circular dependency and keeps them pretty loosely coupled I think. Each button, based on its state, figures out what it's sprite should be and the handler generates a list of sprites from each button and then the main builder class gets this list and draws them.