Something like this will likely end up being rather complicated and take a lot of work to flesh out and make perfect. In my eyes, the easiest way I could see this working is to use collisions. You could have a base empty room object (just an empty square) and that would do collisions against an interior object (walls, windows, beds, all parented under the same object). At that point it would be as simple as letting the player place those objects into the room object and then counting how many are placed and see if it meets your requirements for a room. So, each time a collision happens you just check if you have already counted that object and if not add it to some list that you use to store all the ids of objects the player has placed in the room. Then, loop over that list every time the player adds a new object and see if they have finally added enough objects to make it complete.
Something you will probably run into is, just because the player places 4 walls doesn't necessarily mean they have build a room. They may need to place the wall objects along the edge of the room object, or maybe you do special collisions for the wall objects to make sure they are colliding with some particular edge of the room, or maybe you just check the edges of the room object every step and wait until the player has placed walls along them, it's up to you.
There are a lot of other ways you could do this though. I think maybe a better way would be to base it off of a grid system, so 16x16 or 32x32 chunks, and you let the player draw in each chunk. They can select "wall" or "floor" and then click on a cell and paint in that data type into the cell. You could also use objects here and collisions like I mentioned above, so a wall that spans 128px with 32px chunks would be 4 wall objects, if that makes sense, but it wouldn't be necessary. If you get into all this though you will need a lot more features. You will need things like layers, where the user can work on drawing out the wall layer, or the floor layer, or the objects layer. Then you need to save all this into a file or something so that you can reload it later. You will also need a way for the user to re-arrange things and undo their work, not to mention adding scripted objects that can have player interactions like doors, stairs, refrigerator, stove, microwave, etc etc. And that is just considering how things will exist, you still need to build an entire editor that allows the user to create such things. You will need palettes, brushes, gui interfaces and the list goes on.